From 5151d0dd16454cde28e79a5ce70fee13bbc8cb35 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 09:02:42 -0700 Subject: [PATCH 001/139] added gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 52b9332cd..ff2ba09d0 100644 --- a/.gitignore +++ b/.gitignore @@ -125,3 +125,6 @@ android/app/google-services.json !**/ios/**/default.pbxuser !**/ios/**/default.perspectivev3 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages + +# ESRI Map +arcgis_maps_core/ From a44cfec80e071d48dff1e0c0c53101503f754b88 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 09:25:18 -0700 Subject: [PATCH 002/139] changed pusbpec --- pubspec.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 40778f107..70e3f1c64 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -33,12 +33,13 @@ dependencies: intl: ^0.20.2 liquid_progress_indicator_v2: 0.5.0 measured_size: 1.0.0 - geolocator: ^13.0.4 - package_info_plus: ^8.3.1 + geolocator: ^14.0.0 + package_info_plus: ^9.0.0 flutter_markdown: ^0.6.18 flutter_svg: ^2.2.0 percent_indicator: ^4.2.5 - pointycastle: ^3.9.0 + permission_handler: ^12.0.1 + pointycastle: ^4.0.0 provider: ^6.1.5+1 shared_preferences: ^2.5.3 app_links: ^3.0.0 @@ -49,7 +50,9 @@ dependencies: git: url: https://github.com/UCSD/wifi_connection.git ref: e0fb416f81daedeabb1eedef22041e67f30f792b - device_info_plus: ^11.5.0 + device_info_plus: ^12.1.0 + arcgis_maps: ^300.0.0 + google_maps_flutter_ios: 2.15.7 dependency_overrides: value_layout_builder: ^0.5.0 # Fix Flutter 3.32.0 compatibility dev_dependencies: From 42bc93e999aec63b4c5b7c3fd32838f42e4d106d Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 09:28:58 -0700 Subject: [PATCH 003/139] successfully upgraded dependencies --- pubspec.lock | 230 ++++++++++++++++++++++++++++++++++++++++++++++++--- pubspec.yaml | 4 +- 2 files changed, 221 insertions(+), 13 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 142fd51a2..9cedc5e78 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -33,6 +33,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.5.1" + arcgis_maps: + dependency: "direct main" + description: + name: arcgis_maps + sha256: "6eda8e19a5580b40c58c39134edfa6e90b649d97298460b31f006457f6fbeaf5" + url: "https://pub.dev" + source: hosted + version: "300.0.0+4935" args: dependency: transitive description: @@ -169,6 +177,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.2" + code_assets: + dependency: transitive + description: + name: code_assets + sha256: "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687" + url: "https://pub.dev" + source: hosted + version: "1.0.0" code_builder: dependency: transitive description: @@ -241,14 +257,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.11" + desktop_webview_window: + dependency: transitive + description: + name: desktop_webview_window + sha256: b6fdae2cbf9571879b1761c12f27facaf82e22d0bdc74d049907c2a09a432957 + url: "https://pub.dev" + source: hosted + version: "0.3.0" device_info_plus: dependency: "direct main" description: name: device_info_plus - sha256: "98f28b42168cc509abc92f88518882fd58061ea372d7999aecc424345c7bff6a" + sha256: b4fed1b2835da9d670d7bed7db79ae2a94b0f5ad6312268158a9b5479abbacdd url: "https://pub.dev" source: hosted - version: "11.5.0" + version: "12.4.0" device_info_plus_platform_interface: dependency: transitive description: @@ -265,6 +289,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.9.0" + dio_cache_interceptor: + dependency: transitive + description: + name: dio_cache_interceptor + sha256: "9472f9f3dcaa384ae68e60606c1d04e6314dea5eab39f18d94ff9b0a300dbbe4" + url: "https://pub.dev" + source: hosted + version: "4.0.7" dio_web_adapter: dependency: transitive description: @@ -281,6 +313,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.1" + drift: + dependency: transitive + description: + name: drift + sha256: "84688491040b0ceb26575709a84d701c84ad4df4d8aff020adf6d85f155fb0dd" + url: "https://pub.dev" + source: hosted + version: "2.34.2" encrypt: dependency: "direct main" description: @@ -548,6 +588,22 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_web_auth_2: + dependency: transitive + description: + name: flutter_web_auth_2 + sha256: "8f9303471dcd96670878c9b7c0c4e14c37595b2add67465f6a868f17a5872dfc" + url: "https://pub.dev" + source: hosted + version: "5.0.3" + flutter_web_auth_2_platform_interface: + dependency: transitive + description: + name: flutter_web_auth_2_platform_interface + sha256: ba0fbba55bffb47242025f96852ad1ffba34bc451568f56ef36e613612baffab + url: "https://pub.dev" + source: hosted + version: "5.0.0" flutter_web_plugins: dependency: transitive description: flutter @@ -561,22 +617,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.0" + geoclue: + dependency: transitive + description: + name: geoclue + sha256: c2a998c77474fc57aa00c6baa2928e58f4b267649057a1c76738656e9dbd2a7f + url: "https://pub.dev" + source: hosted + version: "0.1.1" geolocator: dependency: "direct main" description: name: geolocator - sha256: f62bcd90459e63210bbf9c35deb6a51c521f992a78de19a1fe5c11704f9530e2 + sha256: "79939537046c9025be47ec645f35c8090ecadb6fe98eba146a0d25e8c1357516" url: "https://pub.dev" source: hosted - version: "13.0.4" + version: "14.0.2" geolocator_android: dependency: transitive description: name: geolocator_android - sha256: fcb1760a50d7500deca37c9a666785c047139b5f9ee15aa5469fae7dbbe3170d + sha256: "86ea1654e4f61ff51466848e91c116b422d6010ea269fda0fbe1af7e9e742ce1" url: "https://pub.dev" source: hosted - version: "4.6.2" + version: "5.0.3" geolocator_apple: dependency: transitive description: @@ -585,6 +649,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.13" + geolocator_linux: + dependency: transitive + description: + name: geolocator_linux + sha256: d64112a205931926f4363bb6bd48f14cb38e7326833041d170615586cd143797 + url: "https://pub.dev" + source: hosted + version: "0.2.4" geolocator_platform_interface: dependency: transitive description: @@ -689,6 +761,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" + gsettings: + dependency: transitive + description: + name: gsettings + sha256: "1b0ce661f5436d2db1e51f3c4295a49849f03d304003a7ba177d01e3a858249c" + url: "https://pub.dev" + source: hosted + version: "0.2.8" gtk: dependency: transitive description: @@ -697,6 +777,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" + haptic_feedback: + dependency: transitive + description: + name: haptic_feedback + sha256: c6b7ce370f17142cd6df1ed29add2cf50393aa967d9c5638e6fb7dbeff7414ec + url: "https://pub.dev" + source: hosted + version: "0.6.5" hive: dependency: "direct main" description: @@ -721,6 +809,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.3" + hooks: + dependency: transitive + description: + name: hooks + sha256: "025f060e86d2d4c3c47b56e33caf7f93bf9283340f26d23424ebcfccf34f621e" + url: "https://pub.dev" + source: hosted + version: "1.0.3" html: dependency: transitive description: @@ -737,6 +833,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.0" + http_cache_core: + dependency: transitive + description: + name: http_cache_core + sha256: d6de4ca6680e70f4eacd79e073d6a73734eb1da86305409e495adfabf404eddf + url: "https://pub.dev" + source: hosted + version: "1.1.4" + http_cache_drift_store: + dependency: transitive + description: + name: http_cache_drift_store + sha256: "48449b49030b053eee7416643aee89cb1ec6c0d232a97b95a4845611b0bf8d03" + url: "https://pub.dev" + source: hosted + version: "7.0.1" http_multi_server: dependency: transitive description: @@ -825,6 +937,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.0" + logger: + dependency: transitive + description: + name: logger + sha256: "25aee487596a6257655a1e091ec2ae66bc30e7af663592cc3a27e6591e05035c" + url: "https://pub.dev" + source: hosted + version: "2.7.0" logging: dependency: transitive description: @@ -881,6 +1001,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" + mutex: + dependency: transitive + description: + name: mutex + sha256: "8827da25de792088eb33e572115a5eb0d61d61a3c01acbc8bcbe76ed78f1a1f2" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + native_toolchain_c: + dependency: transitive + description: + name: native_toolchain_c + sha256: "8aaead321425bd3f03bd5894aa27c8ea6993eab95531da7e59f5d39c6e5708ec" + url: "https://pub.dev" + source: hosted + version: "0.18.0" nested: dependency: transitive description: @@ -909,10 +1045,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "16eee997588c60225bda0488b6dcfac69280a6b7a3cf02c741895dd370a02968" + sha256: "468c26b4254ab01979fa5e4a98cb343ea3631b9acee6f21028997419a80e1a20" url: "https://pub.dev" source: hosted - version: "8.3.1" + version: "9.0.1" package_info_plus_platform_interface: dependency: transitive description: @@ -993,6 +1129,54 @@ packages: url: "https://pub.dev" source: hosted version: "4.2.5" + permission_handler: + dependency: "direct main" + description: + name: permission_handler + sha256: fe54465bcc62a4564c6e4db337bbaded6c0c0fa6e10487414436d163114784f6 + url: "https://pub.dev" + source: hosted + version: "12.0.3" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + sha256: "1e3bc410ca1bf84662104b100eb126e066cb55791b7451307f9708d4007350e6" + url: "https://pub.dev" + source: hosted + version: "13.0.1" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: "79dfa1df734798aa3cfdad166d3a3698c206d8813de13516ea1071b5d7e2f420" + url: "https://pub.dev" + source: hosted + version: "9.4.10" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" + url: "https://pub.dev" + source: hosted + version: "0.1.3+5" + permission_handler_platform_interface: + dependency: transitive + description: + name: permission_handler_platform_interface + sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878 + url: "https://pub.dev" + source: hosted + version: "4.3.0" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" + url: "https://pub.dev" + source: hosted + version: "0.2.1" petitparser: dependency: transitive description: @@ -1021,10 +1205,10 @@ packages: dependency: "direct main" description: name: pointycastle - sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe" + sha256: "92aa3841d083cc4b0f4709b5c74fd6409a3e6ba833ffc7dc6a8fee096366acf5" url: "https://pub.dev" source: hosted - version: "3.9.1" + version: "4.0.0" pool: dependency: transitive description: @@ -1065,6 +1249,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.2" + record_use: + dependency: transitive + description: + name: record_use + sha256: "2551bd8eecfe95d14ae75f6021ad0248be5c27f138c2ec12fcb52b500b3ba1ed" + url: "https://pub.dev" + source: hosted + version: "0.6.0" sanitize_html: dependency: transitive description: @@ -1174,6 +1366,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.1" + sqlite3: + dependency: transitive + description: + name: sqlite3 + sha256: c73fd75df1332d76a6257f4823ae4df9c791f522b97e4a60cbcad214de1becf4 + url: "https://pub.dev" + source: hosted + version: "3.5.0" stack_trace: dependency: transitive description: @@ -1463,6 +1663,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" + window_to_front: + dependency: transitive + description: + name: window_to_front + sha256: "14fad8984db4415e2eeb30b04bb77140b180e260d6cb66b26de126a8657a9241" + url: "https://pub.dev" + source: hosted + version: "0.0.4" xdg_directories: dependency: transitive description: @@ -1488,5 +1696,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.10.0 <4.0.0" + dart: ">=3.11.1 <4.0.0" flutter: ">=3.44.0" diff --git a/pubspec.yaml b/pubspec.yaml index 70e3f1c64..14072818c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,7 +39,7 @@ dependencies: flutter_svg: ^2.2.0 percent_indicator: ^4.2.5 permission_handler: ^12.0.1 - pointycastle: ^4.0.0 + pointycastle: ^3.9.0 provider: ^6.1.5+1 shared_preferences: ^2.5.3 app_links: ^3.0.0 @@ -52,9 +52,9 @@ dependencies: ref: e0fb416f81daedeabb1eedef22041e67f30f792b device_info_plus: ^12.1.0 arcgis_maps: ^300.0.0 - google_maps_flutter_ios: 2.15.7 dependency_overrides: value_layout_builder: ^0.5.0 # Fix Flutter 3.32.0 compatibility + pointycastle: ^4.0.0 dev_dependencies: build_runner: 2.4.13 flutter_test: From f867992052154244695719bca81175c24f59c31a Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 10:36:23 -0700 Subject: [PATCH 004/139] finished android configuration --- .gitignore | 2 +- android/app/build.gradle | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ff2ba09d0..d6ddc6ffe 100644 --- a/.gitignore +++ b/.gitignore @@ -127,4 +127,4 @@ android/app/google-services.json !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages # ESRI Map -arcgis_maps_core/ +arcgis_maps_core diff --git a/android/app/build.gradle b/android/app/build.gradle index b653d0fa2..a94dbdc3d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -16,7 +16,7 @@ if (keystorePropertiesFile.exists()) { android { namespace = "edu.ucsd" compileSdk = flutter.compileSdkVersion - ndkVersion = "27.0.12077973" + ndkVersion = "28.2.13676358" compileOptions { sourceCompatibility = JavaVersion.VERSION_17 @@ -34,7 +34,7 @@ android { defaultConfig { applicationId = "edu.ucsd" - minSdkVersion = flutter.minSdkVersion + minSdkVersion = "28" targetSdk = flutter.targetSdkVersion versionCode = flutter.versionCode versionName = flutter.versionName From 73037e55940d10487b43db2f8a27eb30b1c9d2a9 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 10:36:59 -0700 Subject: [PATCH 005/139] added Alessio's work --- lib/app_router.dart | 3 +- lib/main.dart | 1 + lib/ui/esrimap/esrimap.dart | 3014 +++++++++++++++++ lib/ui/esrimap/esrimap_ai_search.dart | 317 ++ lib/ui/esrimap/esrimap_basemaps.dart | 68 + lib/ui/esrimap/esrimap_config.dart | 260 ++ lib/ui/esrimap/esrimap_fab.dart | 163 + lib/ui/esrimap/esrimap_layers_panel.dart | 281 ++ lib/ui/esrimap/esrimap_scene.dart | 151 + lib/ui/esrimap/mapConfig.json | 166 + .../temp_assets/construction-thumbnail.png | Bin 0 -> 15020 bytes lib/ui/esrimap/temp_assets/dark-thumbnail.png | Bin 0 -> 11767 bytes .../esrimap/temp_assets/default-thumbnail.png | Bin 0 -> 15769 bytes .../temp_assets/districts-thumbnail.png | Bin 0 -> 6086 bytes .../esrimap/temp_assets/light-thumbnail.png | Bin 0 -> 9597 bytes .../temp_assets/satellite-thumbnail.png | Bin 0 -> 34892 bytes .../temp_assets/shuttles-thumbnail.png | Bin 0 -> 14508 bytes lib/ui/esrimap/temp_assets/tgpt-dark.svg | 14 + lib/ui/esrimap/temp_assets/tgpt-light.svg | 14 + lib/ui/navigator/bottom.dart | 10 +- 20 files changed, 4457 insertions(+), 5 deletions(-) create mode 100644 lib/ui/esrimap/esrimap.dart create mode 100644 lib/ui/esrimap/esrimap_ai_search.dart create mode 100644 lib/ui/esrimap/esrimap_basemaps.dart create mode 100644 lib/ui/esrimap/esrimap_config.dart create mode 100644 lib/ui/esrimap/esrimap_fab.dart create mode 100644 lib/ui/esrimap/esrimap_layers_panel.dart create mode 100644 lib/ui/esrimap/esrimap_scene.dart create mode 100644 lib/ui/esrimap/mapConfig.json create mode 100644 lib/ui/esrimap/temp_assets/construction-thumbnail.png create mode 100644 lib/ui/esrimap/temp_assets/dark-thumbnail.png create mode 100644 lib/ui/esrimap/temp_assets/default-thumbnail.png create mode 100644 lib/ui/esrimap/temp_assets/districts-thumbnail.png create mode 100644 lib/ui/esrimap/temp_assets/light-thumbnail.png create mode 100644 lib/ui/esrimap/temp_assets/satellite-thumbnail.png create mode 100644 lib/ui/esrimap/temp_assets/shuttles-thumbnail.png create mode 100644 lib/ui/esrimap/temp_assets/tgpt-dark.svg create mode 100644 lib/ui/esrimap/temp_assets/tgpt-light.svg diff --git a/lib/app_router.dart b/lib/app_router.dart index 0ae07d2ba..53ec03f2b 100644 --- a/lib/app_router.dart +++ b/lib/app_router.dart @@ -35,6 +35,7 @@ import 'package:campus_mobile_experimental/ui/shuttle/add_shuttle_stops_view.dar import 'package:campus_mobile_experimental/ui/shuttle/manage_shuttle_view.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esrimap.dart'; class Router { static Route generateRoute(RouteSettings settings) { @@ -51,7 +52,7 @@ class Router { return Home(); }); case RoutePaths.MAP: - return MaterialPageRoute(builder: (_) => prefix0.Maps()); + return MaterialPageRoute(builder: (_) => EsriMap()); case RoutePaths.MAP_SEARCH: return MaterialPageRoute(builder: (_) => MapSearchView()); case RoutePaths.NOTIFICATIONS: diff --git a/lib/main.dart b/lib/main.dart index a7fc8234b..6255348d6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -16,6 +16,7 @@ import 'package:provider/provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:google_maps_flutter_android/google_maps_flutter_android.dart'; import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import 'package:arcgis_maps/arcgis_maps.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart'; diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart new file mode 100644 index 000000000..e3e287e46 --- /dev/null +++ b/lib/ui/esrimap/esrimap.dart @@ -0,0 +1,3014 @@ +import 'dart:convert'; +import 'dart:math' as math; +import 'dart:async'; +import 'package:arcgis_maps/arcgis_maps.dart'; +import 'package:flutter/material.dart'; +import 'package:http/http.dart' as http; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:url_launcher/url_launcher.dart'; + +import 'esrimap_basemaps.dart'; +import 'esrimap_fab.dart'; +import 'esrimap_layers_panel.dart'; +import 'esrimap_scene.dart'; +import 'esrimap_config.dart'; +import 'esrimap_ai_search.dart'; + +// ----------------------------------------------------------------------------- +// Model +// ----------------------------------------------------------------------------- + +/// Unified search result model for both Buildings and POIs. +class MapSearchResult { + final String name; + final String subtitle; + final double latitude; + final double longitude; + final MapSearchSource source; + final String address; + final String description; + final String? websiteUrl; + + const MapSearchResult({ + required this.name, + required this.subtitle, + required this.latitude, + required this.longitude, + required this.source, + this.address = '', + this.description = '', + this.websiteUrl, + }); + + /// Serialize to JSON for SharedPreferences storage. + Map toJson() => { + 'name': name, + 'subtitle': subtitle, + 'latitude': latitude, + 'longitude': longitude, + 'source': source.index, + 'address': address, + 'description': description, + 'websiteUrl': websiteUrl, + }; + + /// Deserialize from JSON. + factory MapSearchResult.fromJson(Map json) { + return MapSearchResult( + name: json['name'] as String? ?? '', + subtitle: json['subtitle'] as String? ?? '', + latitude: (json['latitude'] as num?)?.toDouble() ?? 0.0, + longitude: (json['longitude'] as num?)?.toDouble() ?? 0.0, + source: MapSearchSource.values[json['source'] as int? ?? 0], + address: json['address'] as String? ?? '', + description: json['description'] as String? ?? '', + websiteUrl: json['websiteUrl'] as String?, + ); + } +} + +enum MapSearchSource { building, poi } + +// ----------------------------------------------------------------------------- +// Category definitions +// ----------------------------------------------------------------------------- + +class _SearchCategory { + final String label; + final IconData icon; + final String poiClassValue; + final Color color; + + const _SearchCategory({ + required this.label, + required this.icon, + required this.poiClassValue, + this.color = const Color(0xFFF5F0E6), + }); +} + +IconData _iconDataForName(String name) { + switch (name) { + case 'restaurant': return Icons.restaurant; + case 'menu_book': return Icons.menu_book; + case 'local_parking': return Icons.local_parking; + case 'fitness_center': return Icons.fitness_center; + case 'directions_bus': return Icons.directions_bus; + default: return Icons.place; + } +} + +Color _colorFromHex(String? hex) { + if (hex == null || hex.isEmpty) return const Color(0xFFF5F0E6); + final stripped = hex.replaceFirst('#', ''); + final value = int.tryParse(stripped, radix: 16); + if (value == null) return const Color(0xFFF5F0E6); + return Color(0xFF000000 | value); +} + +// ----------------------------------------------------------------------------- +// Slide-over header delegate +// ----------------------------------------------------------------------------- + +class _SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { + final Widget child; + final double height; + final Color backgroundColor; + + _SlideOverHeaderDelegate({ + required this.child, + required this.height, + required this.backgroundColor, + }); + + @override + double get minExtent => height; + @override + double get maxExtent => height; + + @override + Widget build( + BuildContext context, double shrinkOffset, bool overlapsContent) { + return Container( + height: height, + decoration: BoxDecoration( + color: backgroundColor, + borderRadius: shrinkOffset == 0 + ? const BorderRadius.vertical(top: Radius.circular(16)) + : null, + ), + child: child, + ); + } + + @override + bool shouldRebuild(covariant _SlideOverHeaderDelegate oldDelegate) { + return child != oldDelegate.child || + height != oldDelegate.height || + backgroundColor != oldDelegate.backgroundColor; + } +} + +// ----------------------------------------------------------------------------- +// Widget +// ----------------------------------------------------------------------------- + +class EsriMap extends StatefulWidget { + const EsriMap({Key? key}) : super(key: key); + + @override + State createState() => _EsriMapState(); +} + +class _EsriMapState extends State with AutomaticKeepAliveClientMixin { + final _mapViewController = ArcGISMapView.createController(); + late final ArcGISMap _map; + final _graphicsOverlay = GraphicsOverlay(); + final _searchController = TextEditingController(); + final _focusNode = FocusNode(); + + // Slide-over controllers + final _categorySheetController = DraggableScrollableController(); + final _detailSheetController = DraggableScrollableController(); + + // Service base URL + static const _baseUrl = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; + + // Config -- loaded on init, gates map setup + EsriMapConfig? _config; + + // SharedPreferences key for recent searches + static const _recentSearchesKey = 'esri_map_recent_searches'; + static const _maxRecentSearches = 5; + + // Search state + List _searchResults = []; + List _allPoiClasses = []; // all distinct Class values from the server + List _matchingPoiClasses = []; // live-filtered subset while typing + bool _showResults = false; + bool _isSearching = false; + bool _showSuggestions = false; + + // Recent searches + List _recentSearches = []; + + // Detail slide-over state + MapSearchResult? _selectedResult; + MapSearchResult? _lastSelectedResult; + + // Results currently plotted as pins on the map (from category search) + List _mappedResults = []; + + // Full unfiltered result set for the active category (used by "See All") + List _allCategoryResults = []; + + // Whether to show the full category list panel + bool _showCategoryList = false; + + // The active category (for display in the "See All" label) + _SearchCategory? _activeCategory; + + // FAB active-button highlight state + bool _isLocationActive = false; + bool _isRecenterActive = false; + bool _ignoreViewpointReset = false; + + // Location display + final _locationDataSource = SystemLocationDataSource(); + bool _locationStarted = false; + + // Routing + final _routeGraphicsOverlay = GraphicsOverlay(); + bool _isRouting = false; + bool _hasRoute = false; + Envelope? _routePaddedExtent; + bool _routeFailed = false; + String _travelMode = 'Walking'; + double _routeTravelTimeMinutes = 0; + List _routeManeuvers = []; + bool _showRouteFields = false; + final _fromController = TextEditingController(); + final _toController = TextEditingController(); + final _fromFocusNode = FocusNode(); + final _toFocusNode = FocusNode(); + String? _activeRouteField; + (double, double)? _fromLatLng; + MapSearchResult? _routeDestination; + + // Basemap switcher + BasemapType _currentBasemapType = BasemapType.defaultMap; + final Map _basemaps = {}; + bool _showLayersPanel = false; + + // Operational layers — keyed by config layer key + final Map _layerVisible = {}; + final Map _layerLoading = {}; + final Map> _layerInstances = {}; + final Map _layerTimers = {}; + + // Compass + double _mapRotation = 0.0; + StreamSubscription? _viewpointChangedSubscription; + + final _mapReadyCompleter = Completer(); + + List<_SearchCategory> get _categories { + if (_config == null) return []; + return _config!.searchCategories + .map((c) => _SearchCategory( + label: c.label, + icon: _iconDataForName(c.icon), + poiClassValue: c.poiClass, + color: _colorFromHex(c.color), + )) + .toList(); + } + + // Scene mode key — matches keys in config.scenes ('default' | 'building3d' | 'droneView') + String _sceneMode = 'default'; + EsriSceneWidget? _scene3DWidget; + EsriSceneWidget? _sceneDroneWidget; + final _scene3DKey = GlobalKey(); + final _sceneDroneKey = GlobalKey(); + + @override + bool get wantKeepAlive => true; + + @override + void initState() { + super.initState(); + _fetchConfigThenInit(); + _loadRecentSearches(); + _focusNode.addListener(_onFocusChanged); + _fromFocusNode.addListener(_onFromFocusChanged); + _toFocusNode.addListener(_onToFocusChanged); + } + + Future _fetchConfigThenInit() async { + try { + final config = await EsriMapConfigService.instance.fetch(); + if (!mounted) return; + setState(() => _config = config); + _initMap(config); + _fetchAllPoiClasses(); + } catch (e) { + debugPrint('Config fetch failed: $e'); + _mapReadyCompleter.completeError(e); + } + } + + @override + void dispose() { + _categorySheetController.dispose(); + _detailSheetController.dispose(); + _searchController.dispose(); + _fromController.dispose(); + _toController.dispose(); + _fromFocusNode.dispose(); + _toFocusNode.dispose(); + _focusNode.dispose(); + for (final timer in _layerTimers.values) { + timer.cancel(); + } + _viewpointChangedSubscription?.cancel(); + super.dispose(); + } + + void _setupAgeAuthChallengeHandler() { + ArcGISEnvironment + .authenticationManager + .arcGISAuthenticationChallengeHandler = _AgeAuthChallengeHandler( + EsriMapConfigService.instance.tokensUrl, + ); + } + + void _initMap(EsriMapConfig config) { + for (final type in BasemapType.values) { + _basemaps[type] = buildBasemap(type, config); + } + + _map = ArcGISMap.withBasemap(_basemaps[_currentBasemapType]!); + _map.initialViewpoint = Viewpoint.fromCenter( + ArcGISPoint( + x: -117.2340, + y: 32.8801, + spatialReference: SpatialReference.wgs84, + ), + scale: 24000, + ); + _mapReadyCompleter.complete(); + } + + void _onMapViewReady() async { + await _mapReadyCompleter.future; + _setupAgeAuthChallengeHandler(); + _mapViewController.arcGISMap = _map; + _mapViewController.interactionOptions.rotateEnabled = true; + if (!_mapViewController.graphicsOverlays.contains(_graphicsOverlay)) { + _mapViewController.graphicsOverlays.add(_graphicsOverlay); + } + if (!_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay)) { + _mapViewController.graphicsOverlays.add(_routeGraphicsOverlay); + } + + // Wire up location display — blue dot, no auto-pan on start + _mapViewController.locationDisplay.dataSource = _locationDataSource; + _mapViewController.locationDisplay.autoPanMode = + LocationDisplayAutoPanMode.off; + + _startLocationDisplay(); + _preloadAlternateBasemaps(); + + _viewpointChangedSubscription = + _mapViewController.onViewpointChanged.listen((_) { + final vp = _mapViewController.getCurrentViewpoint( + ViewpointType.centerAndScale, + ); + if (vp != null && mounted) { + setState(() { + _mapRotation = vp.rotation; + if (!_ignoreViewpointReset && (_isLocationActive || _isRecenterActive)) { + _isLocationActive = false; + _isRecenterActive = false; + } + }); + } + }); + } + + void _snapToNorth() { + if (_sceneMode != 'default') { + if (_sceneMode == 'building3d') { + _scene3DKey.currentState?.snapToNorth(); + } else { + _sceneDroneKey.currentState?.snapToNorth(); + } + return; + } + _mapViewController.setViewpointRotation(angleDegrees: 0); + } + + ///Loads metadata and style sheets; tile content still fetches lazily once the basemap is applied to the MapView. + void _preloadAlternateBasemaps() { + for (final entry in _basemaps.entries) { + if (entry.key == _currentBasemapType) continue; + entry.value.load().catchError((Object e) { + debugPrint('Failed to preload basemap ${entry.key}: $e'); + }); + } + } + + void _switchBasemap(BasemapType newType) { + if (newType == _currentBasemapType) return; + final newBasemap = _basemaps[newType]; + if (newBasemap == null) return; + + // Setting Map.basemap swaps the underlying layers without changing the current Viewpoint, so the user's view frame is preserved. + setState(() { + _map.basemap = newBasemap; + _currentBasemapType = newType; + }); + } + + void _setSceneMode(String key) { + if (key == _sceneMode) return; + setState(() { + _sceneMode = key; + if (key != 'default') _showLayersPanel = false; + if (_config == null) return; + final scene = _config!.scenes[key]; + if (scene == null || scene.type != 'scene') return; + final portalUrl = scene.portalKey != null + ? _config!.portals[scene.portalKey!] + : null; + if (portalUrl == null || scene.itemId == null) return; + if (key == 'building3d' && _scene3DWidget == null) { + _scene3DWidget = EsriSceneWidget( + key: _scene3DKey, + portalUri: portalUrl, + itemId: scene.itemId!, + onHeadingChanged: (h) => setState(() { + _mapRotation = h; + if (!_ignoreViewpointReset && (_isLocationActive || _isRecenterActive)) { + _isLocationActive = false; + _isRecenterActive = false; + } + }), + ); + } else if (key == 'droneView' && _sceneDroneWidget == null) { + _sceneDroneWidget = EsriSceneWidget( + key: _sceneDroneKey, + portalUri: portalUrl, + itemId: scene.itemId!, + onHeadingChanged: (h) => setState(() { + _mapRotation = h; + if (!_ignoreViewpointReset && (_isLocationActive || _isRecenterActive)) { + _isLocationActive = false; + _isRecenterActive = false; + } + }), + ); + } + }); + } + +void _toggleLayer(String key) async { + final entry = _config?.layers[key]; + if (entry == null) return; + + if (_layerVisible[key] == true) { + _layerTimers[key]?.cancel(); + _layerTimers.remove(key); + for (final layer in _layerInstances[key] ?? []) { + if (layer != null) _map.operationalLayers.remove(layer); + } + _layerInstances.remove(key); + setState(() => _layerVisible[key] = false); + return; + } + + setState(() => _layerLoading[key] = true); + + final instances = _buildLayerInstances(entry); + _layerInstances[key] = instances; + + for (final layer in instances) { + if (layer != null) _map.operationalLayers.add(layer); + } + + try { + await Future.wait(instances.whereType().map((l) => l.load())); + _applyLayerSpecialCases(key, instances); + } catch (e) { + debugPrint('Layer $key load error: $e'); + } + + _startLayerRefreshTimer(key, entry); + + setState(() { + _layerVisible[key] = true; + _layerLoading[key] = false; + }); + } + + List _buildLayerInstances(LayerEntry entry) { + if (entry.hasSublayers) { + return entry.sublayers!.map(_layerFromSublayer).toList(); + } + return [_layerFromEntry(entry)]; + } + + Layer? _layerFromSublayer(SublayerEntry sub) { + if (sub.source == 'url' && sub.url != null) { + return sub.url!.contains('FeatureServer') + ? FeatureLayer.withFeatureTable( + ServiceFeatureTable.withUri(Uri.parse(sub.url!))) + : ArcGISMapImageLayer.withUri(Uri.parse(sub.url!)); + } + return null; + } + + Layer? _layerFromEntry(LayerEntry entry) { + if (entry.source == 'url' && entry.url != null) { + return entry.url!.contains('FeatureServer') + ? FeatureLayer.withFeatureTable( + ServiceFeatureTable.withUri(Uri.parse(entry.url!))) + : ArcGISMapImageLayer.withUri(Uri.parse(entry.url!)); + } + return null; + } + + void _applyLayerSpecialCases(String key, List instances) { + // campusDistricts: show only sublayer id 4 + if (key == 'campusDistricts' && + instances.isNotEmpty && + instances.first is ArcGISMapImageLayer) { + final imageLayer = instances.first as ArcGISMapImageLayer; + for (final sub in imageLayer.mapImageSublayers) { + sub.isVisible = sub.id == 4; + } + } + } + + void _startLayerRefreshTimer(String key, LayerEntry entry) { + final subs = entry.sublayers; + if (subs == null) return; + + int? capturedIdx; + int? interval; + for (int i = 0; i < subs.length; i++) { + if (subs[i].refreshInterval > 0) { + capturedIdx = i; + interval = subs[i].refreshInterval; + break; + } + } + if (capturedIdx == null || interval == null) return; + + final idx = capturedIdx; + final sub = subs[idx]; + + _layerTimers[key] = Timer.periodic(Duration(seconds: interval), (_) async { + if (!mounted) return; + final instances = _layerInstances[key]; + if (instances == null || idx >= instances.length) return; + + final oldLayer = instances[idx]; + if (oldLayer != null) _map.operationalLayers.remove(oldLayer); + + final newLayer = _layerFromSublayer(sub); + instances[idx] = newLayer; + if (newLayer != null) { + _map.operationalLayers.add(newLayer); + try { + await newLayer.load(); + } catch (e) { + debugPrint('Refresh error $key[$idx]: $e'); + } + } + }); + } + + Future _startLocationDisplay() async { + try { + await _locationDataSource.start(); + setState(() => _locationStarted = true); + } on ArcGISException catch (e) { + debugPrint('Location error: ${e.message}'); + } catch (e) { + debugPrint('Location error: $e'); + } + } + + void _onFocusChanged() { + if (_focusNode.hasFocus && _searchController.text.isEmpty) { + setState(() { + _showSuggestions = true; + _showResults = false; + }); + } + } + + void _onFromFocusChanged() { + if (_fromFocusNode.hasFocus) { + setState(() { + _activeRouteField = 'from'; + if (_fromController.text.isEmpty) { + _showSuggestions = true; + _showResults = false; + } + }); + if (_detailSheetController.isAttached) { + _detailSheetController.animateTo( + 0.15, + duration: const Duration(milliseconds: 250), + curve: Curves.easeOut, + ); + } + } + } + + void _onToFocusChanged() { + if (_toFocusNode.hasFocus) { + setState(() { + _activeRouteField = 'to'; + if (_toController.text.isEmpty) { + _showSuggestions = true; + _showResults = false; + } + }); + if (_detailSheetController.isAttached) { + _detailSheetController.animateTo( + 0.15, + duration: const Duration(milliseconds: 250), + curve: Curves.easeOut, + ); + } + } + } + + // --------------------------------------------------------------------------- + // Recent searches persistence + // --------------------------------------------------------------------------- + + Future _loadRecentSearches() async { + final prefs = await SharedPreferences.getInstance(); + final jsonStr = prefs.getString(_recentSearchesKey); + if (jsonStr != null) { + try { + final list = jsonDecode(jsonStr) as List; + setState(() { + _recentSearches = list + .map((e) => + MapSearchResult.fromJson(e as Map)) + .toList(); + }); + } catch (_) { + // ignore corrupted data + } + } + } + + Future _saveRecentSearches() async { + final prefs = await SharedPreferences.getInstance(); + final jsonStr = + jsonEncode(_recentSearches.map((r) => r.toJson()).toList()); + await prefs.setString(_recentSearchesKey, jsonStr); + } + + void _addToRecentSearches(MapSearchResult result) { + // Remove duplicate if exists (match by name + source) + _recentSearches.removeWhere( + (r) => r.name == result.name && r.source == result.source); + // Insert at front + _recentSearches.insert(0, result); + // Trim to max + if (_recentSearches.length > _maxRecentSearches) { + _recentSearches = _recentSearches.sublist(0, _maxRecentSearches); + } + _saveRecentSearches(); + } + + void _removeFromRecentSearches(int index) { + setState(() { + _recentSearches.removeAt(index); + }); + _saveRecentSearches(); + } + + // --------------------------------------------------------------------------- + // Query helpers + // --------------------------------------------------------------------------- + + /// GET from the REST API. + Future> _apiGet(String path, [Map? params]) async { + final uri = Uri.parse('$_baseUrl/$path').replace(queryParameters: params); + final response = await http.get(uri); + if (response.statusCode != 200) { + throw Exception('API error ${response.statusCode}: ${response.body}'); + } + return jsonDecode(response.body) as Map; + } + + Future> _apiPost(String path, Map body) async { + final response = await http.post( + Uri.parse('$_baseUrl/$path'), + headers: {'Content-Type': 'application/json'}, + body: jsonEncode(body), + ); + if (response.statusCode != 200) { + throw Exception('API error ${response.statusCode}: ${response.body}'); + } + return jsonDecode(response.body) as Map; + } + + Future> _queryBuildings(String query) async { + final data = await _apiGet('buildings', {'q': query}); + return (data['results'] as List? ?? []).map((r) { + return MapSearchResult( + name: r['name'] as String? ?? 'Unknown Building', + subtitle: r['subtitle'] as String? ?? 'Building', + latitude: (r['latitude'] as num?)?.toDouble() ?? 0.0, + longitude: (r['longitude'] as num?)?.toDouble() ?? 0.0, + source: MapSearchSource.building, + address: r['address'] as String? ?? '', + ); + }).where((r) => r.latitude != 0.0 && r.longitude != 0.0).toList(); + } + + Future _fetchAllPoiClasses() async { + try { + final data = await _apiGet('poi/classes'); + final classes = (data['classes'] as List? ?? []) + .map((c) => c as String) + .toList(); + setState(() => _allPoiClasses = classes); + } catch (e) { + debugPrint('Failed to fetch POI classes: $e'); + } + } + + Future> _queryPOIs(String query) async { + final data = await _apiGet('poi', {'q': query}); + return _parsePOIResults(data); + } + + Future> _queryPOIsByClass(String classValue) async { + final data = await _apiGet('poi', {'class': classValue, 'limit': '100'}); + return _parsePOIResults(data); + } + + List _parsePOIResults(Map data) { + return (data['results'] as List? ?? []).map((r) { + return MapSearchResult( + name: r['name'] as String? ?? 'Unknown POI', + subtitle: r['subtitle'] as String? ?? '', + latitude: (r['latitude'] as num?)?.toDouble() ?? 0.0, + longitude: (r['longitude'] as num?)?.toDouble() ?? 0.0, + source: MapSearchSource.poi, + description: r['description'] as String? ?? '', + websiteUrl: r['websiteUrl'] as String?, + ); + }).where((r) => r.latitude != 0.0 && r.longitude != 0.0).toList(); + } + + // --------------------------------------------------------------------------- + // Search actions + // --------------------------------------------------------------------------- + + /// Text search: query both buildings and POIs in parallel. + Future _performSearch(String query) async { + if (query.trim().isEmpty) return; + + // Recompute category matches on submit + final q = query.toLowerCase(); + final matched = _allPoiClasses + .where((c) => c.toLowerCase().contains(q)) + .toList(); + + for (final cat in _categories) { + if (cat.poiClassValue.toLowerCase().contains(q) && + !matched.contains(cat.poiClassValue)) { + matched.insert(0, cat.poiClassValue); + } + } + + setState(() { + _isSearching = true; + _showResults = true; + _showSuggestions = false; + _selectedResult = null; + _matchingPoiClasses = matched; + }); + + try { + final results = await Future.wait([ + _queryBuildings(query), + _queryPOIs(query), + ]); + final merged = [...results[0], ...results[1]]; + setState(() { + _searchResults = merged; + _isSearching = false; + }); + } catch (e) { + print('Search error: $e'); + setState(() { + _searchResults = []; + _isSearching = false; + }); + } + } + + /// Returns the current visible map extent projected to WGS84. + Envelope? _getViewportEnvelopeWGS84() { + final vp = _mapViewController.getCurrentViewpoint( + ViewpointType.boundingGeometry, + ); + if (vp == null) return null; + final geom = vp.targetGeometry; + if (geom == null) return null; + final projected = GeometryEngine.project( + geom, + outputSpatialReference: SpatialReference.wgs84, + ); + return projected as Envelope?; + } + + /// Filters a result list to only those within the current map viewport. + /// Returns the full list unchanged if the envelope can't be determined. + List _filterToViewport(List results) { + final env = _getViewportEnvelopeWGS84(); + if (env == null) return results; + return results.where((r) { + return r.latitude >= env.yMin && + r.latitude <= env.yMax && + r.longitude >= env.xMin && + r.longitude <= env.xMax; + }).toList(); + } + + /// distance in meters between two WGS84 points + double _distanceMeters( + double lat1, double lng1, double lat2, double lng2) { + const r = 6371000.0; + final dLat = (lat2 - lat1) * math.pi / 180; + final dLng = (lng2 - lng1) * math.pi / 180; + final a = math.sin(dLat / 2) * math.sin(dLat / 2) + + math.cos(lat1 * math.pi / 180) * + math.cos(lat2 * math.pi / 180) * + math.sin(dLng / 2) * + math.sin(dLng / 2); + return r * 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a)); + } + + /// Returns the user's current WGS84 lat/lng, or null if unavailable. + (double lat, double lng)? _getUserLatLng() { + final pos = _mapViewController.locationDisplay.location?.position; + if (pos == null) return null; + final wgs = GeometryEngine.project( + pos, + outputSpatialReference: SpatialReference.wgs84, + ) as ArcGISPoint?; + if (wgs == null) return null; + return (wgs.y, wgs.x); + } + + /// Plot a list of results as pins on the map. + void _plotResultsOnMap(List results) { + _graphicsOverlay.graphics.clear(); + _mappedResults = results; + for (int i = 0; i < results.length; i++) { + final result = results[i]; + final point = ArcGISPoint( + x: result.longitude, + y: result.latitude, + spatialReference: SpatialReference.wgs84, + ); + final graphic = Graphic( + geometry: point, + symbol: SimpleMarkerSymbol( + style: SimpleMarkerSymbolStyle.circle, + color: Colors.red, + size: 14, + ), + ); + // Store the list index so we can retrieve the result on tap + graphic.attributes['resultIndex'] = i; + _graphicsOverlay.graphics.add(graphic); + } + } + + /// Zoom the map to fit all mapped results, with padding. + void _zoomToResults(List results) { + if (results.isEmpty) return; + + if (results.length == 1) { + final r = results.first; + _mapViewController.setViewpointAnimated( + Viewpoint.fromCenter( + ArcGISPoint( + x: r.longitude, + y: r.latitude, + spatialReference: SpatialReference.wgs84, + ), + scale: 5000, + ), + ); + return; + } + + double minLat = results.map((r) => r.latitude).reduce((a, b) => a < b ? a : b); + double maxLat = results.map((r) => r.latitude).reduce((a, b) => a > b ? a : b); + double minLng = results.map((r) => r.longitude).reduce((a, b) => a < b ? a : b); + double maxLng = results.map((r) => r.longitude).reduce((a, b) => a > b ? a : b); + + const padding = 0.005; + final envelope = Envelope.fromXY( + xMin: minLng - padding, + yMin: minLat - padding, + xMax: maxLng + padding, + yMax: maxLat + padding, + spatialReference: SpatialReference.wgs84, + ); + _mapViewController.setViewpointAnimated( + Viewpoint.fromTargetExtent(envelope), + ); + } + + /// Category search: query POIs filtered by Class. + /// Category search: query POIs filtered by Class and plot all as map pins. + Future _performCategorySearch(_SearchCategory category) async { + setState(() { + _isSearching = true; + _showResults = false; + _showSuggestions = false; + _matchingPoiClasses = []; + _selectedResult = null; + _showCategoryList = false; + _activeCategory = category; + _searchController.text = category.label; + }); + _focusNode.unfocus(); + _fromFocusNode.unfocus(); + _toFocusNode.unfocus(); + + try { + final allResults = await _queryPOIsByClass(category.poiClassValue); + + // Always plot ALL pins — no zoom, no viewport filtering. + // The user pans/zooms freely to discover them. + _plotResultsOnMap(allResults); + + setState(() { + _allCategoryResults = allResults; + _showCategoryList = allResults.isNotEmpty; + _isSearching = false; + }); + } catch (e) { + print('Category search error: $e'); + setState(() { + _mappedResults = []; + _allCategoryResults = []; + _isSearching = false; + }); + } + } + + /// Triggers a category-style search from a raw POI class string. + Future _performClassSearch(String classValue) async { + final category = _SearchCategory( + label: _labelForClass(classValue), + icon: _iconForClass(classValue), + poiClassValue: classValue, + ); + await _performCategorySearch(category); + } + + /// Plots all results for the active category + void _seeAllCategoryResults() { + if (_allCategoryResults.isEmpty) return; + _zoomToResults(_allCategoryResults); + } + + void _selectResult(MapSearchResult result) { + // Handle result selection within route fields + if (_showRouteFields && _activeRouteField != null) { + if (_activeRouteField == 'from') { + _fromController.text = result.name; + _fromLatLng = (result.latitude, result.longitude); + _graphicsOverlay.graphics.clear(); + setState(() { + _showResults = false; + _showSuggestions = false; + _mappedResults = []; + _allCategoryResults = []; + _showCategoryList = false; + _activeCategory = null; + }); + _fromFocusNode.unfocus(); + // Re-solve route if we already have a destination + if (_routeDestination != null) { + _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + } + } else if (_activeRouteField == 'to') { + _toController.text = result.name; + _routeDestination = result; + _graphicsOverlay.graphics.clear(); + setState(() { + _selectedResult = result; + _lastSelectedResult = result; + _showResults = false; + _showSuggestions = false; + _mappedResults = []; + _allCategoryResults = []; + _showCategoryList = false; + _activeCategory = null; + }); + _toFocusNode.unfocus(); + _solveRoute(result, originLatLng: _fromLatLng); + } + _addToRecentSearches(result); + return; + } + + _graphicsOverlay.graphics.clear(); + + final point = ArcGISPoint( + x: result.longitude, + y: result.latitude, + spatialReference: SpatialReference.wgs84, + ); + + final graphic = Graphic( + geometry: point, + symbol: SimpleMarkerSymbol( + style: SimpleMarkerSymbolStyle.circle, + color: result.source == MapSearchSource.building + ? Colors.blue + : Colors.red, + size: 14, + ), + ); + _graphicsOverlay.graphics.add(graphic); + + _mapViewController.setViewpointAnimated( + Viewpoint.fromCenter(point, scale: 5000), + ); + + setState(() { + _showResults = false; + _showSuggestions = false; + _searchController.text = result.name; + _selectedResult = result; + _lastSelectedResult = result; + }); + _focusNode.unfocus(); + + // Save to recent searches + _addToRecentSearches(result); + } + + /// Called when the ArcGISMapView is tapped + /// Identifies any graphic at the tap location and shows its detail panel + Future _onMapTap(Offset screenPoint) async { + // Dismiss any open dropdowns first + if (_showSuggestions || _showResults) { + setState(() { + _showSuggestions = false; + _showResults = false; + }); + _focusNode.unfocus(); + return; + } + + // Only attempt identify when pins are on the map + if (_mappedResults.isEmpty) { + if (_selectedResult != null) _closeDetail(); + return; + } + + try { + final identifyResult = await _mapViewController.identifyGraphicsOverlay( + _graphicsOverlay, + screenPoint: screenPoint, + tolerance: 12.0, + maximumResults: 1, + ); + + if (identifyResult.graphics.isNotEmpty) { + final tappedGraphic = identifyResult.graphics.first; + final index = tappedGraphic.attributes['resultIndex'] as int?; + if (index != null && index >= 0 && index < _mappedResults.length) { + _selectResultFromPin(_mappedResults[index]); + } + } else { + // Tapped empty space — close detail if open + if (_selectedResult != null) _closeDetail(); + } + } catch (e) { + print('Identify error: $e'); + } + } + + /// Select a result from a map pin tap + /// keeps all existing category pins visible + void _selectResultFromPin(MapSearchResult result) { + // In routing mode, treat pin tap based on active route field + if (_showRouteFields) { + if (_activeRouteField == 'from') { + _fromController.text = result.name; + _fromLatLng = (result.latitude, result.longitude); + _graphicsOverlay.graphics.clear(); + setState(() { + _showResults = false; + _showSuggestions = false; + _mappedResults = []; + _allCategoryResults = []; + _showCategoryList = false; + _activeCategory = null; + }); + _fromFocusNode.unfocus(); + if (_routeDestination != null) { + _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + } + } else { + _toController.text = result.name; + _routeDestination = result; + _graphicsOverlay.graphics.clear(); + setState(() { + _selectedResult = result; + _lastSelectedResult = result; + _showResults = false; + _showSuggestions = false; + _mappedResults = []; + _allCategoryResults = []; + _showCategoryList = false; + _activeCategory = null; + }); + _toFocusNode.unfocus(); + _solveRoute(result, originLatLng: _fromLatLng); + } + _addToRecentSearches(result); + return; + } + + final point = ArcGISPoint( + x: result.longitude, + y: result.latitude, + spatialReference: SpatialReference.wgs84, + ); + + _mapViewController.setViewpointAnimated( + Viewpoint.fromCenter(point, scale: 5000), + ); + + setState(() { + _selectedResult = result; + _lastSelectedResult = result; + _searchController.text = result.name; + _showResults = false; + _showSuggestions = false; + _showCategoryList = false; + }); + _focusNode.unfocus(); + _addToRecentSearches(result); + } + + void _closeDetail() { + // If a category search is active and not in routing mode, reopen the list view + if (_allCategoryResults.isNotEmpty && + !_showRouteFields && !_hasRoute && !_routeFailed) { + setState(() { + _selectedResult = null; + _showCategoryList = true; + }); + } else { + _clearSearch(); + } + } + + void _recenterOnUser() { + if (!_locationStarted) { + _startLocationDisplay(); + return; + } + final loc = _mapViewController.locationDisplay.location; + if (loc == null) return; + + // Briefly snap to recenter mode, then release back to free pan + _mapViewController.locationDisplay.autoPanMode = + LocationDisplayAutoPanMode.recenter; + _ignoreViewpointReset = true; + setState(() => _isLocationActive = true); + Future.delayed(const Duration(milliseconds: 1500), () { + if (mounted) { + _ignoreViewpointReset = false; + _mapViewController.locationDisplay.autoPanMode = + LocationDisplayAutoPanMode.off; + } + }); + } + + void _recenterOnView() { + _ignoreViewpointReset = true; + setState(() => _isRecenterActive = true); + Future.delayed(const Duration(milliseconds: 1500), () { + if (mounted) _ignoreViewpointReset = false; + }); + if (_sceneMode != 'default') { + if (_sceneMode == 'building3d') { + _scene3DKey.currentState?.resetCamera(); + } else { + _sceneDroneKey.currentState?.resetCamera(); + } + return; + } + if (_selectedResult != null) { + _mapViewController.setViewpointAnimated( + Viewpoint.fromCenter( + ArcGISPoint( + x: _selectedResult!.longitude, + y: _selectedResult!.latitude, + spatialReference: SpatialReference.wgs84, + ), + scale: 5000, + ), + ); + } else if (_lastSelectedResult != null && _mappedResults.isEmpty) { + // Single pin on map, slide-over closed + _mapViewController.setViewpointAnimated( + Viewpoint.fromCenter( + ArcGISPoint( + x: _lastSelectedResult!.longitude, + y: _lastSelectedResult!.latitude, + spatialReference: SpatialReference.wgs84, + ), + scale: 5000, + ), + ); + } else if (_mappedResults.isNotEmpty) { + // Category pins on map + _zoomToResults(_mappedResults); + } else { + _mapViewController.setViewpointAnimated( + Viewpoint.fromCenter( + ArcGISPoint( + x: -117.2340, + y: 32.8801, + spatialReference: SpatialReference.wgs84, + ), + scale: 24000, + ), + ); + } + } + + void _clearSearch() { + _searchController.clear(); + _fromController.clear(); + _toController.clear(); + _graphicsOverlay.graphics.clear(); + _routeGraphicsOverlay.graphics.clear(); + setState(() { + _hasRoute = false; + _routeFailed = false; + _travelMode = 'Walking'; + _routeTravelTimeMinutes = 0; + _routeManeuvers = []; + _showRouteFields = false; + _searchResults = []; + _matchingPoiClasses = []; + _mappedResults = []; + _allCategoryResults = []; + _showResults = false; + _showSuggestions = false; + _showCategoryList = false; + _activeCategory = null; + _selectedResult = null; + _lastSelectedResult = null; + _activeRouteField = null; + _fromLatLng = null; + _routeDestination = null; + }); + } + + Future _launchWebsite(String url) async { + final uri = Uri.parse(url); + if (await canLaunchUrl(uri)) { + await launchUrl(uri, mode: LaunchMode.externalApplication); + } + } + + // --------------------------------------------------------------------------- + // Routing + // --------------------------------------------------------------------------- + +/* Future _launchDirections(MapSearchResult result) async { + final uri = Uri.parse( + 'https://www.google.com/maps/dir/?api=1' + '&destination=${result.latitude},${result.longitude}', + ); + if (await canLaunchUrl(uri)) { + await launchUrl(uri, mode: LaunchMode.externalApplication); + } + } */ + + static const _routeServiceUrl = + 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/' + 'Wayfinding/Campus_Wayfinding_Network/NAServer/Route'; + + Future _solveRoute(MapSearchResult destination, {String? travelMode, (double, double)? originLatLng}) async { + // Use provided origin or fall back to GPS + final userLatLng = originLatLng ?? _getUserLatLng(); + if (userLatLng == null) { + setState(() => _isRouting = false); + return; + } + + final mode = travelMode ?? _travelMode; + + setState(() { + _isRouting = true; + _routeFailed = false; + _travelMode = mode; + }); + + try { + final routeTask = RouteTask.withUri(Uri.parse(_routeServiceUrl)); + await routeTask.load(); + + final params = await routeTask.createDefaultParameters(); + params.returnDirections = true; + final taskInfo = routeTask.getRouteTaskInfo(); + final matchingMode = taskInfo.travelModes + .where((m) => m.name == mode) + .firstOrNull; + if (matchingMode != null) { + params.travelMode = matchingMode; + } + + final origin = Stop(ArcGISPoint( + x: userLatLng.$2, + y: userLatLng.$1, + spatialReference: SpatialReference.wgs84, + )); + final dest = Stop(ArcGISPoint( + x: destination.longitude, + y: destination.latitude, + spatialReference: SpatialReference.wgs84, + )); + params.setStops([origin, dest]); + + final result = await routeTask.solveRoute(params); + if (result.routes.isEmpty) { + setState(() { + _isRouting = false; + _routeFailed = true; + }); + return; + } + + final route = result.routes.first; + _routeTravelTimeMinutes = route.totalTime; + _routeManeuvers = route.directionManeuvers; + + final routeGeometry = route.routeGeometry; + if (routeGeometry == null) { + setState(() { + _isRouting = false; + _routeFailed = true; + }); + return; + } + + _routeGraphicsOverlay.graphics.clear(); + final routeGraphic = Graphic( + geometry: routeGeometry, + symbol: SimpleLineSymbol( + style: SimpleLineSymbolStyle.solid, + color: Colors.blue, + width: 4, + ), + ); + _routeGraphicsOverlay.graphics.add(routeGraphic); + + // End point marker + final whiteOutline = SimpleLineSymbol( + style: SimpleLineSymbolStyle.solid, + color: Colors.white, + width: 2, + ); + _routeGraphicsOverlay.graphics.add(Graphic( + geometry: ArcGISPoint( + x: destination.longitude, + y: destination.latitude, + spatialReference: SpatialReference.wgs84, + ), + symbol: SimpleMarkerSymbol( + style: SimpleMarkerSymbolStyle.circle, + color: Colors.red, + size: 12, + )..outline = whiteOutline, + )); + + // Start point marker (only when origin is not GPS) + if (originLatLng != null) { + _routeGraphicsOverlay.graphics.add(Graphic( + geometry: ArcGISPoint( + x: originLatLng.$2, + y: originLatLng.$1, + spatialReference: SpatialReference.wgs84, + ), + symbol: SimpleMarkerSymbol( + style: SimpleMarkerSymbolStyle.circle, + color: Colors.blue, + size: 12, + )..outline = whiteOutline, + )); + } + + // Zoom to the route extent with extra bottom padding so the line + // stays centred in the visible map area above the detail slide-over. + final extent = routeGeometry.extent; + final dx = extent.width * 0.2; + final dyTop = extent.height * 0.5; + final dyBottom = extent.height * 0.75; + final paddedExtent = Envelope.fromXY( + xMin: extent.xMin - dx, + yMin: extent.yMin - dyBottom, + xMax: extent.xMax + dx, + yMax: extent.yMax + dyTop, + spatialReference: extent.spatialReference, + ); + _routePaddedExtent = paddedExtent; + _mapViewController.setViewpointAnimated( + Viewpoint.fromTargetExtent(paddedExtent), + ); + + _graphicsOverlay.graphics.clear(); + _mappedResults = []; + _allCategoryResults = []; + + setState(() { + _isRouting = false; + _hasRoute = true; + _showCategoryList = false; + _activeCategory = null; + _selectedResult = destination; + _lastSelectedResult = destination; + }); + } catch (e) { + debugPrint('Route solve error: $e'); + setState(() { + _isRouting = false; + _routeFailed = true; + }); + } + } + + void _onAiLocationSelected(AiSearchResult result) { + _searchController.text = result.name; + final point = ArcGISPoint( + x: result.longitude, + y: result.latitude, + spatialReference: SpatialReference.wgs84, + ); + _graphicsOverlay.graphics.clear(); + _graphicsOverlay.graphics.add(Graphic( + geometry: point, + symbol: SimpleMarkerSymbol( + style: SimpleMarkerSymbolStyle.circle, + color: Colors.red, + size: 14, + ), + )); + _mapViewController.setViewpointAnimated( + Viewpoint.fromCenter(point, scale: 5000), + ); + final mapResult = MapSearchResult( + name: result.name, + subtitle: result.subtitle, + latitude: result.latitude, + longitude: result.longitude, + source: MapSearchSource.poi, + address: result.address, + ); + setState(() { + _selectedResult = mapResult; + _lastSelectedResult = mapResult; + _showResults = false; + _showSuggestions = false; + }); + } + + void _onAiRouteRequested(List stops) { + if (stops.length < 2) return; + final first = stops.first; + final last = stops.last; + final destination = MapSearchResult( + name: last.name, + subtitle: last.subtitle, + latitude: last.latitude, + longitude: last.longitude, + source: MapSearchSource.poi, + address: last.address, + ); + _toController.text = destination.name; + _routeDestination = destination; + final gps = _getUserLatLng(); + _fromController.text = gps != null ? 'My Location' : first.name; + _fromLatLng = gps ?? (first.latitude, first.longitude); + _graphicsOverlay.graphics.clear(); + setState(() { + _showRouteFields = true; + _selectedResult = destination; + _lastSelectedResult = destination; + _mappedResults = []; + _allCategoryResults = []; + _showCategoryList = false; + _activeCategory = null; + }); + _solveRoute(destination, originLatLng: _fromLatLng); + } + + void _clearRoute() { + _routeGraphicsOverlay.graphics.clear(); + _fromController.clear(); + _toController.clear(); + _routePaddedExtent = null; + + // Re-add destination pin and center on it if a result is still selected + final destination = _selectedResult; + if (destination != null) { + final point = ArcGISPoint( + x: destination.longitude, + y: destination.latitude, + spatialReference: SpatialReference.wgs84, + ); + _graphicsOverlay.graphics.clear(); + _graphicsOverlay.graphics.add(Graphic( + geometry: point, + symbol: SimpleMarkerSymbol( + style: SimpleMarkerSymbolStyle.circle, + color: destination.source == MapSearchSource.building + ? Colors.blue + : Colors.red, + size: 14, + ), + )); + _mapViewController.setViewpointAnimated( + Viewpoint.fromCenter(point, scale: 5000), + ); + } + + setState(() { + _hasRoute = false; + _routeFailed = false; + _travelMode = 'Walking'; + _routeTravelTimeMinutes = 0; + _routeManeuvers = []; + _showRouteFields = false; + _activeRouteField = null; + _fromLatLng = null; + _routeDestination = null; + }); + } + + IconData _iconForResult(MapSearchResult result) { + return result.source == MapSearchSource.building + ? Icons.business + : Icons.place; + } + + /// Returns the icon for a POI class — uses the hardcoded category icon if one + /// exists, otherwise falls back to a generic place icon. + IconData _iconForClass(String classValue) { + return _categories + .firstWhere( + (c) => c.poiClassValue.toLowerCase() == classValue.toLowerCase(), + orElse: () => const _SearchCategory( + label: '', icon: Icons.place, poiClassValue: ''), + ) + .icon; + } + + /// Converts a raw class value like "Food and Beverage" into a display label. + /// Uses the hardcoded category label if available, otherwise returns as-is. + String _labelForClass(String classValue) { + final match = _categories.where( + (c) => c.poiClassValue.toLowerCase() == classValue.toLowerCase()); + return match.isNotEmpty ? match.first.label : classValue; + } + + // --------------------------------------------------------------------------- + // Suggestions panel (categories + recent searches) + // --------------------------------------------------------------------------- + + Widget _buildSuggestionsPanel(BuildContext context) { + final isDark = Theme.of(context).brightness == Brightness.dark; + final bgColor = isDark ? Colors.grey[850] : Colors.white; + + return Material( + elevation: 4, + borderRadius: BorderRadius.circular(8), + color: bgColor, + child: Padding( + padding: EdgeInsets.only( + top: (_showRouteFields && _activeRouteField == 'from') ? 0 : 12, + bottom: 12, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // user location from from field in routing mode + if (_showRouteFields && _activeRouteField == 'from') ...[ + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + final gps = _getUserLatLng(); + if (gps == null) return; + _fromController.text = 'My Location'; + _fromLatLng = gps; + setState(() { + _showSuggestions = false; + _showResults = false; + }); + _fromFocusNode.unfocus(); + if (_routeDestination != null) { + _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + } + }, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 20), + child: Row( + children: [ + Icon( + Icons.my_location, + size: 20, + color: isDark ? Colors.grey[500] : Theme.of(context).colorScheme.primary, + ), + SizedBox(width: 12), + Text( + 'Current Location', + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w500, + color: isDark ? Colors.white : Theme.of(context).colorScheme.primary, + ), + ), + ], + ), + ), + ), + Divider(height: 1), + SizedBox(height: 12), + ], + // Category section header + Padding( + padding: EdgeInsets.symmetric(horizontal: 16), + child: Text( + 'Suggested', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + ), + ), + SizedBox(height: 12), + + // Category icons row + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: _categories + .map((cat) => _buildCategoryChip(context, cat)) + .toList(), + ), + ), + + // Recent searches section + if (_recentSearches.isNotEmpty) ...[ + SizedBox(height: 16), + Divider(height: 1), + SizedBox(height: 8), + Padding( + padding: EdgeInsets.symmetric(horizontal: 16), + child: Text( + 'Recently viewed', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + ), + ), + SizedBox(height: 4), + ...List.generate(_recentSearches.length, (index) { + final recent = _recentSearches[index]; + return ListTile( + splashColor: Colors.transparent, + dense: true, + leading: Icon( + Icons.history, + size: 20, + color: isDark ? Colors.grey[500] : Colors.grey[400], + ), + title: Text( + recent.name, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + trailing: GestureDetector( + onTap: () => _removeFromRecentSearches(index), + child: Icon( + Icons.close, + size: 16, + color: isDark ? Colors.grey[500] : Colors.grey[400], + ), + ), + onTap: () => _selectResult(recent), + ); + }), + ], + ], + ), + ), + ); + } + + Widget _buildCategoryChip(BuildContext context, _SearchCategory category) { + final isDark = Theme.of(context).brightness == Brightness.dark; + + return GestureDetector( + onTap: () => _performCategorySearch(category), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + width: 56, + height: 56, + decoration: BoxDecoration( + color: category.color, + shape: BoxShape.circle, + ), + child: Icon( + category.icon, + size: 24, + color: Colors.black, + ), + ), + SizedBox(height: 6), + Text( + category.label, + style: TextStyle( + fontSize: 13, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + ), + ], + ), + ); + } + + // --------------------------------------------------------------------------- + // Map interaction → collapse slideover + // --------------------------------------------------------------------------- + + void _onMapPointerDown(PointerDownEvent _) { + // Close layers panel when user touches the map + if (_showLayersPanel) { + setState(() => _showLayersPanel = false); + return; + } + // Collapse whichever sheet is active to the minimum snap + if (_showCategoryList && _selectedResult == null) { + if (_categorySheetController.isAttached) { + _categorySheetController.animateTo( + 0.15, + duration: const Duration(milliseconds: 250), + curve: Curves.easeOut, + ); + } + } + if (_selectedResult != null) { + if (_detailSheetController.isAttached) { + _detailSheetController.animateTo( + 0.15, + duration: const Duration(milliseconds: 250), + curve: Curves.easeOut, + ); + } + } + } + + // --------------------------------------------------------------------------- + // Shared slide-over template + // --------------------------------------------------------------------------- + + /// Builds a consistent DraggableScrollableSheet with a pinned header. + /// [headerTitle] and [headerIcon] are shown in the header row. + /// [onClose] is called when the X button is tapped. + /// [trailing] is an optional widget shown before the close button (e.g. "Search here"). + /// [sliverBody] is the scrollable content below the header. + static const _slideOverHeaderHeight = 80.0; + + Widget _buildSlideOverContent({ + required BuildContext context, + required ScrollController scrollController, + required String headerTitle, + IconData? headerIcon, + required VoidCallback onClose, + Widget? trailing, + required List sliverBody, + }) { + final isDark = Theme.of(context).brightness == Brightness.dark; + final bgColor = isDark ? Colors.grey[900]! : Colors.white; + + return Material( + elevation: 8, + color: bgColor, + borderRadius: const BorderRadius.vertical(top: Radius.circular(16)), + clipBehavior: Clip.antiAlias, + child: CustomScrollView( + controller: scrollController, + slivers: [ + SliverPersistentHeader( + pinned: true, + delegate: _SlideOverHeaderDelegate( + height: _slideOverHeaderHeight, + backgroundColor: bgColor, + child: Column( + children: [ + // Drag handle + Padding( + padding: const EdgeInsets.only(top: 10, bottom: 4), + child: Container( + width: 36, + height: 4, + decoration: BoxDecoration( + color: isDark ? Colors.grey[700] : Colors.grey[300], + borderRadius: BorderRadius.circular(2), + ), + ), + ), + // Header row + Padding( + padding: const EdgeInsets.fromLTRB(20, 6, 20, 8), + child: Row( + children: [ + if (headerIcon != null) ...[ + Icon( + headerIcon, + size: 18, + color: isDark ? Colors.white70 : Colors.grey[700], + ), + const SizedBox(width: 8), + ], + Expanded( + child: Text( + headerTitle, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: isDark ? Colors.white : Colors.grey[900], + ), + ), + ), + if (trailing != null) trailing!, + GestureDetector( + onTap: onClose, + child: Container( + width: 34, + height: 34, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: + isDark ? Colors.grey[800] : Colors.grey[200], + ), + child: Icon( + Icons.close, + size: 18, + color: isDark ? Colors.white70 : Colors.grey[700], + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + // Divider below header + SliverToBoxAdapter( + child: Divider(height: 1), + ), + ...sliverBody, + ], + ), + ); + } + + // --------------------------------------------------------------------------- + // List view + // --------------------------------------------------------------------------- + Widget _buildCategoryListPanel(BuildContext context) { + final isDark = Theme.of(context).brightness == Brightness.dark; + final label = _activeCategory?.label ?? 'Results'; + + final viewport = _filterToViewport(_allCategoryResults); + final userPos = _getUserLatLng(); + final results = List.from(viewport); + if (userPos != null) { + results.sort((a, b) => + _distanceMeters(userPos.$1, userPos.$2, a.latitude, a.longitude) + .compareTo( + _distanceMeters( + userPos.$1, userPos.$2, b.latitude, b.longitude))); + } + + // Content-aware sizing: estimate content height as fraction of screen + final screenHeight = MediaQuery.of(context).size.height; + // Each list tile ~56px + header ~80px + divider + final contentHeight = + _slideOverHeaderHeight + (results.length * 56.0).clamp(56.0, 600.0); + final contentFraction = (contentHeight / screenHeight).clamp(0.15, 0.80); + final initialSize = + contentFraction < 0.45 ? contentFraction : 0.45; + final maxSize = contentFraction < 0.80 ? contentFraction.clamp(0.45, 0.80) : 0.80; + // Snap sizes must be strictly increasing and within [min, max] + final snaps = [0.15]; + if (initialSize > 0.15 + 0.01) snaps.add(initialSize); + + return DraggableScrollableSheet( + controller: _categorySheetController, + initialChildSize: initialSize, + minChildSize: 0.15, + maxChildSize: maxSize, + snap: true, + snapSizes: snaps, + builder: (context, scrollController) { + final headerTitle = results.isEmpty + ? '$label - None in view' + : '$label - ${results.length} in view'; + + return _buildSlideOverContent( + context: context, + scrollController: scrollController, + headerTitle: headerTitle, + headerIcon: _activeCategory?.icon ?? Icons.place, + onClose: _clearSearch, + trailing: _allCategoryResults.length > results.length + ? TextButton.icon( + icon: Icon( + Icons.layers_outlined, + size: 16, + color: isDark ? Colors.white54 : Colors.grey[600], + ), + label: Text( + 'See all ${_allCategoryResults.length} results', + style: TextStyle( + fontSize: 13, + color: isDark ? Colors.white54 : Colors.grey[600], + ), + ), + style: TextButton.styleFrom( + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + minimumSize: Size.zero, + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), + ), + onPressed: _seeAllCategoryResults, + ) + : null, + sliverBody: results.isEmpty + ? [ + SliverToBoxAdapter( + child: Padding( + padding: const EdgeInsets.all(24), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Icon(Icons.location_off, + size: 32, + color: isDark + ? Colors.grey[600] + : Colors.grey[400]), + const SizedBox(height: 8), + Text( + 'No $label in current view.\nPan the map to see results.', + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 16, + color: isDark + ? Colors.grey[500] + : Colors.grey[600], + ), + ), + ], + ), + ), + ), + ] + : [ + SliverList( + delegate: SliverChildBuilderDelegate( + (context, index) { + final r = results[index]; + final dist = userPos != null + ? _distanceMeters(userPos.$1, userPos.$2, + r.latitude, r.longitude) + : null; + final distLabel = dist == null + ? null + : dist < 1000 + ? '${dist.round()} m away' + : '${(dist / 1000).toStringAsFixed(1)} km away'; + + return Column( + children: [ + ListTile( + splashColor: Colors.transparent, + leading: Icon( + _iconForResult(r), + size: 20, + color: isDark + ? Colors.grey[400] + : Colors.grey[600], + ), + title: Text( + r.name, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: const TextStyle(fontSize: 16), + ), + subtitle: distLabel != null + ? Text(distLabel, + style: TextStyle( + fontSize: 13, + color: Colors.grey[500], + )) + : (r.subtitle.isNotEmpty + ? Text(r.subtitle, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: + const TextStyle(fontSize: 13)) + : null), + dense: true, + onTap: () => _selectResultFromPin(r), + ), + if (index < results.length - 1) + const Divider(height: 1), + ], + ); + }, + childCount: results.length, + ), + ), + ], + ); + }, + ); + } + + // --------------------------------------------------------------------------- + // Detail slide-over + // --------------------------------------------------------------------------- + + Widget _buildDetailSlideOver(BuildContext context, MapSearchResult result) { + final isDark = Theme.of(context).brightness == Brightness.dark; + final isRouting = _showRouteFields || _hasRoute || _routeFailed; + + final detailText = result.source == MapSearchSource.building + ? result.address + : result.description; + final categoryLabel = result.source == MapSearchSource.building + ? 'Building' + : result.subtitle; + + // Content-aware sizing: estimate how tall the detail content is + final screenHeight = MediaQuery.of(context).size.height; + // header ~80 + name ~30 + detail ~20 + buttons ~48 + padding ~40 + double contentEst = _slideOverHeaderHeight + 30 + 48 + 40; + if (detailText.isNotEmpty) contentEst += 60; + if (_hasRoute && _routeManeuvers.isNotEmpty) contentEst += _routeManeuvers.length * 52.0; + final contentFraction = (contentEst / screenHeight).clamp(0.15, 0.80); + final initialSize = + _hasRoute ? 0.35 : (contentFraction < 0.30 ? contentFraction : 0.30); + final maxSize = _hasRoute + ? 0.80 + : (contentFraction < 0.80 ? contentFraction.clamp(0.30, 0.80) : 0.80); + // Snap sizes must be strictly increasing and within [min, max] + final snaps = [0.15]; + if (initialSize > 0.15 + 0.01) snaps.add(initialSize); + + return DraggableScrollableSheet( + controller: _detailSheetController, + initialChildSize: initialSize, + minChildSize: 0.15, + maxChildSize: maxSize, + snap: true, + snapSizes: snaps, + builder: (context, scrollController) { + return _buildSlideOverContent( + context: context, + scrollController: scrollController, + headerTitle: isRouting + ? 'Directions to ${result.name}' + : result.name, + headerIcon: _iconForResult(result), + onClose: isRouting ? _clearRoute : _closeDetail, + sliverBody: [ + SliverToBoxAdapter( + child: Padding( + padding: const EdgeInsets.fromLTRB(20, 8, 20, 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Category label (hidden in routing mode) + if (!isRouting) + Text( + categoryLabel, + style: TextStyle( + fontSize: 14, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + ), + + // Detail text (hidden in routing mode) + if (!isRouting && detailText.isNotEmpty) ...[ + const SizedBox(height: 8), + Text( + detailText, + style: TextStyle( + fontSize: 16, + color: + isDark ? Colors.grey[400] : Colors.grey[600], + ), + maxLines: 3, + overflow: TextOverflow.ellipsis, + ), + ], + if (!isRouting) const SizedBox(height: 16), + + // Action buttons + if (_routeFailed) ...[ + Text( + 'No route available from your current location.', + style: TextStyle( + fontSize: 16, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + ), + const SizedBox(height: 12), + SizedBox( + width: double.infinity, + child: FilledButton.icon( + onPressed: () => _launchWebsite( + 'https://www.google.com/maps/dir/?api=1' + '&destination=${_routeDestination?.latitude ?? result.latitude},${_routeDestination?.longitude ?? result.longitude}' + '&travelmode=walking' + '${_fromLatLng != null ? '&origin=${_fromLatLng!.$1},${_fromLatLng!.$2}' : ''}', + ), + icon: const Icon(Icons.map_outlined, size: 18), + label: const Text('Navigate in Google Maps'), + style: FilledButton.styleFrom( + padding: + const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + ), + ), + ] else if (_hasRoute) ...[ + // Travel time + Row( + children: [ + Icon( + Icons.schedule, + size: 18, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + const SizedBox(width: 6), + Text( + _routeTravelTimeMinutes < 1 + ? '< 1 min' + : '${_routeTravelTimeMinutes.ceil()} min', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: isDark ? Colors.white : Colors.grey[900], + ), + ), + ], + ), + const SizedBox(height: 12), + + // Travel mode toggle chips + Row( + children: [ + for (final mode in ['Walking', 'Accessible']) ...[ + if (mode != 'Walking') const SizedBox(width: 8), + GestureDetector( + onTap: _isRouting || mode == _travelMode + ? null + : () => _solveRoute(result, travelMode: mode, originLatLng: _fromLatLng), + child: Container( + padding: const EdgeInsets.symmetric( + horizontal: 14, vertical: 8), + decoration: BoxDecoration( + color: mode == _travelMode + ? (isDark + ? Colors.white + : Colors.grey[900]) + : (isDark + ? Colors.grey[800] + : Colors.grey[100]), + borderRadius: BorderRadius.circular(16), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + mode == 'Walking' + ? Icons.directions_walk + : Icons.accessible, + size: 16, + color: mode == _travelMode + ? (isDark + ? Colors.grey[900] + : Colors.white) + : (isDark + ? Colors.white70 + : Colors.grey[700]), + ), + const SizedBox(width: 6), + Text( + mode, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w500, + color: mode == _travelMode + ? (isDark + ? Colors.grey[900] + : Colors.white) + : (isDark + ? Colors.white70 + : Colors.grey[700]), + ), + ), + ], + ), + ), + ), + ], + ], + ), + const SizedBox(height: 12), + + // Navigate in Google Maps button + SizedBox( + width: double.infinity, + child: OutlinedButton.icon( + onPressed: () => _launchWebsite( + 'https://www.google.com/maps/dir/?api=1' + '&destination=${_routeDestination?.latitude ?? result.latitude},${_routeDestination?.longitude ?? result.longitude}' + '&travelmode=walking' + '${_fromLatLng != null ? '&origin=${_fromLatLng!.$1},${_fromLatLng!.$2}' : ''}', + ), + icon: const Icon(Icons.map_outlined, size: 18), + label: const Text('Navigate in Google Maps'), + style: OutlinedButton.styleFrom( + foregroundColor: isDark + ? const Color(0xFFFFCD00) + : null, + side: isDark + ? const BorderSide( + color: Color(0xFFFFCD00)) + : null, + padding: + const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + ), + ), + ] else + Row( + children: [ + if (result.websiteUrl != null) ...[ + Expanded( + child: OutlinedButton.icon( + onPressed: () => + _launchWebsite(result.websiteUrl!), + icon: const Icon(Icons.language, size: 18), + label: const Text('View website'), + style: OutlinedButton.styleFrom( + foregroundColor: isDark + ? const Color(0xFFFFCD00) + : null, + side: isDark + ? const BorderSide( + color: Color(0xFFFFCD00)) + : null, + padding: const EdgeInsets.symmetric( + vertical: 12), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + ), + ), + const SizedBox(width: 12), + ], + Expanded( + child: FilledButton.icon( + onPressed: _isRouting + ? null + : () { + final gps = _getUserLatLng(); + _fromController.text = + gps != null ? 'My Location' : ''; + _toController.text = result.name; + _routeDestination = result; + _graphicsOverlay.graphics.clear(); + setState(() { + _showRouteFields = true; + _selectedResult = null; + _mappedResults = []; + _allCategoryResults = []; + _showCategoryList = false; + _activeCategory = null; + }); + _solveRoute(result); + }, + icon: _isRouting + ? const SizedBox( + width: 18, + height: 18, + child: CircularProgressIndicator( + strokeWidth: 2, + color: Colors.white, + ), + ) + : const Icon(Icons.directions, size: 18), + label: Text( + _isRouting ? 'Routing...' : 'Get Directions'), + style: FilledButton.styleFrom( + padding: + const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + ), + ), + ], + ), + ], + ), + ), + ), + // Direction maneuver steps (when route is active) + if (_hasRoute && _routeManeuvers.isNotEmpty) + SliverList( + delegate: SliverChildBuilderDelegate( + (context, index) { + final step = _routeManeuvers[index]; + final distMeters = step.length; + final distLabel = distMeters < 1000 + ? '${distMeters.round()} m' + : '${(distMeters / 1000).toStringAsFixed(1)} km'; + return Column( + children: [ + if (index == 0) const Divider(height: 1), + ListTile( + leading: Icon( + Icons.subdirectory_arrow_right, + size: 20, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + title: Text( + step.directionText, + style: const TextStyle(fontSize: 14), + ), + trailing: distMeters > 0 + ? Text( + distLabel, + style: TextStyle( + fontSize: 13, + color: isDark + ? Colors.grey[500] + : Colors.grey[500], + ), + ) + : null, + dense: true, + ), + if (index < _routeManeuvers.length - 1) + const Divider(height: 1), + ], + ); + }, + childCount: _routeManeuvers.length, + ), + ), + ], + ); + }, + ); + } + + // --------------------------------------------------------------------------- + // Build + // --------------------------------------------------------------------------- + + @override + Widget build(BuildContext context) { + super.build(context); + final isDark = Theme.of(context).brightness == Brightness.dark; + final keyboardVisible = MediaQuery.of(context).viewInsets.bottom > 0; + + return Scaffold( + body: Stack( + children: [ + // Map — swaps between 2D ArcGISMapView and 3D ArcGISSceneView + Column( + children: [ + Expanded( + child: IndexedStack( + index: _sceneMode == 'building3d' ? 1 + : _sceneMode == 'droneView' ? 2 + : 0, + children: [ + Listener( + onPointerDown: _onMapPointerDown, + child: ArcGISMapView( + controllerProvider: () => _mapViewController, + onMapViewReady: _onMapViewReady, + onTap: _onMapTap, + ), + ), + _scene3DWidget ?? const SizedBox.shrink(), + _sceneDroneWidget ?? const SizedBox.shrink(), + ], + ), + ), + ], + ), + + // Floating search bar + dropdown — hidden in 3D/Drone View modes + if (_sceneMode == 'default') + Positioned( + top: 8, + left: 12, + right: 12, + child: Column( + children: [ + // Search bar / route fields + if (_showRouteFields) + Material( + elevation: 4, + borderRadius: BorderRadius.circular(8), + color: isDark ? Colors.grey[850] : Colors.white, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 4), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + // Left dot column + Padding( + padding: const EdgeInsets.only(left: 14), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Icon(Icons.circle_outlined, + size: 12, + color: Colors.blue), + Container( + width: 1.5, + height: 24, + color: isDark + ? Colors.grey[600] + : Colors.grey[300], + ), + Icon(Icons.circle, + size: 12, + color: Colors.red), + ], + ), + ), + // Text fields + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + children: [ + Expanded( + child: TextField( + controller: _fromController, + focusNode: _fromFocusNode, + style: const TextStyle(fontSize: 16), + decoration: const InputDecoration( + border: InputBorder.none, + contentPadding: + EdgeInsets.symmetric( + horizontal: 10, + vertical: 14), + hintText: 'From', + isDense: true, + ), + onTap: () { + setState(() { + _activeRouteField = 'from'; + _showSuggestions = true; + _showResults = false; + }); + }, + onChanged: (text) { + _fromLatLng = null; + if (text.length >= 3) { + _performSearch(text); + } else if (text.isEmpty) { + setState(() { + _showResults = false; + _showSuggestions = true; + }); + } else { + setState(() { + _showResults = false; + _showSuggestions = false; + }); + } + }, + ), + ), + if (_fromController.text.isNotEmpty) + SizedBox( + width: 28, + height: 28, + child: IconButton( + padding: EdgeInsets.zero, + icon: Icon(Icons.close, + size: 16, + color: isDark + ? Colors.white70 + : Colors.grey[600]), + onPressed: () { + _fromController.clear(); + _fromLatLng = null; + setState(() => + _showSuggestions = true); + }, + ), + ), + ], + ), + Divider(height: 1, indent: 10, endIndent: 10), + Row( + children: [ + Expanded( + child: TextField( + controller: _toController, + focusNode: _toFocusNode, + style: const TextStyle(fontSize: 16), + decoration: const InputDecoration( + border: InputBorder.none, + contentPadding: + EdgeInsets.symmetric( + horizontal: 10, + vertical: 14), + hintText: 'To', + isDense: true, + ), + onTap: () { + setState(() { + _activeRouteField = 'to'; + _showSuggestions = true; + _showResults = false; + }); + }, + onChanged: (text) { + if (text.length >= 3) { + _performSearch(text); + } else if (text.isEmpty) { + setState(() { + _showResults = false; + _showSuggestions = true; + }); + } else { + setState(() { + _showResults = false; + _showSuggestions = false; + }); + } + }, + ), + ), + if (_toController.text.isNotEmpty) + SizedBox( + width: 28, + height: 28, + child: IconButton( + padding: EdgeInsets.zero, + icon: Icon(Icons.close, + size: 16, + color: isDark + ? Colors.white70 + : Colors.grey[600]), + onPressed: () { + _toController.clear(); + setState(() => + _showSuggestions = true); + }, + ), + ), + ], + ), + ], + ), + ), + // Close + Swap buttons + Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + width: 36, + height: 36, + child: IconButton( + padding: EdgeInsets.zero, + icon: Icon(Icons.close, + size: 20, + color: Colors.redAccent), + onPressed: _clearRoute, + ), + ), + SizedBox( + width: 36, + height: 36, + child: IconButton( + padding: EdgeInsets.zero, + icon: Icon(Icons.swap_vert, + size: 20, + color: isDark + ? Colors.white70 + : Colors.grey[600]), + onPressed: () { + final tmpText = _fromController.text; + final tmpLatLng = _fromLatLng; + _fromController.text = _toController.text; + _toController.text = tmpText; + setState(() { + _fromLatLng = _routeDestination != null + ? (_routeDestination!.latitude, _routeDestination!.longitude) + : null; + _routeDestination = tmpLatLng != null + ? MapSearchResult( + name: tmpText, + subtitle: '', + latitude: tmpLatLng.$1, + longitude: tmpLatLng.$2, + source: MapSearchSource.building, + ) + : null; + }); + if (_routeDestination != null && _fromLatLng != null) { + _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + } + }, + ), + ), + ], + ), + const SizedBox(width: 4), + ], + ), + ), + ) + else + Material( + elevation: 4, + borderRadius: BorderRadius.circular(8), + color: isDark ? Colors.grey[850] : Colors.white, + child: Row( + children: [ + Padding( + padding: EdgeInsets.only(left: 12), + child: Icon( + Icons.search, + color: isDark ? Colors.white70 : Colors.grey[600], + ), + ), + Expanded( + child: TextField( + controller: _searchController, + focusNode: _focusNode, + textInputAction: TextInputAction.search, + onSubmitted: _performSearch, + onChanged: (text) { + if (text.isEmpty) { + setState(() { + _showResults = false; + _searchResults = []; + _matchingPoiClasses = []; + _showSuggestions = _focusNode.hasFocus; + }); + } else { + final q = text.toLowerCase(); + // Match against server-fetched classes + final matched = _allPoiClasses + .where((c) => c.toLowerCase().contains(q)) + .toList(); + + // Always include hardcoded category class values as a fallback + // so chips appear even if the server fetch is still in flight + for (final cat in _categories) { + if (cat.poiClassValue.toLowerCase().contains(q) && + !matched.contains(cat.poiClassValue)) { + matched.insert(0, cat.poiClassValue); + } + } + + setState(() { + _showSuggestions = false; + _matchingPoiClasses = matched; + }); + } + }, + onTap: () { + // Close detail panel when user taps search bar + if (_selectedResult != null) { + setState(() { + _selectedResult = null; + }); + } + // Show suggestions if text is empty + if (_searchController.text.isEmpty) { + setState(() { + _showSuggestions = true; + _showResults = false; + }); + } + }, + style: TextStyle(fontSize: 16), + decoration: InputDecoration( + border: InputBorder.none, + contentPadding: EdgeInsets.symmetric( + horizontal: 12, + vertical: 16, + ), + hintText: 'Search buildings, places...', + ), + ), + ), + if (_searchController.text.isNotEmpty) + IconButton( + icon: Icon(Icons.clear), + onPressed: _clearSearch, + ), + if (_config?.features.aiSearch ?? false) + IconButton( + icon: Icon( + Icons.auto_awesome, + color: isDark + ? Colors.amber[300] + : Theme.of(context).colorScheme.primary, + size: 20, + ), + onPressed: () => showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (_) => EsriAiSearchSheet( + userLat: _getUserLatLng()?.$1, + userLon: _getUserLatLng()?.$2, + onLocationSelected: _onAiLocationSelected, + onRouteRequested: _onAiRouteRequested, + ), + ), + ), + ], + ), + ), + + SizedBox(height: 4), + + // Suggestions panel (categories + recents) + if (_showSuggestions && !_showResults) + _buildSuggestionsPanel(context), + + // Search results dropdown + if (_showResults || (_matchingPoiClasses.isNotEmpty && _searchController.text.isNotEmpty && !_showSuggestions)) + Material( + elevation: 4, + borderRadius: BorderRadius.circular(8), + color: isDark ? Colors.grey[850] : Colors.white, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + // ── Category matches (always at top) ────────────────────────── + if (_matchingPoiClasses.isNotEmpty) ...[ + Padding( + padding: const EdgeInsets.fromLTRB(16, 10, 16, 4), + child: Row( + children: [ + Icon(Icons.category_outlined, + size: 13, + color: isDark ? Colors.grey[500] : Colors.grey[500]), + const SizedBox(width: 6), + Text( + 'CATEGORIES', + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w700, + letterSpacing: 0.6, + color: isDark ? Colors.grey[500] : Colors.grey[500], + ), + ), + ], + ), + ), + ..._matchingPoiClasses.map( + (classValue) => ListTile( + splashColor: Colors.transparent, + leading: Icon( + _iconForClass(classValue), + size: 20, + color: isDark ? Colors.white70 : Colors.grey[700], + ), + title: Text(_labelForClass(classValue)), + subtitle: Text( + classValue, + style: TextStyle( + fontSize: 13, + color: isDark ? Colors.grey[500] : Colors.grey[500]), + ), + dense: true, + onTap: () => _performClassSearch(classValue), + ), + ), + if (_showResults && (_isSearching || _searchResults.isNotEmpty)) + const Divider(height: 1), + ], + + // ── POI / building results ───────────────────────────────────── + if (_showResults) + _isSearching + ? const Padding( + padding: EdgeInsets.all(16), + child: Center(child: CircularProgressIndicator()), + ) + : _searchResults.isEmpty + // Only show "no results" if there are also no category matches + ? (_matchingPoiClasses.isEmpty + ? const Padding( + padding: EdgeInsets.all(16), + child: Text('No results found'), + ) + : const SizedBox.shrink()) + : ConstrainedBox( + constraints: BoxConstraints( + maxHeight: MediaQuery.of(context).size.height * 0.4, + ), + child: ListView.separated( + shrinkWrap: true, + padding: EdgeInsets.zero, + itemCount: _searchResults.length, + separatorBuilder: (_, __) => const Divider(height: 1), + itemBuilder: (context, index) { + final result = _searchResults[index]; + return ListTile( + splashColor: Colors.transparent, + leading: Icon(_iconForResult(result)), + title: Text(result.name, + maxLines: 1, + overflow: TextOverflow.ellipsis), + subtitle: result.subtitle.isNotEmpty + ? Text(result.subtitle, + maxLines: 1, + overflow: TextOverflow.ellipsis) + : null, + dense: true, + onTap: () => _selectResult(result), + ); + }, + ), + ), + + ], + ), + ), + ], + ), + ), + + + // Category list panel — shown when list button is toggled + if (_showCategoryList && _selectedResult == null && _allCategoryResults.isNotEmpty) + _buildCategoryListPanel(context), + + // Detail slide-over + if (_selectedResult != null) + _buildDetailSlideOver(context, _selectedResult!), + + // Top-right FAB cluster — hidden when keyboard or layers panel is active + if (!keyboardVisible && !_focusNode.hasFocus && !_fromFocusNode.hasFocus && !_toFocusNode.hasFocus && !_showLayersPanel) + Positioned( + right: 12, + top: _showRouteFields ? 120 : 68, + child: EsriMapFabCluster( + isDark: isDark, + is3D: _sceneMode != 'default', + mapRotation: _mapRotation, + isLocationActive: _isLocationActive, + isRecenterActive: _isRecenterActive, + onShowLayersPanel: () => setState(() => _showLayersPanel = true), + onRecenterOnView: _recenterOnView, + onRecenterOnUser: _recenterOnUser, + onSnapToNorth: _snapToNorth, + ), + ), + + // Layers/display panel + if (_showLayersPanel && _config != null) + EsriMapLayersPanel( + config: _config!, + currentBasemapType: _currentBasemapType, + currentSceneKey: _sceneMode, + layerVisible: _layerVisible, + layerLoading: _layerLoading, + hideSceneSwitcher: _selectedResult != null, + onSwitchBasemap: _switchBasemap, + onSetSceneMode: _setSceneMode, + onToggleLayer: _toggleLayer, + onClose: () => setState(() => _showLayersPanel = false), + ), + ], + ), + ); + } +} + +class _AgeAuthChallengeHandler implements ArcGISAuthenticationChallengeHandler { + final String tokensUrl; + + String? _cachedAgeToken; + DateTime? _ageTokenExpiry; + + String? _cachedAgoToken; + DateTime? _agoTokenExpiry; + + _AgeAuthChallengeHandler(this.tokensUrl); + + Future<(String?, DateTime?)> _getTokenForHost(String host) async { + final isAgo = host.contains('arcgis.com'); + + if (isAgo) { + if (_cachedAgoToken != null && + _agoTokenExpiry != null && + DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) { + return (_cachedAgoToken, _agoTokenExpiry); + } + } else { + if (_cachedAgeToken != null && + _ageTokenExpiry != null && + DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) { + return (_cachedAgeToken, _ageTokenExpiry); + } + } + + final response = await http.get(Uri.parse(tokensUrl)); + if (response.statusCode != 200) throw Exception('Token fetch failed: ${response.statusCode}'); + final data = jsonDecode(response.body) as Map; + + + _cachedAgeToken = data['age']?['token'] as String?; + final ageExpiresIn = data['age']?['expires_in'] as int? ?? 7200; + _ageTokenExpiry = DateTime.now().add(Duration(seconds: ageExpiresIn)); + + _cachedAgoToken = data['ago']?['token'] as String?; + final agoExpiresIn = data['ago']?['expires_in'] as int? ?? 7200; + _agoTokenExpiry = DateTime.now().add(Duration(seconds: agoExpiresIn)); + + return isAgo ? (_cachedAgoToken, _agoTokenExpiry) : (_cachedAgeToken, _ageTokenExpiry); + } + + @override + Future handleArcGISAuthenticationChallenge( + ArcGISAuthenticationChallenge challenge, + ) async { + try { + final host = challenge.requestUri.host; + final (token, expiry) = await _getTokenForHost(host); + if (token == null || expiry == null) { + challenge.continueAndFail(); + return; + } + final tokenInfo = TokenInfo.create( + accessToken: token, + expirationDate: expiry, + isSslRequired: true, + ); + if (tokenInfo == null) { + challenge.continueAndFail(); + return; + } + final credential = PregeneratedTokenCredential( + uri: challenge.requestUri, + tokenInfo: tokenInfo, + referer: '', + ); + challenge.continueWithCredential(credential); + } catch (e) { + debugPrint('Auth challenge failed: $e'); + challenge.continueAndFail(); + } + } +} \ No newline at end of file diff --git a/lib/ui/esrimap/esrimap_ai_search.dart b/lib/ui/esrimap/esrimap_ai_search.dart new file mode 100644 index 000000000..0f40ec052 --- /dev/null +++ b/lib/ui/esrimap/esrimap_ai_search.dart @@ -0,0 +1,317 @@ +import 'dart:convert'; +import 'package:flutter/material.dart'; +import 'package:http/http.dart' as http; +import 'esrimap_config.dart'; + +class AiSearchResult { + final String name; + final String subtitle; + final String address; + final double latitude; + final double longitude; + final int? distanceFeet; + final String? distanceFormatted; + + const AiSearchResult({ + required this.name, + required this.subtitle, + required this.address, + required this.latitude, + required this.longitude, + this.distanceFeet, + this.distanceFormatted, + }); + + factory AiSearchResult.fromJson(Map j) => AiSearchResult( + name: j['name'] as String, + subtitle: j['subtitle'] as String? ?? '', + address: j['address'] as String? ?? '', + latitude: (j['latitude'] as num).toDouble(), + longitude: (j['longitude'] as num).toDouble(), + distanceFeet: j['distanceFeet'] as int?, + distanceFormatted: j['distanceFormatted'] as String?, + ); +} + +class AiSearchRouteStop { + final double lat; + final double lon; + const AiSearchRouteStop({required this.lat, required this.lon}); + factory AiSearchRouteStop.fromJson(Map j) => + AiSearchRouteStop(lat: (j['lat'] as num).toDouble(), lon: (j['lon'] as num).toDouble()); +} + +class AiSearchResponse { + final String message; + final List results; + final List? routeStopNames; + final List? routeStopCoords; + + const AiSearchResponse({ + required this.message, + required this.results, + this.routeStopNames, + this.routeStopCoords, + }); + + factory AiSearchResponse.fromJson(Map j) { + List? stopNames; + List? stopCoords; + final route = j['suggestedRoute']; + if (route != null) { + stopNames = (route['stops'] as List).cast(); + stopCoords = (route['stopCoords'] as List) + .map((s) => AiSearchRouteStop.fromJson(s as Map)) + .toList(); + } + return AiSearchResponse( + message: j['message'] as String, + results: (j['results'] as List) + .map((r) => AiSearchResult.fromJson(r as Map)) + .toList(), + routeStopNames: stopNames, + routeStopCoords: stopCoords, + ); + } +} + +enum _AiSearchState { idle, loading, results, error } + +class EsriAiSearchSheet extends StatefulWidget { + final double? userLat; + final double? userLon; + final void Function(AiSearchResult result) onLocationSelected; + final void Function(List stops) onRouteRequested; + + const EsriAiSearchSheet({ + Key? key, + this.userLat, + this.userLon, + required this.onLocationSelected, + required this.onRouteRequested, + }) : super(key: key); + + @override + State createState() => _EsriAiSearchSheetState(); +} + +class _EsriAiSearchSheetState extends State { + final _controller = TextEditingController(); + _AiSearchState _state = _AiSearchState.idle; + AiSearchResponse? _response; + String? _errorMessage; + + static const _baseUrl = + 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; + + Future _submit() async { + final query = _controller.text.trim(); + if (query.isEmpty) return; + setState(() { + _state = _AiSearchState.loading; + _response = null; + _errorMessage = null; + }); + try { + final body = {'query': query}; + if (widget.userLat != null) body['lat'] = widget.userLat; + if (widget.userLon != null) body['lon'] = widget.userLon; + + final res = await http.post( + Uri.parse('$_baseUrl/ai-search'), + headers: {'Content-Type': 'application/json'}, + body: jsonEncode(body), + ); + if (res.statusCode != 200) throw Exception('Request failed: ${res.statusCode}'); + final data = jsonDecode(res.body) as Map; + setState(() { + _response = AiSearchResponse.fromJson(data); + _state = _AiSearchState.results; + }); + } catch (e) { + setState(() { + _errorMessage = e.toString(); + _state = _AiSearchState.error; + }); + } + } + + IconData _iconForSubtitle(String subtitle) { + final s = subtitle.toLowerCase(); + if (s.contains('dining') || s.contains('food') || s.contains('coffee') || s.contains('cafe')) { + return Icons.restaurant; + } + if (s.contains('library') || s.contains('academic')) return Icons.menu_book; + if (s.contains('parking')) return Icons.local_parking; + if (s.contains('recreation') || s.contains('gym') || s.contains('fitness')) return Icons.fitness_center; + if (s.contains('transit') || s.contains('shuttle')) return Icons.directions_bus; + return Icons.place; + } + + @override + void dispose() { + _controller.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final isDark = Theme.of(context).brightness == Brightness.dark; + final bgColor = isDark ? Colors.grey[900]! : Colors.white; + final textColor = isDark ? Colors.white : Colors.grey[900]!; + final subtitleColor = isDark ? Colors.grey[400]! : Colors.grey[600]!; + final accent = Theme.of(context).colorScheme.primary; + final bottomPad = MediaQuery.of(context).viewInsets.bottom; + + return Container( + decoration: BoxDecoration( + color: bgColor, + borderRadius: const BorderRadius.vertical(top: Radius.circular(16)), + ), + padding: EdgeInsets.only(bottom: bottomPad), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Handle + Center( + child: Container( + margin: const EdgeInsets.only(top: 10, bottom: 6), + width: 36, + height: 4, + decoration: BoxDecoration( + color: isDark ? Colors.grey[700] : Colors.grey[300], + borderRadius: BorderRadius.circular(2), + ), + ), + ), + + // Header + Padding( + padding: const EdgeInsets.fromLTRB(16, 4, 16, 12), + child: Row( + children: [ + Icon(Icons.auto_awesome, size: 18, color: accent), + const SizedBox(width: 8), + Text('Ask the Map', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: textColor)), + ], + ), + ), + + // Search input + Padding( + padding: const EdgeInsets.fromLTRB(16, 0, 16, 12), + child: Row( + children: [ + Expanded( + child: TextField( + controller: _controller, + autofocus: true, + textInputAction: TextInputAction.search, + onSubmitted: (_) => _submit(), + style: TextStyle(color: textColor), + decoration: InputDecoration( + hintText: 'e.g. "good lunch spots near Price Center"', + hintStyle: TextStyle(color: subtitleColor, fontSize: 13), + filled: true, + fillColor: isDark ? Colors.grey[800] : Colors.grey[100], + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(12), + borderSide: BorderSide.none, + ), + contentPadding: const EdgeInsets.symmetric(horizontal: 14, vertical: 12), + ), + ), + ), + const SizedBox(width: 8), + FilledButton( + onPressed: _state == _AiSearchState.loading ? null : _submit, + style: FilledButton.styleFrom( + minimumSize: const Size(48, 48), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), + ), + child: _state == _AiSearchState.loading + ? const SizedBox(width: 18, height: 18, + child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white)) + : const Icon(Icons.search), + ), + ], + ), + ), + + // Results + if (_state == _AiSearchState.results && _response != null) ...[ + if (_response!.message.isNotEmpty) + Padding( + padding: const EdgeInsets.fromLTRB(16, 0, 16, 8), + child: Text(_response!.message, + style: TextStyle(fontSize: 13, color: subtitleColor)), + ), + + if (_response!.results.isEmpty) + Padding( + padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), + child: Text('No results found. Try a different query.', + style: TextStyle(fontSize: 13, color: subtitleColor)), + ), + + ConstrainedBox( + constraints: const BoxConstraints(maxHeight: 280), + child: ListView.separated( + shrinkWrap: true, + itemCount: _response!.results.length, + separatorBuilder: (_, __) => + Divider(height: 1, indent: 56, color: isDark ? Colors.grey[800] : Colors.grey[200]), + itemBuilder: (context, i) { + final r = _response!.results[i]; + return ListTile( + leading: CircleAvatar( + backgroundColor: accent.withOpacity(0.12), + child: Icon(_iconForSubtitle(r.subtitle), color: accent, size: 18), + ), + title: Text(r.name, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: textColor)), + subtitle: Text(r.distanceFormatted != null ? '${r.subtitle} · ${r.distanceFormatted}' : r.subtitle, + style: TextStyle(fontSize: 12, color: subtitleColor)), + onTap: () { + Navigator.pop(context); + widget.onLocationSelected(r); + }, + ); + }, + ), + ), + + // Multi-stop route button + if (_response!.routeStopNames != null) ...[ + const Divider(height: 1), + Padding( + padding: const EdgeInsets.all(12), + child: SizedBox( + width: double.infinity, + child: FilledButton.icon( + icon: const Icon(Icons.directions), + label: Text('Route through ${_response!.routeStopNames!.length} stops'), + onPressed: () { + Navigator.pop(context); + widget.onRouteRequested(_response!.results); + }, + ), + ), + ), + ] else + const SizedBox(height: 16), + ], + + if (_state == _AiSearchState.error) + Padding( + padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), + child: Text('Something went wrong. Please try again.', + style: TextStyle(fontSize: 13, color: Colors.redAccent)), + ), + ], + ), + ); + } +} \ No newline at end of file diff --git a/lib/ui/esrimap/esrimap_basemaps.dart b/lib/ui/esrimap/esrimap_basemaps.dart new file mode 100644 index 000000000..6c373c6ad --- /dev/null +++ b/lib/ui/esrimap/esrimap_basemaps.dart @@ -0,0 +1,68 @@ +import 'package:arcgis_maps/arcgis_maps.dart'; +import 'esrimap_config.dart'; + +enum BasemapType { defaultMap, light, dark, satellite } + +String basemapKey(BasemapType type) { + switch (type) { + case BasemapType.defaultMap: return 'defaultMap'; + case BasemapType.light: return 'light'; + case BasemapType.dark: return 'dark'; + case BasemapType.satellite: return 'satellite'; + } +} + +BasemapType? basemapTypeFromKey(String key) { + switch (key) { + case 'defaultMap': return BasemapType.defaultMap; + case 'light': return BasemapType.light; + case 'dark': return BasemapType.dark; + case 'satellite': return BasemapType.satellite; + default: return null; + } +} + +Basemap buildBasemap(BasemapType type, EsriMapConfig config) { + final entry = config.basemaps[basemapKey(type)]; + if (entry == null) return Basemap(); + + final basemap = Basemap(); + for (final layer in entry.baseLayers) { + switch (layer.type) { + case 'arcgisTiled': + final url = layer.serviceKey != null + ? config.serviceUrls[layer.serviceKey!] + : null; + if (url != null) { + basemap.baseLayers.add(ArcGISTiledLayer.withUri(Uri.parse(url))); + } + break; + + case 'arcgisVectorTiled': + final portalUrl = layer.portalKey != null + ? config.portals[layer.portalKey!] + : null; + if (portalUrl != null && layer.itemId != null) { + basemap.baseLayers.add( + ArcGISVectorTiledLayer.withItem( + PortalItem.withPortalAndItemId( + portal: Portal(Uri.parse(portalUrl)), + itemId: layer.itemId!, + ), + ), + ); + } + break; + + case 'arcgisMapImage': + final url = layer.serviceKey != null + ? config.serviceUrls[layer.serviceKey!] + : null; + if (url != null) { + basemap.baseLayers.add(ArcGISMapImageLayer.withUri(Uri.parse(url))); + } + break; + } + } + return basemap; +} \ No newline at end of file diff --git a/lib/ui/esrimap/esrimap_config.dart b/lib/ui/esrimap/esrimap_config.dart new file mode 100644 index 000000000..a63a01656 --- /dev/null +++ b/lib/ui/esrimap/esrimap_config.dart @@ -0,0 +1,260 @@ +import 'dart:convert'; +import 'package:http/http.dart' as http; + +// Base layer spec + +class BaseLayerSpec { + final String type; // 'arcgisTiled' | 'arcgisVectorTiled' | 'arcgisMapImage' + final String? serviceKey; // resolves via EsriMapConfig.serviceUrls + final String? portalKey; // resolves via EsriMapConfig.portals + final String? itemId; + + const BaseLayerSpec({ + required this.type, + this.serviceKey, + this.portalKey, + this.itemId, + }); + + factory BaseLayerSpec.fromJson(Map json) => BaseLayerSpec( + type: json['type'] as String, + serviceKey: json['serviceKey'] as String?, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, + ); +} + +// Basemaps + +class BasemapConfig { + final String label; + final String thumbnailAsset; + final List baseLayers; + + const BasemapConfig({ + required this.label, + required this.thumbnailAsset, + required this.baseLayers, + }); + + factory BasemapConfig.fromJson(Map json) => BasemapConfig( + label: json['label'] as String, + thumbnailAsset: json['thumbnailAsset'] as String, + baseLayers: (json['baseLayers'] as List) + .map((e) => BaseLayerSpec.fromJson(e as Map)) + .toList(), + ); +} + +// Operational layers + +class SublayerEntry { + final String name; + final String source; + final String? url; + final String? portalKey; + final String? itemId; + final int refreshInterval; + final bool popup; + final String? popupTemplate; + + const SublayerEntry({ + required this.name, + required this.source, + this.url, + this.portalKey, + this.itemId, + required this.refreshInterval, + required this.popup, + this.popupTemplate, + }); + + factory SublayerEntry.fromJson(Map json) => SublayerEntry( + name: json['name'] as String, + source: json['source'] as String, + url: json['url'] as String?, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, + refreshInterval: (json['refreshInterval'] as num?)?.toInt() ?? 0, + popup: json['popup'] as bool? ?? false, + popupTemplate: json['popupTemplate'] as String?, + ); +} + +class LayerEntry { + final String label; + final String thumbnailAsset; + final String? source; + final String? url; + final String? portalKey; + final String? itemId; + final int refreshInterval; + final bool popup; + final String? popupTemplate; + final List? sublayers; + + const LayerEntry({ + required this.label, + required this.thumbnailAsset, + this.source, + this.url, + this.portalKey, + this.itemId, + this.refreshInterval = 0, + this.popup = false, + this.popupTemplate, + this.sublayers, + }); + + bool get hasSublayers => sublayers != null && sublayers!.isNotEmpty; + + factory LayerEntry.fromJson(Map json) => LayerEntry( + label: json['label'] as String, + thumbnailAsset: json['thumbnailAsset'] as String, + source: json['source'] as String?, + url: json['url'] as String?, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, + refreshInterval: (json['refreshInterval'] as num?)?.toInt() ?? 0, + popup: json['popup'] as bool? ?? false, + popupTemplate: json['popupTemplate'] as String?, + sublayers: json['sublayers'] == null + ? null + : (json['sublayers'] as List) + .map((e) => SublayerEntry.fromJson(e as Map)) + .toList(), + ); +} + +// Scenes + +class SceneConfig { + final String label; + final String type; // '2d' | 'scene' + final String? portalKey; + final String? itemId; + + const SceneConfig({ + required this.label, + required this.type, + this.portalKey, + this.itemId, + }); + + factory SceneConfig.fromJson(Map json) => SceneConfig( + label: json['label'] as String, + type: json['type'] as String, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, + ); +} + +// Features +// Allows remote enabling/disabling of app features without redeploying the app. + +class FeaturesConfig { + final bool aiSearch; + final bool scenes; + + const FeaturesConfig({required this.aiSearch, required this.scenes}); + + factory FeaturesConfig.fromJson(Map json) => FeaturesConfig( + aiSearch: json['aiSearch'] as bool? ?? false, + scenes: json['scenes'] as bool? ?? false, + ); +} + +// Search categories + +class SearchCategoryConfig { + final String label; + final String poiClass; + final String icon; + final String? color; + + const SearchCategoryConfig({ + required this.label, + required this.poiClass, + required this.icon, + this.color, + }); + + factory SearchCategoryConfig.fromJson(Map json) => + SearchCategoryConfig( + label: json['label'] as String, + poiClass: json['poiClass'] as String, + icon: json['icon'] as String, + color: json['color'] as String?, + ); +} + +// Root config + +class EsriMapConfig { + final Map portals; + final Map serviceUrls; + final Map basemaps; + final Map layers; + final Map scenes; + final FeaturesConfig features; + final List searchCategories; + + const EsriMapConfig({ + required this.portals, + required this.serviceUrls, + required this.basemaps, + required this.layers, + required this.scenes, + required this.features, + required this.searchCategories, + }); + + factory EsriMapConfig.fromJson(Map json) => EsriMapConfig( + portals: (json['portals'] as Map).cast(), + serviceUrls: (json['serviceUrls'] as Map).cast(), + basemaps: (json['basemaps'] as Map).map( + (k, v) => MapEntry(k, BasemapConfig.fromJson(v as Map)), + ), + layers: (json['layers'] as Map).map( + (k, v) => MapEntry(k, LayerEntry.fromJson(v as Map)), + ), + scenes: (json['scenes'] as Map).map( + (k, v) => MapEntry(k, SceneConfig.fromJson(v as Map)), + ), + features: FeaturesConfig.fromJson(json['features'] as Map), + searchCategories: (json['searchCategories'] as List) + .map((e) => SearchCategoryConfig.fromJson(e as Map)) + .toList(), + ); +} + +// Service +// Fetches and caches the EsriMapConfig from the backend API. + +class EsriMapConfigService { + static final EsriMapConfigService instance = EsriMapConfigService._(); + EsriMapConfigService._(); + + static const _baseUrl = + 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; + + EsriMapConfig? _config; + Future? _pending; + + Future fetch() => _pending ??= _doFetch(); + + EsriMapConfig? get cached => _config; + + String get tokensUrl => '$_baseUrl/tokens'; + + Future _doFetch() async { + final response = await http.get(Uri.parse('$_baseUrl/config')); + if (response.statusCode != 200) { + throw Exception('Config fetch failed: ${response.statusCode}'); + } + _config = EsriMapConfig.fromJson( + jsonDecode(response.body) as Map, + ); + return _config!; + } +} \ No newline at end of file diff --git a/lib/ui/esrimap/esrimap_fab.dart b/lib/ui/esrimap/esrimap_fab.dart new file mode 100644 index 000000000..a2187190a --- /dev/null +++ b/lib/ui/esrimap/esrimap_fab.dart @@ -0,0 +1,163 @@ +import 'dart:math' as math; +import 'package:flutter/material.dart'; + +class EsriMapFabCluster extends StatelessWidget { + final bool isDark; + final bool is3D; + final double mapRotation; + final bool isLocationActive; + final bool isRecenterActive; + final VoidCallback onShowLayersPanel; + final VoidCallback onRecenterOnView; + final VoidCallback onRecenterOnUser; + final VoidCallback onSnapToNorth; + + const EsriMapFabCluster({ + Key? key, + required this.isDark, + this.is3D = false, + required this.mapRotation, + this.isLocationActive = false, + this.isRecenterActive = false, + required this.onShowLayersPanel, + required this.onRecenterOnView, + required this.onRecenterOnUser, + required this.onSnapToNorth, + }) : super(key: key); + + static const _activeColor = Color(0xFFC69214); + static const _size = 48.0; + static const _btnHeight = 44.0; + + @override + Widget build(BuildContext context) { + final bgColor = isDark ? Colors.grey[800]! : Colors.white; + final fgColor = isDark ? Colors.white : Colors.grey[800]!; + + return Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + // Compass — matches pill width + Material( + elevation: 4, + color: bgColor, + shape: const CircleBorder(), + clipBehavior: Clip.antiAlias, + child: GestureDetector( + onTap: onSnapToNorth, + behavior: HitTestBehavior.opaque, + child: SizedBox( + width: _size, + height: _size, + child: Center( + child: CustomPaint( + size: const Size(24, 24), + painter: _CompassNeedlePainter( + rotationDegrees: mapRotation, + southColor: fgColor.withValues(alpha: 0.35), + ), + ), + ), + ), + ), + ), + const SizedBox(height: 10), + // Pill — my location, recenter, layers + Material( + elevation: 4, + color: bgColor, + borderRadius: BorderRadius.circular(_size / 2), + clipBehavior: Clip.antiAlias, + child: SizedBox( + width: _size, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 4), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + if (!is3D) + _pillButton( + icon: Icons.my_location, + color: isLocationActive ? _activeColor : fgColor, + onTap: onRecenterOnUser, + ), + _pillButton( + icon: Icons.center_focus_strong, + color: isRecenterActive ? _activeColor : fgColor, + onTap: onRecenterOnView, + ), + _pillButton( + icon: Icons.layers_outlined, + color: fgColor, + onTap: onShowLayersPanel, + ), + ], + ), + ), + ), + ), + ], + ); + } + + Widget _pillButton({ + required IconData icon, + required Color color, + required VoidCallback onTap, + }) { + return GestureDetector( + onTap: onTap, + behavior: HitTestBehavior.opaque, + child: SizedBox( + height: _btnHeight, + child: Center( + child: Icon(icon, size: 22, color: color), + ), + ), + ); + } +} + +class _CompassNeedlePainter extends CustomPainter { + final double rotationDegrees; + final Color southColor; + + const _CompassNeedlePainter({ + required this.rotationDegrees, + required this.southColor, + }); + + @override + void paint(Canvas canvas, Size size) { + final cx = size.width / 2; + final cy = size.height / 2; + final tipDist = size.height * 0.46; + final halfWidth = size.width * 0.18; + + canvas.save(); + canvas.translate(cx, cy); + canvas.rotate(-rotationDegrees * math.pi / 180); + + final northPath = Path() + ..moveTo(0, -tipDist) + ..lineTo(halfWidth, 0) + ..lineTo(-halfWidth, 0) + ..close(); + + final southPath = Path() + ..moveTo(0, tipDist) + ..lineTo(halfWidth, 0) + ..lineTo(-halfWidth, 0) + ..close(); + + canvas.drawPath(northPath, Paint()..color = Colors.red); + canvas.drawPath(southPath, Paint()..color = southColor); + + canvas.restore(); + } + + @override + bool shouldRepaint(_CompassNeedlePainter old) => + old.rotationDegrees != rotationDegrees || old.southColor != southColor; +} diff --git a/lib/ui/esrimap/esrimap_layers_panel.dart b/lib/ui/esrimap/esrimap_layers_panel.dart new file mode 100644 index 000000000..7f25c7466 --- /dev/null +++ b/lib/ui/esrimap/esrimap_layers_panel.dart @@ -0,0 +1,281 @@ +import 'package:flutter/material.dart'; +import 'esrimap_basemaps.dart'; +import 'esrimap_config.dart'; + +class EsriMapLayersPanel extends StatelessWidget { + final EsriMapConfig config; + final BasemapType currentBasemapType; + final String currentSceneKey; + final Map layerVisible; + final Map layerLoading; + final void Function(BasemapType) onSwitchBasemap; + final void Function(String) onSetSceneMode; + final void Function(String) onToggleLayer; + final VoidCallback onClose; + final bool hideSceneSwitcher; + + const EsriMapLayersPanel({ + Key? key, + required this.config, + required this.currentBasemapType, + required this.currentSceneKey, + required this.layerVisible, + required this.layerLoading, + required this.onSwitchBasemap, + required this.onSetSceneMode, + required this.onToggleLayer, + required this.onClose, + this.hideSceneSwitcher = false, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + final isDark = Theme.of(context).brightness == Brightness.dark; + final bgColor = isDark ? Colors.grey[900]! : Colors.white; + final textColor = isDark ? Colors.white : Colors.grey[900]!; + final subtitleColor = isDark ? Colors.grey[400]! : Colors.grey[600]!; + final accent = isDark + ? Colors.lightBlue[300]! + : Theme.of(context).colorScheme.primary; + + Widget sectionLabel(String text) => Padding( + padding: const EdgeInsets.fromLTRB(16, 12, 16, 8), + child: Text( + text, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.w700, + letterSpacing: 0.8, + color: subtitleColor, + ), + ), + ); + + Widget imageTile({ + required String label, + required bool selected, + required VoidCallback onTap, + Widget? imageWidget, + bool loading = false, + }) { + return GestureDetector( + onTap: onTap, + child: SizedBox( + width: 72, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + width: 56, + height: 56, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + border: selected + ? Border.all(color: accent, width: 2.5) + : Border.all( + color: isDark ? Colors.grey[700]! : Colors.grey[300]!, + width: 1, + ), + ), + child: ClipRRect( + borderRadius: BorderRadius.circular(6.5), + child: loading + ? const Center( + child: SizedBox( + width: 22, + height: 22, + child: CircularProgressIndicator(strokeWidth: 2), + ), + ) + : (imageWidget ?? + Container( + color: isDark ? Colors.grey[700] : Colors.grey[300], + )), + ), + ), + const SizedBox(height: 5), + Text( + label, + textAlign: TextAlign.center, + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 11, + fontWeight: selected ? FontWeight.w700 : FontWeight.w400, + color: selected ? accent : textColor, + ), + ), + ], + ), + ), + ); + } + + Widget networkImage(String url) => Image.network( + url, + fit: BoxFit.cover, + errorBuilder: (_, __, ___) => Container( + color: isDark ? Colors.grey[700] : Colors.grey[300], + ), + ); + + Widget sceneChip(String key, String label, bool selected) => + GestureDetector( + onTap: () => onSetSceneMode(key), + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 7), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + border: selected + ? Border.all(color: accent, width: 2) + : Border.all( + color: isDark ? Colors.grey[700]! : Colors.grey[300]!, + width: 1, + ), + color: selected + ? accent.withOpacity(0.12) + : (isDark ? Colors.grey[850] : Colors.grey[100]), + ), + child: Text( + label, + style: TextStyle( + fontSize: 13, + fontWeight: selected ? FontWeight.w700 : FontWeight.w400, + color: selected ? accent : textColor, + ), + ), + ), + ); + + final bottomPad = MediaQuery.of(context).padding.bottom; + final isDefault = currentSceneKey == 'default'; + + return Positioned( + left: 12, + right: 12, + bottom: bottomPad + 12, + child: GestureDetector( + onVerticalDragEnd: (details) { + if (details.velocity.pixelsPerSecond.dy > 200) onClose(); + }, + child: Material( + elevation: 10, + color: bgColor, + borderRadius: BorderRadius.circular(16), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Header + Padding( + padding: const EdgeInsets.fromLTRB(16, 14, 8, 0), + child: Row( + children: [ + Expanded( + child: Text( + 'Map Display', + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w600, + color: textColor, + ), + ), + ), + IconButton( + icon: Icon(Icons.close, size: 20, color: subtitleColor), + onPressed: onClose, + ), + ], + ), + ), + + // Basemap + Layers — grayed out when not in default scene + Opacity( + opacity: isDefault ? 1.0 : 0.35, + child: IgnorePointer( + ignoring: !isDefault, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + sectionLabel('BASEMAP'), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 12), + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + for (final entry in config.basemaps.entries) ...[ + if (basemapTypeFromKey(entry.key) != null) ...[ + imageTile( + label: entry.value.label, + selected: currentBasemapType == + basemapTypeFromKey(entry.key), + onTap: () { + final t = basemapTypeFromKey(entry.key); + if (t != null) onSwitchBasemap(t); + }, + imageWidget: networkImage(entry.value.thumbnailAsset), + ), + const SizedBox(width: 8), + ], + ], + ], + ), + ), + ), + + const Divider(height: 24, indent: 16, endIndent: 16), + + sectionLabel('LAYERS'), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 12), + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + for (final entry in config.layers.entries) ...[ + imageTile( + label: entry.value.label, + selected: layerVisible[entry.key] ?? false, + loading: layerLoading[entry.key] ?? false, + onTap: () => onToggleLayer(entry.key), + imageWidget: networkImage(entry.value.thumbnailAsset), + ), + const SizedBox(width: 8), + ], + ], + ), + ), + ), + ], + ), + ), + ), + + // Scene chips — gated by features flag, hidden when slide-over is active + if (config.features.scenes && !hideSceneSwitcher) ...[ + const Divider(height: 24, indent: 16, endIndent: 16), + sectionLabel('SCENE'), + Padding( + padding: const EdgeInsets.fromLTRB(12, 0, 12, 20), + child: Wrap( + spacing: 8, + children: [ + for (final entry in config.scenes.entries) + sceneChip( + entry.key, + entry.value.label, + currentSceneKey == entry.key, + ), + ], + ), + ), + ] else + const SizedBox(height: 20), + ], + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/lib/ui/esrimap/esrimap_scene.dart b/lib/ui/esrimap/esrimap_scene.dart new file mode 100644 index 000000000..5b4515b4c --- /dev/null +++ b/lib/ui/esrimap/esrimap_scene.dart @@ -0,0 +1,151 @@ +import 'dart:async'; +import 'package:arcgis_maps/arcgis_maps.dart'; +import 'package:flutter/material.dart'; + +class EsriSceneWidget extends StatefulWidget { + final String portalUri; + final String itemId; + final void Function(double heading)? onHeadingChanged; + + const EsriSceneWidget({ + super.key, + required this.portalUri, + required this.itemId, + this.onHeadingChanged, + }); + + @override + State createState() => EsriSceneWidgetState(); +} + +class EsriSceneWidgetState extends State { + late final ArcGISSceneViewController _sceneViewController; + Camera? _initialCamera; + double _camToTargetLatOffset = 0.0; + StreamSubscription? _viewpointSubscription; + + @override + void initState() { + super.initState(); + _sceneViewController = ArcGISSceneView.createController(); + _sceneViewController.interactionOptions.rotateEnabled = true; + _sceneViewController.interactionOptions.panEnabled = true; + _sceneViewController.interactionOptions.flingEnabled = true; + _sceneViewController.interactionOptions.zoomFactor = 3.0; + _sceneViewController.atmosphereEffect = AtmosphereEffect.none; + _sceneViewController.spaceEffect = SpaceEffect.transparent; + } + + void _onSceneViewReady() { + final portal = Portal(Uri.parse(widget.portalUri)); + final portalItem = PortalItem.withPortalAndItemId( + portal: portal, + itemId: widget.itemId, + ); + final scene = ArcGISScene.withItem(portalItem); + _sceneViewController.arcGISScene = scene; + + _initialCamera = Camera.withLatLong( + latitude: 32.86872066, + longitude: -117.23732235, + altitude: 1062.871, + heading: 0, + pitch: 53.261, + roll: 0, + ); + _sceneViewController.setViewpointCamera(_initialCamera!); + + // Capture the lat offset between camera and look-at target once the + // viewpoint stabilizes — used by snapToNorth to rotate around target. + Future.delayed(const Duration(milliseconds: 500), () { + if (!mounted) return; + final vp = _sceneViewController.getCurrentViewpoint( + ViewpointType.centerAndScale, + ); + final pt = vp?.targetGeometry; + if (pt is ArcGISPoint) { + _camToTargetLatOffset = pt.y - _initialCamera!.location.y; + } + }); + + _viewpointSubscription = _sceneViewController.onViewpointChanged.listen((_) { + if (!mounted) return; + final vp = _sceneViewController.getCurrentViewpoint( + ViewpointType.centerAndScale, + ); + if (vp != null) { + widget.onHeadingChanged?.call(vp.rotation); + } + }); + + _applyLabelScales(scene); + } + + // Restrict building labels to only appear when zoomed in close (scale <= 4000) + Future _applyLabelScales(ArcGISScene scene) async { + await scene.load(); + _applyLabelScalesToLayers(scene.operationalLayers); + } + + void _applyLabelScalesToLayers(List layers) { + for (final layer in layers) { + if (layer is FeatureLayer) { + for (final labelDef in layer.labelDefinitions) { + labelDef.minScale = 4000; + } + } else if (layer is GroupLayer) { + _applyLabelScalesToLayers(layer.layers); + } + } + } + + void resetCamera() { + if (_initialCamera == null) return; + _sceneViewController.setViewpointCamera(_initialCamera!); + } + + /// Snaps heading to north by rotating the camera around the current + /// look-at target so the building/point stays centered on screen. + void snapToNorth() { + if (_initialCamera == null) return; + final vp = _sceneViewController.getCurrentViewpoint( + ViewpointType.centerAndScale, + ); + final target = vp?.targetGeometry; + if (target is! ArcGISPoint) { + resetCamera(); + return; + } + + // Position camera due south of the current target at the same distance + // as the initial camera-to-target offset + final pivotLat = target.y; + final pivotLon = target.x; + final camAlt = _initialCamera!.location.z ?? 1062.871; + + _sceneViewController.setViewpointCamera( + Camera.withLatLong( + latitude: pivotLat - _camToTargetLatOffset, + longitude: pivotLon, + altitude: camAlt, + heading: 0, + pitch: _initialCamera!.pitch, + roll: 0, + ), + ); + } + + @override + void dispose() { + _viewpointSubscription?.cancel(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return ArcGISSceneView( + controllerProvider: () => _sceneViewController, + onSceneViewReady: _onSceneViewReady, + ); + } +} diff --git a/lib/ui/esrimap/mapConfig.json b/lib/ui/esrimap/mapConfig.json new file mode 100644 index 000000000..7eda26b77 --- /dev/null +++ b/lib/ui/esrimap/mapConfig.json @@ -0,0 +1,166 @@ +{ + "portals": { + "age": "https://admin-enterprise-gis.ucsd.edu/portal", + "ago": "https://ucsd-admin.maps.arcgis.com" + }, + + "serviceUrls": { + "hillshade": "https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer", + "lightGrayBase": "https://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base/MapServer", + "darkGrayBase": "https://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Dark_Gray_Base/MapServer", + "nearmap": "https://admin-enterprise-gis.ucsd.edu/server/rest/services/Campus_Imagery_Nearmap_9in_2025_0423_0514/MapServer" + }, + + "basemaps": { + "defaultMap": { + "label": "Default", + "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/default-thumbnail.png", + "baseLayers": [ + { + "type": "arcgisTiled", + "serviceKey": "hillshade" + }, + { + "type": "arcgisTiled", + "serviceKey": "lightGrayBase" + }, + { + "type": "arcgisVectorTiled", + "portalKey": "age", + "itemId": "e19f33d2c1f44967aef673306c483913" + } + ] + }, + "light": { + "label": "Light", + "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/light-thumbnail.png", + "baseLayers": [ + { + "type": "arcgisTiled", + "serviceKey": "hillshade" + }, + { + "type": "arcgisTiled", + "serviceKey": "lightGrayBase" + }, + { + "type": "arcgisVectorTiled", + "portalKey": "age", + "itemId": "6643ee62af494f5bafe7dfdb8eb3f857" + } + ] + }, + "dark": { + "label": "Dark", + "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/dark-thumbnail.png", + "baseLayers": [ + { + "type": "arcgisTiled", + "serviceKey": "hillshade" + }, + { + "type": "arcgisTiled", + "serviceKey": "darkGrayBase" + }, + { + "type": "arcgisVectorTiled", + "portalKey": "age", + "itemId": "09d7b3934b6c4c2cad8380c04e08c1b1" + } + ] + }, + "satellite": { + "label": "Satellite", + "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/satellite-thumbnail.png", + "baseLayers": [ + { + "type": "arcgisTiled", + "serviceKey": "lightGrayBase" + }, + { + "type": "arcgisMapImage", + "serviceKey": "nearmap" + } + ] + } + }, + + "layers": { + "tritonTransit": { + "label": "Transit", + "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/shuttles-thumbnail.png", + "source": "portalItem", + "portalKey": "ago", + "itemId": "ea5cdd8987414942b62178726120d5c7", + "refreshInterval": 0, + "popup": false + }, + "campusDistricts": { + "label": "Districts", + "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/districts-thumbnail.png", + "source": "url", + "url": "https://admin-enterprise-gis.ucsd.edu/server/rest/services/AdministrationServices/Areas_and_Boundaries/MapServer", + "refreshInterval": 0, + "popup": false + }, + "construction": { + "label": "Construction", + "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/construction-thumbnail.png", + "source": "url", + "url": "https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer", + "refreshInterval": 0, + "popup": false + } + }, + + "scenes": { + "default": { + "label": "Default", + "type": "2d" + }, + "building3d": { + "label": "3D Building", + "type": "scene", + "portalKey": "ago", + "itemId": "b6931d8c429c4138afd9dd936ee7bcd1" + }, + "droneView": { + "label": "Drone View", + "type": "scene", + "portalKey": "age", + "itemId": "0ffe293479844ce49ff5c30ffc0a0b67" + } + }, + + "features": { + "aiSearch": true, + "scenes": true + }, + + "searchCategories": [ + { + "label": "Dining", + "poiClass": "Dining and Beverage", + "icon": "restaurant", + "color": "#00C6D7" + }, + { + "label": "Library", + "poiClass": "Library", + "icon": "menu_book", + "color": "#D462AD" + }, + { + "label": "Parking", + "poiClass": "Parking", + "icon": "local_parking", + "color": "#6E963B" + }, + { + "label": "Recreation", + "poiClass": "Recreation Facilities", + "icon": "fitness_center", + "color": "#FC8900" + } + ] +} \ No newline at end of file diff --git a/lib/ui/esrimap/temp_assets/construction-thumbnail.png b/lib/ui/esrimap/temp_assets/construction-thumbnail.png new file mode 100644 index 0000000000000000000000000000000000000000..61830070a33456782be9c6885877663c768914a5 GIT binary patch literal 15020 zcmV;dI#b1oP)h!7J(m|g)U!KZeU3Ka#|M!3U@*5cjazQi}qwby_ipAoDuMNW>(=;fR zPEj(Iq);$K$wW#%9|>?~9Fl)j=k^+Ly>wcQ1%U#&W>r-MO%|Lyd6H786iu5pjiS-0 zya1+YQvd${Lsg6KwU6x|7^EToUf*9n2nB=kaA|&J(rNPh{XAzGQa{0GM2SRP&JhUs z`4y1g4Gj%h&+6mfm{d_Q`g11v-n)Bx$?x?gE}StlR8SD$2aBl>4Suk}et8@4<7aB3 zM+Uy>jNv)*R9T}jY*gpXj%j}K44!@xp{S^c+E1O5_duFFqJ3kn3` zI2NPK5#L`@-uvX%@pn8H8+NTkGHJi}`FvDeU6u2FkP+|qd!iyQ`1w2qd{3Ug!cCg| zFb1y%Jd{u%BM?6-D=Xt41}QQ)GzJPZEJ_m&w2c zT8Io*oRxEIF(W&Z9u(xHtk2?%I8YIj4kcnK`&b~Oq@-971prbbk%;^a3IkENVZ6w* z@2jvd4*~^gCf{^MZU7YL^O?dLOdk1Dn+1*xlSF|$Nmx`#Uda=EST_KHm{>WdHQ5?s zz3-5(pwy;B+((dEcp{MywuiaFeSq@tdz?qJLm<%SI3E^aad9!73BUr%I~!P$u|$jt zi-XkJ)g_Y%01}DiAXrK)o}iInvM3NEuB-21G5`zWti_A%1tIrkeOFX>KBeLVjKJ*i zK$e$m!a~67&jn__FMNE%DX@oxQe=Sb!omZhjXsIQeX8e>tKMuvfb0Xlr>5S_JTiLkov?rzZ*t7~f1vpCKlKK>%h!bNnZ zAY*B(VBe?nT>g`tCr3Sj8+m|qCT0E3TaM|Q%x@+rZ4UCnYXr;EW7?v6C^M%6B_$;k zV8lgPZ3hBVEWcuwB4a{sr4nSVBr2>upH2t#b7thenJ}0jATQ&>(MS|1uZT;d{pKw%k+r1KvupHfKikJLwyc*emWr6C1vN9^H^I~XMYC`k&OT{ ztot_uWt2|z%Q)IOGnRbDf)hlglETfP1j5Y79-Fm+)iY+q{)B=AB~e2-JSYc3jQM!3 zF~SP)f(fZ~=@e9BZAP3~3QQ*1_VNSazDdzQVFrN$-C%$UWOlQk4Rvgx;;EOb?=_-e z`!OZq-oOzO)_bjBjrW@30OK3~ZGJvamDkz#UB1}`vJ03ktkb{@txBc|Acd?NCR zDy<0W%u%3L&7nX+13Vp8qX7myWS@p(EiE*qp+T;N=hOViDgVF%2g4CXVR;U+hi zD&R@PgB0?sw77%{nSF*>MaN1{CQncPX((dNGr{sFW_e7Md{S)Ay+D$YRvFVw@gUJAqud>*`9u?(;*@v*G!F|s2SqT z$z5c55eW4bY$a5{Jl9n6$7f+552U;!`5o1uDBL6{2xbaoj8a-HWTlk`>yYts4e{^! zeU`_=$nk0rWn~Pmf8_9CnmcbE9XobRD67t)l#B%B0fVBiJxe`B#Z-FU#pExouqP-P zS59kOw`|sW>%NpGtQ^kypILj4^2tCfddvl=NROF}nj5EV%m+RX5t0{yMWG@pE6J~c z1%q(zs@3AR*q=N&BY_vIC?6t_tsBZ%cBS&f7l>TLd-w){I4}9u+1bevh$_~~!eW3= zn?9X(?$|*yX3U^sHVJfuppfO7_G^v?LkD+~xpy12eCsaOGGi2|s;5N{zD$L)7FiRV zRYm}yLdZk-f0N0vTw^pZlcGF5;xhh#n;#Ga`h85b(e$KK zAVyF&kcY)wz${+o5X9la<+u=-OpUBGK*`Xn9;+4(Z>*$HD9C=&;Dj|sP!kXc&=G_3 z+S=@AOzEIV=l76hi4iDJJHu0v0UF%3h00c5!sBM4zJj``6xsJSB|1+~pl+Hhwycdy zHX8*?_xodGc!Kd!pc)NP)O?8kF#8H|lmQ|LUNJ!?zYtP$ixYrsDHtj^Ep;D3(Ws>%V$y&ZEemCp^7mbq834*dB%rjkRQ?7vDuu^- zhLrMrq*&7|E-fcBSVaEvY6?!DN5zZJBOi+h!(>^_GSDb0QP*USk#txJk@hWuL{LjI zd1fe3M|SY6Nj53u=^2rtclZ@m`b?kae2u7u9`DGqrJ9Or@&!ZLiDpWxXQiR5r<-l0 zL76BxyJI{;eohp?CX(=CWHLfwLl(7_F_PfR1hU#%TV-JZSzxW0AisrdjX*3e2}VQv zS@l)h4DOWdOJ14S`jI@zII7Oo6qr>PF zi03jbMT|89QRreUvI;|vSRvRdBU2+3ijK+G5BLj|hsIQ>8?zY!8z|(kAwgxJ7O*fN z&$OZwL(w5BFD{!f70Sc$Zz1OpEog03wiqZ66joVTDU>L(kH7Ef?UnDVSte>@Sl^#* zDN9U|S3Ey%{f&21?<>zx^zd%^zT%?msQQYVvcD6bXjXibOuI}*Sy&UKK%Hu#(?k*; zQF}>ONt<CIC+NR2;9Q{d`!Ee%NK{F{CSa8JJ*ewKdfgia6L7UuYmQNaZDEG*JMR z0fE)k)ilUd2Y?Gq8{hL6ED-i7@8{2#v4-WO8}N`haZCU|FOY^;@Atn?6<6Kj`VGs# zbli@9z!%zk;9;tme|wJRogao%9uVo&lASp*m_xrT4vq#{c{yVN5pi&cBVi~SAN_}k zJf0Bv=72CKgd<@pVH+zS-yRL1Vd^01d*Amy8G%$S>&6=4b{h6x!Qiqx?;Q3SkdAPg zMgZ;uPHla@tlS?v1!nviVeL2<7J(OcibaR}XGaC5XfqTD+8+3kAfGGC?;FmALD7(l zBLS!hWK?PjS+i%;md%@miUPbMi&$lb@3WGf)li=&6Py(2^l*TRV2WgJxPcOu(u4blLR2B1 zAivzVrZ_|;B+<#JvizRoqrkL87E-o3;|Apy9e-F4ikpy6C=ePIfq=pAfUw0xDj^Rn zVHFm>lC70g;T5bT`15d6T_-zbGO%)ioMMZrℜ1QX&hZf%6)sBx$8Zn>%>mfFLN* z+)T#t<3xAgO>^eVv5)teh8+nJ4Yz2zBs#$_IxrZvbtCtvk9UulC)3EE1eQ!rEL8-G zl^_tL=;H@WjiStS_jao|SS%r4{F#k2>CmA=f>iK#C>G%L&<2B6vXALue7+mV8+IL2 z*3HbA78F`k-0qy^6)K5G2| zR$MCX?P-W`EG!mQiVmo$thiKesI0V%mNhMV*AOxm5QEskP4pzncWJOu<%kDc$LG;U zAEoG$CAL=E+&Mtoj&{(hnUz#gl+~`g_dGz=OFnHS^lHB@<&64z`9?1a6hvE#Dw9r+ znU(5=U?WgzqxoG$B`mWbzuY04cN2L|N;!4v6xG+)i!AHu>7nWD=my|#r^4m*zv{_J z1k32zovoBG1GIO}MRe$=o2acfDhQiZQ%t>)ID3{F=+^hlvCji@LYxZ$A0t0KZchwE z6h^15s_)6q-WC>U%6%Z-FXao(r1K*)U}@<#0{x~x$8K^$h_$D_jvg9IyzNZDVb%~K zqmHu7f{B6X{Hc>CRh}kKKx8nh@#_0;>5kCOwq6>Dr)bylK04YxNXL4@RLQ~Ux*|5< zeJPq+9;6Sn@1ldtFQDp+7Sj#q&XnK&;Kg0Ey{(5nWVsVnXz2#|PTX6*k<26S6caeA zy)=2JrmFuojF27Zg&Q*|?!ct;N499nu>p{*6iW}MLYzDnKfQ#ae9+6(1EU>j4cg$< z!Q4ViD+PrCg1mZ%peZuq@E&SER^o5>w$qQd^-^=!03B}cqcV0$^$jIx>9h*EXu%X( z*EEgF3j{8pp?zf9X z5AdQgKt2jYc+JbpB1)1+ltKG{C9#YB&|(E}NG^epR)*{(r<`9FFc~8o+Y68&mro5I z4V)?QdQ$NBNe%(QzX=ngf?Z@l7`_La$w{=e0-aEd1})#HIIwXE5`bg-N5xa?f| z+l9+1Xrye9jh=wMp*TIgy@hHLJv6hrnEuos6odMX)$=ILuDIR*@hF*}`~Q~ z#`-u2yKCo8+V<94b_gi$$VVw*&kD{7r9&$oUThrZ2adxS<`LfqE#D|s>axZv>Wjn# z0eW(r(fsm4Mix`r{Dw;TY&Cn`)-9}(NQMb^ykt4OyiYmqn>z>T?|$=^AbR8O<5p3M zDKb#|MV)Dc&QZO$*skdlio+<$Qi$p>D@>=yZ|{u+IS5n_?d{*jgE;+p?d|R2Xx_bh zH*J6WZR)k0%9s>gYo~mCilQ_Eb!r_TU`6p^BRcEz+_FOIFc?`l501lqfC7iCAa6}+ z5k0ZBnf9OPmfyDYMCdy&yu)%&U9*=p=y1xA1t3lZe(l+_hxYH^Pdyx(TD0#?TmH?e zDWSi;emQ-F5x)CGzm>b97BzgLxIe8J;k!aB2@CPi0xS6Jhsd!U7Z_nDCoT8f>E^b& zVHmbRg$WPC5-cvp!`xU4o}K zEGeZox9_IPbIzkAD@xO5%&-mkWizVi4+l==-beW&HnsYxysVT>t1v%%RGjTv1J%h} zDpkap+mo$knry9o7y_}9hCIYzMOCGYec^tpUGE6}USk+p|@mab4T6mXo6alL| z>t{4`Y#pIauuw!MUyFpOXrKFoc%0X6jt&fNK7}KbE9py+bs!s+f+lG5*q? zW3;?f<;xsnmRiMZwxP0=7M^ns9XxnYv0wguSujNlDi-bs#kE-}w>u38Z)pv?z zYYi(ut#q4Z4f|u@>X3O4eQ}P17qv zbj9pai4o!&EsWS#54O{QC5K-4edJ?#2rUuI7K;&V`nqK^Xh&O5 zcCuKJDXd*7?qjyv_ni`c=84_y@LJS645Kt?l>;npx_jQyfw&i1kT2A{JH9O5#0#dQe62t?S>x z>`|a*5q0zp(&iIvg%kKfO1)b&BXBs5xql;+Ls@O-HD@f7s zMBr#HGaZ4in_4f&mKB!TS;bB*%Z(`eJB#fZ8C7d9NMVztfxR(7p4>z{K}TC!sEJuC z&U>u2jcV$q2(`g{K_1NF#f#;7h=$ZMt2Fi>pq^BLq+2XpWKtJXA^fFazpZ^klCv|l zw1D=soT6v;c8ih%lL3BDKoCG` z4Hn$N2t*zXK5J`h6AHs;OB%|kV<_t>g7&NPRoBd~r)gy>SGB&_FLoY~rvXNMZ2NZc z$~?N|2tB_2I4^=lQa`wK8Y7V9r#&}Jc{;^nvcOQQSmbZgDkVp78U1PCc~YWA(VBbA z+h(Mk5fewLH4;h<FE18`_V&f)v%86Q2kb(7rDL$B?Z z@%&03bq+*0vJj>z%obrn4D{ztKD;+##Pci3&T?BmI_6?WYj@6PV51YM;I$+4h(jV- z7utJ5*BU15;ICKBq^3CcIHFYv-zais0{%c&!2q)0HsYv!=c$w8eSjwdoh*8K`dD_9 zNFRju_71A5sTH<&f~g1;fm|1u3Vn=}>C==90qd+NFBhbMlCa_$XU-J65YdO3{2q$} zsq=_MLbC*mYhh%<6^GmzAO${9%?^PCyu_GhZnC+hhfWM6L{1;?kBO@cE;9h)fA}4! zFTv+@!$k|H*m6+ANXWCD+T^6BA)%(Oo?hzc>ZVRszk;w#7_Rj#wW&8M#F%P}8w`&N@qVG=d@lio%3x z#Q_Ql9s(L8kcZ!&6Xh&`&scG z6kfp|lZ~%zrXB53S~;VF8cO*XBS44PG?-Q%k{pu4KtLv1N8m4J3eynTw2AKc$VYOf zj!> z1IW`iefH9&IrpIbl~80PJDaH!>--#!O0@Gz{@6uoq7Sjh#aG0BQnZFKVl=BdKu_#E zMKgK}=o6PLkz>F@LAj8HLH5!B;KqZU*})5S-QqebE-a!iKK`fd^*OZU1|{DVBJ+2r zGL-g>1S^j*lQAV)q1=h?QFQ{-HHv!lL-TWj_EY9FCBPoFA_3NjhXlg#J5VAf9utd3 za$sYc5}|-BTC_;ci{C*WmRp^V;3k_gB})l7|5#xEzI{s0SS4n&YD#JA{-f+OEfvZX z>g4r!^Ep$+V+8K9ZebvnqNwWG9pUK!1N;C3|>N@z_Ir>3Csw0z%E&#Ogjr4``@^bqo zk%Ws$sJA9tsK`?H!2*F091r#f>N|J&aybr^I+x|1HlQ)tnuP%-+NuiFjqnXLT4}<^ zipfK-9iSiov5jtj?_6o6_13PvtPS^blwK9hfWv6NEEe6u(ll{MnYM1-N+pZt(FWFR zGv$TCmEi5zy#FLsaP+|~2ZuV|bg@wF2Ts1b6bLH8B)})B6$qU*4K*Ez0EJ+}5kZH2 z1b_kpM1yr|BtbR-pxU3mYL)$9V(gbqzT?;3y9{g)Znpb3yibHbAkN;R<~ZL^xsO78 z{BPdrBwzbUTE}eiaO(+5`9oCYPYKx|y)VS9Gt68AX&0qIA6+%KP!yVL*)RGJ8+XvH zt5jlF>CE-R?ni~fQtvJWPMbd5w+Cee@(3@;1IRBlNJVp0O)X;6IVeXX@7;v7&fdzX zn)`xGin`hE8ybp;<_1`~Yzdv0Q5_edF@N4FhS|e`Xi(#p<1CjeOq$Myerq~FZ#J{m z*%+s$*)`OYG})x#`7zSsUfa>yV@FxwPIKFXI`I5%QsAi3MIZ_C339HADbe})y8(DG z*hz^PBHKe0jf5#OIKVN)eyRUUB$2t5p_I&zPZW|zw`A?Pqup%c#Mp<(4;*C|V1mzq zb84;isyU_9SXm?#IH#_h{%Ub8t-WxSI2OWYF>Ts+QZ)f$z;Q>rl>KN1N-2E&rJQ?} z#;;`LXrazg{-10Lq`wfzSox4(ebUb`rA!*Zi;-LFM^L%*oCm?zHS@AcP)kpkLqc&{ z*Tj^>#_!KwJH*C$9o0YyOBvJ?j?wb@jbg$;Bp@&iHx@iVa|+{>45TD&1Zj=eES*ZP z9_pmI^%bJXR4u+I=h{kZ&irLj;ADeFR1$@uG4!ftmKSEX8~aJoqZ>t(sg$&oRfvMU zGm3NF2~ak6I%0Th=G7_WSpZvZMny4ubqd6G?JB6HM5scL2k*?!e*H4Fv-ttBv9GO@ zdIqB+zri+P;J<#j(>@o1yG{r=dXIXI>b;S7v|OTjUtZ@tV+a&)h=nNS$d0g`I4JT- z5|daXOiBh9`u&)~{*0We+KB;Tc&|8Ocup6X4dSR^`8K7RU2gMj$2P|6Zn=_*SecnJ zrH-Qh61E|g&$fl_#YZ<`f4Ysnx20Qd`CFI%fQs*WkOH&L5r=^8F_Rvlb)#__ zEEeX0M&ch1vOF~Eh3ddUANk`EsXCJEwVnvo@-5VqWrMrYbb!qzL|EpsW1z4|)#W!< z6$> za8i$*@3QN+wD*U1(T&ga(yen0>gVfR^~+XzK79uje3G@cSxtgOogeB>5gaS>bZ|6j zb;$+0l~z^EVuX!aly}>zIreWf3)O%O?%gMP>BjR_m`aC|3Q=Co%qd+`P4!T4a8Hhz zX_{7P`$hYkpOiEUO^I5Gft{wa67XAaG_d8Et6N1RoK>^esB_?e&7ZPcF3XuXQH$d{JG;b`0EMiXpUXlY*{o!jrb--B5i+TvuxQu>6$cCsIW1-R z6PE=tv$BwGJAbx(f5H5E(PjaNNT8#k6GVnt{bY1LtCX{af)YnnkdYt)z6bKglX9e-ATVQZ>R9benvx$O9hFl zQFt~lB$LVA{K{?gI&(>#qyF95Q_JaTrjYW&g*hzL`5pihV`n5vH`i8+5&v^$p~zM% zVHtShwat`aw;4iI8WQoSEUuaCQgbH!y0<9MnrPCDv%@{BBAEzsR)1Mc48i2$gpYqcG>ZE5=AElw2{)K{bSEw$!B0IFZ zY2-0WdATDNK>!U5%0fKB-L@j5Ya85f;oNG{@lair1c*dTigBD1*=iT__3)ieltR@~ zoXsdvf-E`c-d_SqU1(;WuhL6_lHZ#3kJlu(BlGGH({A~sQ`rlwekq>m>=r;_+4e6V zr|X~Yp|3WLj64nB;Gp--vxu&FvV-UspQqH}KUv$a;UV(7nVe%j3It&F!}+a|2DzmH zEL5}6KBhcma(l@oaD~$9a=K~RRNG6V6QzU|78cXFGiz*n5Itm^sfJn;#j#FX77H-w z&{8$~oJc?LfUPW9H3<2Tlo$5DO1rreQf^Nkf-4vR~YnxnT*6IIw<|0_fo87 zw?ygf?!FF1$!oOxpLvXW!>$SofjNFqW}(7HnQetw?!C;BhHQ4)U{1DLcVPu}wwh2ch0?=@S==9(`qr?< zn8QNRX@VWuMS-CBK{Ys8D4?UVftr8)JKC`36s0(*{S@OWx_qU`NacRZ(C*`Xk_d(z z87BqmGBedi8ErAMm)EJ8(4dv6;Pd1Hqk);N{vDse4CKA@ch}PDr{eU*vnPf;4Uma< z@EorFO*fVO;vPyI*=BDEC)b()1^Prg&4?)hMaIoSTe?`~XXF71NNCCj7fdatDbIV4Y8HYo>D=RnR*A zPxn*Vz4ub|+H0u|>4@)n4;7zv7KOj_9V)+moqgQ)mM&U3vzi8uKA97pPg$jENoj;T zxjo=CNbkC_9y}3+WvpN;Hos<>_{e7{e&|gJJ81<#%SJsSaVX!YJ0C4>D5F;n=9Y$K zghJJ72h!Z3ByGrN*zPp@`zUzz)%5!7uhR=Jyr8@yt5;KU&mQV!A1SC8$-q0oMj2J8 z-pyg7rfF3fPp+TW34XB9F&(-8544LFmg^^=u#6R;*xbT)^0kb_%rE~p#hZ6Xeu*;P zvzuW7@}-&U5$pw(NbtruLrLF$emDQElm@U+cPPmQUN|OeqK`fH7=8D<-xUhluwesj zVRj0EmSH0uEEK=r-r8e3+0aWy1JWx*>kJm;_4%GI82QS}3rl(+WwCpqU%^; z`JBT&c7j##2lwaxW)9oDx6YvngEsbWe5!*sn)g!prtcH6ov50n1{~Ybd8e7{5rAVM z2c4m$udyH0nFk9yPj{!#cAl6D?Aq!&+(LaddxeUS?}}1_XMg--`W!1+6}44#N3Gh( z_~L~Pk|)zxlii{K0Kca=N3469?B)gl*qa6`4H+pIOsh^n@HOh{nE?AX4?S=fUHepT z4%=+uMSb;uXXt=OmDTrG8FcSy?wk0HZA6bZXXw}0*HQfD?~#A@xwZowqE6+9WIZ+R zQS2~2=##(NK|i_eJ+>B#0&^r*SwgaeSO|1{cRf?!c5oitDAT@=#mDaQ&EGy{6?5= zPyc};(^rsDQcb#f4{~ate!EBUDH;|)V4)BEZZFNPue6jFXrKm# z0^YUmRa5J!@9eWF`ot5IdF2%{kSF@3FOd(W;;aCHdKWcRi0u5qi+kv%6*FnD?In8$ zY*1g!Y8nf!awf9)#C52$o>b+G()3tZAKgqXKfar;eVSL+qAc=~%nxq(U54K29r?sx z;}`_nE+s++K9JJ3~bH1Vg*(F^ruwv@Dj2R}~Walq;%$;QXmE^yY@*)jswH?0G@kiSK{9pNby&Bn=&TTikBC z+tF|>RF%M0RaJ_Og{VYJwE7bo&U0jNsSNC4bnm0W9pl7foga7Be6R?A3$t|^pf zWw#v~>g{OlRU3o^vd(Yam1?rK&hr9Ow~`VT)V7`4fAkSH(i8Nh(=^h(;KBVFn)_cF zYWPKlKD;SI9b-VU)7Y>2)n_Qtyv=R`q@Bf1r?HN%fUUxm&|0YWgQg^|na)9i8?=eB zWabn~bal}Te=?_X*Gat^Il7w#0=ycO!j+zM_9@MjkgCFB!c1D58V2^fNXLJ0J6$=3 zsKP|xCycyLy}=3)bE!^7+^?FMvR)XQjRYj#KG&ejpXj23$39C#hqsBHs92@7>lf*E zUfH%@jS}`z{z}^qDpVNDL4w;4s#&Nw_-DuWe4JE$HkEH<1J_ zeGbeL6362FoW1=6)Ya1?710r%0~4z^bl~@N^xr>E>!0l%)krtTsGAhI43z&oIQ*FH zJhz+j`-^kHY3!SieU6fc-?At%ZH1y#3WLw@_U^lHShamzGq+|~gF8111ww-y8+`mf zpBctNLB$a%k4{Q|Qq8LM76pI;+1SIB4jHL2Y%8GJl#%4i0%15m%Ch_V`=zxe_AS;S zHT}$f|H0R(_1`{0H$1Oo-bly`vcmS0_Zf8EiP+?y*Nqya&v|w5-d3B}IEEI4& zT1D@F&q8W&vCtUH()!{8=?whX))u)AfnVM`M`+ar1!{5X5EMq=2O}@tw{BxZjP$Q8qfucV`)$vwHRvhUG7}yShU;dq zMz_YGViyG-j~Mi7d+ujb*hTm)W{*YVsL+7#w3|8S-)@f3oynIeK7-ZO(mFdNh8NhC z?oGY*SPxHbDP6I+fqkK>6fVYE;S2Aaq>_Lk4PB4*MCo5&*d@_-w~2w34>O{4AO*j_a6vsKn3wK9)lcWouAx-4lOq($9u%1?yBL$W_|me`RYJBefL5*c2UfPX zwgS9H9qMzBz9$Yw@B8vngFb&YjTz=M5}T?G`co$x&Fo-^F(PM{7-IYV@)CY<57TNz z4biqPqQjQPUCZN4C@f78rENSyQR1L^++`W~A>u*(-J)7Q@4D9Hjk5u{f|H zA5Zp0s66Diwl(Ec3n(4h{>T=V&m=;Ir*RfWUC$RE>VGB zeh>MD%BD7^uKsA6dWT|`HabX^9sSgGz3+#wbo`%yMHX@*!qu1v#yX}tg!!sghmyZ0q zT*c;#6u~; z*}k31_wA#qo3F92i_ld6KtJhNq_Z`%&XEBd4fu0AT)87F_68n)MS&^>armey&^=BH z0vA^p^aelM5teU%WEOddpX&&lPKO3yDr5w~V}-7m@}~mM<~f~TI{I&NqZs#4{6jya zLCJPgxeU*L=JLGBy>2iK^zhC-HpCHm_x5{GNF=eyBOL-cGJ3Bi4N6JLPk|DM_T{HQ zxAv*WNvqHWo1a^zUQS463_GMwl~ak{TaTzbvrI-F#sM}t!u(oVId;1f zNMw;jH$2rvPnv&2gSY*JBLFKTiZNE?0Wu!3JE;^#ERg-8PQWHvUh!J6&}2lJEz;DT z7m{oTOZh2KQE+|=947nxlSqLh0oWk4*77{wq-n(leXWTm1>gW5Od9m1-?!8E&i(}r zOkZH9Nunp47|JLt?e3ufJE|E2qNF%msd(jhp+nT5tJx4hs)tkFa>JP?V_N&up9uv~pVW6snxrSJ4V9t3S06e|gU>xrnYK2n+_8hE^9t^FbuUDYe%iIo zDi9p!A`Nr{5;GZ3V-Lc8b8F`uAa$k5eLwB+hrMY3X zxY~3kTax{U$&L;R_V&@8-?^U-HqM~IZQEdtyUt<^Lm((PId?9_T^m=)e!F>mQjmYz zFX}h5Ted4_d;U@RroBg}-&c=+b_5Pg%*Q(nHg^zxkYklUX6L}-D{rCxhI8!fatW@s z9HX-LzL)x!HPKZAgLLZXQSvior9F0(_S#$}R9j0!Pd}aWnP``JC=j`#I!C6!+Bf(A zO9~860s@~oMsz(R?_XCLwD8IebZG86s;;VL`BthnG3M1Dnm3mQckZHw^Hxy#`t?-* z_6|yPbV~A)8@v>m(&^L5Ja-vWa)u$!wD*<(6m0Jq7~Vw$=GYPYT@HMSoU6 zG$J`cG58A0ypO(05`12H^#|zSoNK72wnloWm6w%~y8(OWjOmnFwUUyI;3;?9POYhA zPSZUN=}fL%Z2i&KSZkd^HEVC9nrm*O!UgBhk^4R--;I=Q7HQ8aGGeJ(srDm{x^ z2yl=7>tD*y^X#KMyORDa0NnMn?N=2X-|t>xSKB%cYyE)P=8CI6NQW2RNcBv0H8r(t z|CPvjofW|7mS|7*tdY+x>OK;s;0B9Fsqc;FsPx-Pqo25&?pk2bdZxr(z4WfYQg*$~bGXP(jv-M>0~D59U&+w- zRvNV6id*RDg6pMkXsv}nUD6EDy{G}>t-?xMePPT{5tXmHLL30;@SyAim>LRG<;6FU zzpT>Qs3gBJuXAKj7pU${%R29IEEEU>9;_c!Z4O=e1^VP&AE!@qK=+d8GPI+I&N!^( z(A}E)tnhCgV~HFT7EsJESek>~B6K-$}db5&V7H7IbdKIu;7l$xwcu^0`WbA9$4zncygXoLzHx z`H_A%aP8OV4&1|kJV+O9%+MRx8nmdK&KSVQ37PkR)f=EEHu`T~wiK4XUv9~~dDkeJ z$4U!i9#*49lHKZqA0EM7z<3dub2ziqDYt%(=)w=O-Iu2N##uSXN_}6R^Xs@E0F;wR zP21MMkI3)MQr}iks^XU`|fGkyzY9+IwqnCe? zZsy2v_@SSRV)Oi!hJZ+?{1CU~o z0|mC-rZcp)Vxh9QCuZszhB*x3Xgi5ElyK2Gb3H-nl=jX#Lu@b+ZnF`XW`gPOA8=ep z^@a&r-WniC=k@?$qk*jpf*dQ^&^@{OUS_9^;-5W4*IG!NOm^z5nSdNbyfB|JzmX#{ zAAK!D|9qZOSPsp(mg<=Du-L#hwYKT5PSO;pcD@eS9{uraqBvg`QJPz!6_yi$iiIYI z#Rj$f(+N)U9^3I*ySeH9FsD#; zcu?STjJ#Wz@?fN&#lB5=Sg@ZG`gr3WA@gio$WI0n==(jpN z0miM!czotJqBPXqN~!YYGjZgTGH)ab zl%!azT4}rpOh$V-6qKO;W51>NU@KM5y@|}o9&6u;}O)^KXXN{V)OoK$S51z#YziQ(vlM{Z7}FJEox$6 zq{A_dr~;68WZrdRpjX=3rryGQcW0;8v=C*!<{K8|98<>=Ll)jPoPv#M8qK#x59 zF#Tj-hMrr3yeXlUyIWE0^?E|49iY)g6w>4HR^GKm=Yc=+F9&!CSX`nli%JxCfgMW zH!U{MC4WO3JiH?c5AQQtF_^S#}f>XvNKB<-lmr z%u};f-5gJMM}%o$=4GjdP$8qu{zRJ+C^>V6qEvcCBBwDd%m|cS>$u>VfMEz!Uh|mE zezZ))!z04oe$nTYvH$ajW#Ugqv2hydka-7L=G8FrutN+e57&gN36rmrW7T%A8Sw`? zA?_$+hKZp)GCoE$nwz6V@nB>~KGR(z@NC%6uw;Y=1ZfvlNwYh?r=*KA(egvmD;#Sf zoygw_YO-J$0(E~*ufAlO61y(?Yq}FDb$JwnF{4go+?r z2gAejA)zn0@r?vuw+8BNvU@rP{V)XT{0qIpygCA61&T~$6XO=C?RjL(Q4D8P;UYHD z_p_a+Wgd{HWgfQO2^RW=U1Ga(rA#`t&FllaH-s9on<3>kumy`W(&@Z5V%lQaLm#@Ad1JnTT=I1s_s^It!n-D zcfZ@4o0}_c-n?0~+U?@(GtU$sU%gsPPD~W%&z&ni`s9;hZg#fV==J=wQzuUrpIp0E zy!ia{#pia<-tKO3{`~o3Wo4zfd+%Pcy}ezOLATp2o;iKGxPAL}aeQH+C|WJQ{^b{6 zEI#<~!{XSnV}9NJ2M>yi7cLYxKL5O!nw%`g$H$93`}~1@p2LKVXKZY&*xuSIo`3GS z;`(Qw6)UT&{`r=D*0Fc2ZEO^KdwYI;r_=F&f=!!K$L2h1^W&Pe_4Q(VXQ%%?@8{p9 zJ!^Gst(dT}@b{L@k-zoa!+^Gp^_bBCc(}aWfA-AGjN_d7tlL~3yN?S$yK$qqbn#-b zZWDk|^M*`*-Z2CN-2CjNOU1GgiO(VU)lWYyo`3e)V%(4gA#Q#7WhL=o0Eou@XV0E3 zZW$40rl*UpAroeSQ6Su|F$2hlSd0fGF|lzYQW^AMDnsg-GiQnqKl;e8XRN${agt}k|hjZ`S_i%BU zbO;ttohsUPEu6Hpv{dXGk{Il#CM_@pL_m_~=jUAlUNVUUK|A(Nr1F8?1F@?BCPVre z5AV8n|GpCrfVpx+L&Obx4^jssGWXp?>Ua+08#9d|WP(JHjAU#Y;SU?oY-olR8#fFF zK)h+g*|g0aya3Y~9$d?uTwJ^i!5|FW3#Gp_34xg0$Ui>kd#*zQdo~Fs53y5~lL7-c zY4;tA>!zosiV6FSXFqGwg~UBD20#TekV~dE`5WZ(p3h8$q835!vJtcnaf}6m@N6MK z(6WCy5n(8lD9DpSBazzy%v99cFX7Vnefp_$MusB?gE zFB?O3PCxU^WmF~;y?N`FPYUj1z^E}kJ9+%LPwLK{JH>M*HFr%~@7GA(i4!M^bGDX3 zgk2lN3A-ODJ8P8b(c(J_Z38AU*pY6^RtzH!7jLPKqYi1BZLp3K;S6+Up_|1R(d-02(zh&boH^5Mvyq9&BdALDkk_WC+OF0MVwG+f+y>3Hk5Q5IV zZW3}1HD{b>vvUannHV$vSqaEJkadcCfVzYMqz)O}Rg*NXgUcB_?}Jf%t+mfka0@1t zjG>8E_{z(G>lP2{L4vn=FcEw3sic;7})=AydhT^DDEK4Q=GBL|pdwAf@ z8utK%E*K(FIdJp!Kqv&?32XCXQ@L7@k!A>h#9TDOF&HEgHv%gd)Ic*ku___cN5<1wb=`HYw69n?@cckXQQ-uoZe8sCPOi&iF0NDT}O zvq;JzCd5dArGO<&fFP~MItj35gNx3Oe)z-7nD;yk)rK(uvRIFnlLw^0M7f4_47G)7 z#Q>4Yh4V4zK?eUIPt3WNxtasggv7wzs6eC@ zR>M_zHmp`T%e(-C=(bs}a2XSIHEk-J-?2Q)On*R3axz>P`GwpM6JUA5Bxs2*?fWfb z2sm<()G-dEPJWl%13CT>5hiE~Xq5l_^{47}8h;AQYnnqXQ!HV2FS^gm4TF zF=rCb1>qn#gW~sBUV6!;74c`y+NiN+Au^IWZr3uw8z#LkSojXfW9?uPJaZK%-p0>b zm%9on;I_;}G==eDVdhJNM`{dVv*9prH*g<#_qSes#eR0pe?3*a{ohxL|M}bhJ|@Kw z2j+0q8S|cuP$ANU_GA5I4)?+ehjX@{yaZ#zC5g4g zKI3;BZMYu;fCocN2!}Ldn$L&YyclW|E)p@T3SC2Ylz3X#Yn+dt3opGV!&tvBzihHlKWs5-pzZFIzESZbyCN7JVR@n zJLMHjngZ8i6M$$BY1uPiJk-8RyZz(Yit;eOt5>f*=DYQg%sOXMBi9N*tIP$VCc^K8 zX<3p8m~2E0HU-9jlqD5kg3WTCAAsiEcNQgPe!^)Hs&G(&%c3{YO*en9oND30k zcU)U%%`zDzR+gw|NbH?27~xPUM1P23_QKa2WT-fY+cTN8q;6REz~iQdbkv^4?gX@V zBb}2WrAQI;b+a=Jw|(;q=3Y$#1+3SOV-o-^H9O(gg140d$FCy5?XCMSbB4MP2Ks*m*okVS->OeAUUe&tFV2FF-5^x2@R4uA;?2v_B)8!Y#?=YAT^5NgalzRGuM>3Tm!RAMk-6lXT3)N zARY{%H4H=SwSW32XWCYT6?q9@Jz1tW6LKV70o_ zYu_P}ZdsaN$L|n|zafYWoV6@ADS+e71d%>Bb&I5;MwmAD6TN|nP`USwxG+O^fOUu_ zIA&bxIXoL5Yw`AwF2OJWkw7A`(v65Rd7$6M;879`CnU?R5fe>^G@{Y4f)NIu^Ian* zMjC|6T`KNL*ZHmFn!W^b5pDqK8Mp=HvLK%}UkxOq-?;{)ASIq;wa=b2wTU4EC-IW4 z;7CbM8Q>bgmAc)=`rX zQE4fR6*L&C7RF|-0N3NVBOH1Bmo;yqA{59yPC!?8_7Kzzw?H@|_9qPCtbG_E5VcC`#v_h-FWv()U;v!A&$u7s1uph*m=OV=Zp;YN)IESR zJ(pM_b?)@q^H{?e$9VW;%xQ9hHEF!>tB%K-rhCc&W`6#;XB{t(5iyu?It&iR#5={9 zFdB14E%G=2Sf0Q|8hv4GsnOzbU^8;S+e9!&m-rzc;MZX+u%@x*5$^hyC3D|<|9uZo zLuADMm6u<3YmV3^(udP8XA};q0#ZFZ+k?x7Aj&d$C-)<@xDRCKH%*Q5_jrS~jS4<8Sa5c=IuG{aLVg|3CK^|iG*)I zy%IS-IG%NrNrNaM9SLumRp&ienn)%HRbCL{^ZP_3USUEft`m9J*6{g91hz5pu67VZ z#vI?F;UEh5Lt~+7-h1yopNG305u@!B&gvtiX`oYt8kEX5{$`w zkPt6XA>Nue;@RJ4rmAevh!N|P;WkGocv&hu~5HK?|VT^7-GFaKmdHE%1-1ua-V!J!wD+0V3Wr1ghC{9%s;mBkuK`-iDWR4RT8VXIfoX!+nD z|L_Sh__|;>(#g65lJc+;oCUIxatP;jC<81^N4#A#6P6gv#Tx7(GJ6(M4DnZ!lE4(^ zqTUm@A3kYQ>C$)st*evq8Hg0&6?g_Ps3vW!IOB|scc*KBz40?Sf}bjVam!w3SyuTn*rp=@{~=e(t$ZUsYXK_ z?^Vg2r(2A(7orR?&uECNQSYeIs+=Z7nT&82V@cUaZV2z;`BiQScmc7u3^yBLFQCmJ z92yIIp$aGzgXxw_DgY)TL%~`PqaaBAdB`%he|+x*gsafqQ1_yVEF8q3S+7ue=<_OI z5^lYk*dy)`4oTs&vbvUDNKhTfJpjpa5BME|s$%Uygw_OFTaXG6x|1NK6}}?tCk%>O zY)A1gc}BSi{v78S5xBN2AdrHyd=?}}({v#OYKch5w_bV0Rlr>q*_sD} zFmC3ha3AX?AtKgCp2Of6)Mhx=X;qk<u~?g3J|7OD}#VGO|4_oGZhfDz--d*k|a zVaLaUa63^yd6lFc{W*N5W@=c#}~dR0qtDS|N->*2=0h)IP|b2_C%|iv^R& z3nJ{+WfaL)fmfE91Yn^;EK2bBjKL6@LHba;xCcCYs-!Gl!Ek}3&a($mpCSvB_sGRb z0iwbnsC^*}70TzzK~}+d#7%{S-MAkv_vj7dv(LSuq$K%^W`Kx7JgQUvFj@&sPzG{Y zq=CGxAmX8QP`2Qx)S}CO>VT=slutxO89%uPQ<+*COkNgjO!(^|bqovw)LEITh@Per zoYHoil-vUd$J(lXic~FfE%8`NEM&m&4%C*HN|Z>PA|G497+7&IpTc5ZmkCmeq8~~t zA__AZsVTNSb1#$Ei3oL_dmADpG8u1%peV2ri4JQk2r|Af7WVZt?(!(*Wm@W!xUZNj(nNPiYlNr~wF2!;s7 z`{ryyaIcs2MJJBxA=4<2EKJnYQus#PPqjDC&xt3C6U4~<86~YP&!AFvmGkA?h}yxoL-PCn8Op%|cC~M|csJ)}^Dk6pp zuDr6lX6;SE{ZPBFj)1Z}HU2XEK1M*0O^S&KKmHQdCK-3EOdNdvhRd)(*CR4M$SL>5 zI~q5*ekKVUln%l?g!f$1ZEOU*y#gSD8JfpF%%^oQ z)NsE0!3WOi-jPcekvX48zzMNaB(~ zz~5UB&L3}>J(!A`f0gthJxl>fVh|t;BS}#k<-9PAG+79TMZ1)hB(i3LEQ|;l91ve& zJ)Q{z)FDmfg5#0s^)#7{b0>)H0q#gmrH}@-)oZ9sjRGKdLvt|3*$6}c3Ye_d)Ter& zU5zhT>`BSL${zXGMGt$Oeeo!Z;F)rh3X+tV-n<;*5pj`w&?I{>69uTLd*G_mKI1*! z5lhG_)&gy4a4Ra_gj~uwJOh!e6<$LUaY_s-`BiQeMn@IML25Qi9N>w_$S;S_$-ng& z$7GaM)TNY>(!7HT=>m^r++9M8NB*KR7-{rqI$GHl<67?Z6kRe$^)&K5cv-DjE4vsg z=ycY(mm``2VlatOVQ~I(^tLxCbMPpBNS)k+ZV*kGbUEdy1vgUcdyxOGxhCRBZvZuI zkUQi&U$v8~k%`BsIT0Z$kuE{hsoEs7l`xCMi`A)I|)^;v(hjP+!x5u<<}*4%^Wq zHyc}Qpba2+9uZO`7Q#1l#$J@%FM{y);?rdzn1QCJY9LR7C|; z$dkgp;v#wvf}2$iC#2=X+lyqVIF-q1&lx70Ml)ax6%R`rU~nx&*`x2&VD}(}-gjv8 zQMhk5D#P;LyX{B?LHyHE6;>AXcFD1K%q87GWr6rUGD$9%s5-{ji>h^)Rqx_+C2iYL zb-=&dRIE|HuVSj2%JMD`;K2ja8BuAhz%PSUA#Iu|hr4}urJC*^tlgcYiY)ad@yDor zB(LUC9wQ1WQ|2_^d6$uKCCukmGmSP>iA7`s*GK9r2Qdxf^u1u%>Lhk>DofnLB$)5> z(NL+fjvVBYRLvQHQIWc{W@~IlxgyfF8nvttmiM6*wxj0+Ebi9DLisNzo^LKwV)b-G zzk6adTCbL)fJl3rxa1W@=|Zo#Yrk)R*k^DzVKSmSPAK~vH{+^V!cu|s>@7w_h>0== zS)06<&$K1g{Q+eRs@as^<{J#yGpcr_@HL2Cp`yevCm{1xolO~t`5+p&=5OzPjIFx} z0(flL#_|4#AAW`J0n+E!$cGWU@!D(NGWMq{S4vG+9t!c`9_8%dct@yxhSZ#itx3{G zMRAu9Hl20CdXFLaHy)(?#s(8zmy_fZmvN=$}bLXQr zWGz&U>Oc8=LO}vkaY(+b*ipgbv=wR)%TRbKD?FZ#CYBsDZ;TacY`iVa=Kehslvgd< z#kjx!`s=X-8B94#m>k2-AEnes9ta-2^-==OMBZ zWJPnQTn#}#3KQM86Oro#q%pK*m+y~b)-z0w)ela|Won;+{&rh7cbC8cslLwHbLTFL zvwXXaFues3&m$#?RSD!oV2#j*byQlXDwB!NMs6+zpSVdX5=sOHu7gk*M2b0XB|G)W z0r$?}P@BC0Dn^Vmh`@}Iv5=5v&Sh?oc24x|xRUp(U0P#Na30WxM2ulIg8u{|h$(wz zbqD}q%3jjJtI~`?3E#fHP=%BTqkU7V%Dl?}4)PFH;#bMI$qBAP-A_$Y)es5sDNoo6 z|Iov05wvyRGU|62TU`<~1;&pna)))Zf{1DbyBk$x_-jQ;5!6<)hNqy2lBxkxq%&4^ zIss#0K?_zQIs>HRE&`DPo;O!jH2A)R-~uKqN7Of@VXa67*d49 zDH=n35s6fDCK{ruh|66ZyI&=Ov(cuO?hx3w5#sN$u#{!AfKM@9pMb%jxL~}SPGo}U zy;#@tnw?JWXVyS_GParow) z<^0slGTUy{11b2=h7x{lqVd!r+yvTc8gYl49SR3@$2I{;9cqh=zBsHCr4D(7-#2Ep z_bYpzFZ3R=i?vUCv^cR7PVYs97=*+4(r2o}QM2cAw72EE1E#<|-bG~+qN=>{&`|B9 zQ&;0jr6spOdACQ9>>jTcr;3iPr6ZU=8EQR!W?fh=hqhAp5E5>{8Lyk%AizCf!UO`+ zohl~7NXXX!-?6qN1(O>kI8RmV*M?u2+q9qvJ{zw?fy-Ei6mwLy1FssOZEoK&gWy%ZqV`psvO7F-X$TaBOX z=yYAFNaO-?%3*G-;q^G9A~!gEE3cBEe~N>uXi>TWkO09cbFZqPoo5_;-%xvino9ntc+q7=N=p(RbBojaDU0${%$3{Y_#N>Oqq`1npP)fl3AQKo)#BUmb5%etzk3~kA9q?IHW2+V=9ni5T&VA?I zcOUHoni0f(9^#83b=$%1qgE*^YoBuFnl?xX6^nu3UA%#amDsLhC2CzE`>v|D8$$DNEP3k6H$-=ca!_-7>+%4gk?Ks>ijRasWW36cyCS|!* z_`AMNZRF#+J$2BPb~%iLGt@Yemd4BSRLoJ~GZi{{43(YW8wS2p@cp#eg^(~?q=ItQ z)=dKUj3G5VxL=Z60S zZ$JOpz6a$Fx*IBCH69k^u7&Rs7%3S!#>>gURE&R6IHD7^J!LQx71dq|okedv6j&4J zM`}G2V)qZs=%ii8)cu@2>v$YQJRkq!>C>0_#VfR;=7g9b zzy8_211RP)L**a`XHhKwWKx=rQ=ZN|5Qp+WqxFo0*E!K}0Xf z?HwifQ9;RisPpwyhzs!`>Oxd<_a|$Uhj=QqRos;I9po&;#tk`m158-8ioWcP7%TRk zz_g7n``%Bd34@Q#?}}&<@P-)}HN$ULDVD##^NtUY7a)byVyebNJ`?MK$_W)&@km3m zr}UG8+$!~RlVVFr7z>MWC5#+Y59R1lhfJ! zx?le4SN;U&E_>Kglpy3FYfb)4FCy$u8vMus##3?7$8_v00jTJB(V{UE(at;{d(HsN z^LA{ssxB&)4N^O`#Zu8eb{Nn~2&ib1TsE|aj;E_E=l3%MqvIARyU;f_4XN|gk42ydfg~I>X++22*XFYjSAC2N-ERL#xV@yqs0H}vt znTl#KH&p1mJ3!U*VS@VVsw6=Nc1%St!*=+k7%QZZ>YQ*LQX-3UJ$BdVpQK%5z~}%i z5nwEKaa@Z|th{a}&%$pf#lU&bV)`?MuB@(3l3DJb5)$E|&Fq0s1B{iVc2WTGW1&h> zjhaUt@laW;KUz+NFo-V#)~V05FbVJzOCuRPV~oR3eXsq}d@j-`@jmylx0)SR(j`(c z7JiXh##W;Js~0U$2d$6E8!Yp`M|uX)3XYzs=^S2-LSeq25B2Hs)5Mb7jlRaEnj^+_ zGD|U_MmD#`yU7m2IpBZl`u31X+s*fExXXE?lH{NiU=Itw29<}9>+KQw1^j;M) zjS>XudJb#vt0UIn#zxy8eof#<-9)jG@1GLf>r9xGfhdWZmxeIEdqZR=%1+p<0&Upf z#}7ma<5)DPu&$jvf8KZQ|36E^(Qz!u!-K;>SCz)Tr6YTu9YGNKuz<04NaC^~dF%0W z;Zsn7aSmA7%W=B(AW&0I)Aj;wB_=>6|LyO8|EdV8{pgIv+i|2&df%uAbouJ3s^q7| z%6tsa5K-1pS25RQZAD`JyuO;OytXLu!1Do@5Z<>MLV?t=|Bf3w39cdF$d&N;I&_Ra zt;AEZb~1^uR9)AkZvvRAY2-xeDD+Z+)Inf8wlWdW#Hl(^;afg!tD%(V&|N;_*xy0G zW1U8rJk{gbZ+6s;R_oM!*FnaEKv9~s+ejzUw8N=BFtl3xEYP&#tiQ>6lxFz3i5!DF z3TQR{dqNbgN%hrBB+bW zRThDag(O3B*ueWpFzaNRe9iV&1^V&zMjUNbmd}CZVo(8;uh+%b1a3+vr(lj6bIrE|nH+FnvWUl8vr==)HObZE zM<|5=>#W+`R^vps6c%GQ#xj7x*aG`&A)wcGvWVB5(A*T(vU6vr8uT`L6HMeds{o4; z17}d}=Rx6q^l`v=+gU){JB70rI0%a7P)*MhC!m|>VXO?>gP6lcqI!IjgpysLQjqk` zL_Bm5Acdp&X2XCVsW<*;*Zb{g#z|p5I)nk3ooJ4>+Vmd#;t9fTY@s+k0MSjr_qh%W zP6ubzuAw4c?7P+k+?;O^6gUWwu?M_gG7`>{Su-pxa`=vvzIgr;)o%p!?O=*00P^qr z%=QDcZwoe~8ArkExds^nDW=&t{n$Ch zz`D2*<&Og21}ydu$AX;=|B+DOkrPns-Bi+Ub`U^qtTyQHD+BcjjtXAlmu!Jj20HPq zZoV+G@7JAdHJSFvv*AP8+N(|8sehf1wtypD1NUORQ@!Is!B5W4i07sLaZ*bqggSzN zqxNm6-@ZxS&MOAk?7Tu%)2QP6e`h=LMH91r+{vhloQrLFOF02&DjlC zc}y0o)O!viYIW#qpdX?b=M3eb{ZZ;79O>D)sswKWbyn@MIQ6=nJWm_O4ubRuoKayt z+QFMx-o9HSyCO$ka4B{pRuigkm69~M96AAY>wWg|T0P%e9=_r)lsVjes&wY!LsJ2sHPJ5bi z#X`g-Q^R8G5DS`J^E3=xus)uOIIXrG!+YW%V=%*+Bgu&vM*YuzN0cS?tvKxJMpJt2+b)(1vhnFF7&D zx(5Hr5nPf{EYQOw;3##U+|d~jpg3{@swKJVyKb`YX9{)dragjNGD_L(VN|6b#j{d) zBEjsk68KJ7s#O!~_oA0^?g-pG3i?LPPnN#_hzR(^g4x<0BwgzUffI0dci;MTtYMjZ z^5RDwwWIVM9AZNEvE3zNci^390nn*5LqE58LO?&mMC_b23;}2m*-1L2{J6Ri5UZ`Z zhC!0l`(aq3xnC@XQuni%TN@_vPORqp6~$F@^q&|3r-zlC0F}9`&CR#&vVUcPf>x9q zY7aB1K;NI*Tp1ktVHJ85yjJG7ZJDH% zoq3_7-$qe|+U~Q2d;k=BSd zL1x(*Ps7%V`msgaa|nhI8Tqqu#vt3GuwlcUI40;DML@*|>!7TvSp*_tZjy=@M z_CXU72UQgKn$3aBhfo~MbA0E*NZ!&#cJ2E0eTSiZV^pXBb;yS0bxr|Q*6fKUP(Out z{)DxctHb%oSis>`H8a|wP!?bssbQ^Z5Abb=0mk#}#f#ny%KGjn-X!DFDXQN%0s@5E zs$#5ww)IF$7JU;ucA>EKL+9=SDsSL=j$d!$FIIK`9u|6gH-6iYl zH9N`FAvR2aG+S#3*zImSjNP+}OkhopHtjdRah4(=Atim~iCh*Rx%E~({ z%ll^ke~pI25dq@y81?#nN+uFC7!1ktJoO>M`QdO#$z+21{Q+O6!J}NfO7od@{&m*b zqweU2=F`t8;iX8RH|$Wo^PX5E@>|>y>#^vm^N%7o(&O6667!B}Hd7%ET z{(idpB`sAR@!^}h7X5DX7d&<|@yE10zdX@q+~YZYu=@h2pEhXg^jj*=MsF+xw+4K{>*7IWi z%e#ZNLf!}Jk9s@-hUPsn^=wQ8ATJiv1Aue$*>xXzdyNl_yh5hrBd^|QP&%EYD8%VW zH;JIIfeC}KLB#iZ{fr*3uF~AxteS`~=ubPpqIUO|$AKrJx;CFK`p5&kJ^B;($?KkFzW3zEdNOpoblGaD_a-R}LGFNzOlRd2g*-VQHkg3R%NCW2MXFY3_;)sy zqpvppidL&@n)*Ebu8qY{{d>-D8q{iE5D0a#_=E{S+Bnh95%Z&o_v85P(Jl>>9Ug1B zme0rZILGis4{F?S0Y#SleZ*9V7h`boKwx~J1|5SRBhC7}p-0u!6H0pNKm)FN4La>^ zD8WReRgVFOW`V=;g}y6lZwB?OaxrH(Olr&%ZzXhVPFL zvQ#OSBdN{*ZM{?eVyusw`;^V4b-&a&k+juxk-2~ssl}zThp$h9qP^#$B*So)DIlQJ2X2bfz zOGaEWF`mFD7Y8iwF=Wf7$3EhtWSo7@o=7`~JCrLYC=Ti!U&u&g@&Y~}&3ZkdFnt2l zIOG{HWFC*-BCAG>AoZP+w4D1afIKt;tTd+B9;g!64~CkOlRky(2>{B&3_ zJ^UkeR2yw5W-C6I0PNJ?@gS#%C90Im_sYI7xV^hm6Jd`s*)$^!A_nm4>e~O_yu6^J^BpRb za+>p)0XsTBP@3^Cd7_2E;rXscaNnc(($ZA+JWX5PJ=|8*m-gT58RF3sQui|*&#)-- zl?W&_F(@IPmd$`(uWyu_0aN8%W{u`jPnmrR^hURIeD{WK`&ZN%T+vPcjE~QxS9lT( zhXa0jJQiogg*DKamV>3_qR%?_!8)&MG*g&W3c|Yo{6svVsPK-g-Um7xHUMFR7B+(g zb`Eyv5AS|O`$v09?%mOcgEv%~%`*E^Q_q*P7)BuI_aA;ijmu+l0e!%=S*lW5$-Xdz zg|SP!-Dk~nYIf?B&8C9f!tbyC{b=@cijg^)U=@GlYojcmFnF-f6r_@ATFSgs1HKSw zaI06RqxNfME~o(>X+@`TyRV)(P!w38l$Te>G!F;0u>oT2Jy2LVwaCxGj6OWurBpmk zpD0@@2qUfWK7bX4vQ_K8Q3&!+&rfOpe2Yr+IofW#q2Im!HEVteBYS*H%?KUb*&p`k z&-=e;B~4&kvCcas`vx74R_0bi%^P11PHFeS$u1Qu88P_A=dJr@^2^G+Qi_!vU`jJ~ z1>}?nULZ2*Woae%IU~d#)W+=&HG2n!dOcQpSlRLVblI=z7o}It3?i+)#(XA6mDGw) zeVZq*=&pZDE3;1m^5p9J#%RNd2eBgi__W{hj9#xtTSxC{W;RcmOp4~0W|Y!GRI22e zZJDd}!0|mJl1aa!6s$yCn>0Y&;n_A{Q%=n*hee9Q!0$uIIXv_1{9M`A7lv?*XmhT? z@rCj_|BhkcK@Ca1K_Nh0pv?wi4YZP8RPye#fM*5r4#xS-K(k7*6WPc&!uH~>rk>Sf zq-Wwql4f*!+6>9WW|Yl0>p!!Uo1vm*u=9J=WT@9`l*?rU9e5}!vIi{+`LDNLQ!Lx3 zcrxxkuUO1$m3^cU=Q}kP@w?!jG*7ON{1hO{vP!np$Quzmc2ishWo zGHuG0XH^T!YLaVDRE#Nx^hGcqfQonmoK;~tw@y{%U9lSg6XEFgwUT!&R!T6)@V}hflfZ2eM&!i_Sb=9Y&s~a_^zzT9UylAG22_+ zQz{g*zWNHSS?d6v*cQxP&`0u-I8x@sbDvXy{U0^=_?gx0BD)Kt-akz?H!sep>s<$2 zm4ZmE2aZ@r@u|;avo6lAV`mRsWf6Hef*e8CsfMrZAXb=@jH95MdvV-znblQet5O_Y|*?R1`f(m1AgS_Kl4@o`_I4aO=+Dg|$$wC=aH3%x~0 z9khK{O+QwVg{R8@IG**r(H*nQ%fS(Kh8iJ2#;~tvs~CFl)) zqlL_Kzk%>rgh9RDPzuE)g+7!OMgBI&8s`n=fIp*rAv3p4KO`VWYM@&aJ$Q~CwY z(sKTJfa-Ab>Fpl1N2eMIq&ssvx@3fS3W3ldo9&wNwkuZIR)%^%uAZUdg+2IAb%zrJ z<%ucBCprK>;r`hs<*M@fV&F1gT+c; zsOW?LEXDq>ZqKn*00>E*sid`36=0^L-7{sh-cc^EyeOrLa`$9H2k_#eMb(+g z#PLJrUu<`;*@JIWUsuV2%hn~c&M?^#1}-a-WA;GF2hZO=d9R|{1;cjzu`-IySXDPi zEz`(jtuvP{`p<@A8NS;Vl`@*V(IbXqu7LlZ%zfcM z3x4Zs<=lXy0P)e7e&~=cdq;G1^%7tGIYU7|r<`9PoThajuO!AojqxTAY1uM3Xk6 z{hYb#96ek3ocbN@yznQUB?pB9#dCzeD>GyF9+WeLyKpVMRCb6ftc??3j-Q^LQ9s^R zKIpi0O6+MeUNrUY%JXp_)d?tJpgtfG=MyjyddeXS?7|75Bjs_nYp!Z4`cQbp!ZN%q zlYAZN2MhCap<3kn!l#r?6_gi!gY1Dvo(sFL?7??rf&ZPt4Q-O+5pqc2{k~#-1>+za zik+;l0q5}yC5lOujHft|E3nsi&$eH`qg-Z7%aP;Ye)o@&R;G58%d9Y)^{->9Hy7wO zcuLHy`ep-ga^AdPYao})snFMz_FY3UiF4pp2XDbPfy9=w+vkfKdEp9q5Jn>%pl#pW z(!4@o7$lYdP>=_i^!~#K+S@;1C$eu7Sl&=xD?@#deJa>Iu7jWF_Mr??X3H^#(f zouIx(>sWc9hO|^z_2Z;rGS8LG_VL}L9rChB^h)c9hd#mI;VZ_SDMj&fMXjNW%M58H z`Fx(uH=9$%v_@te)XJtw_p3fd+^5dljRPVIr2-utpD=rz1`Q>^GnVZb^~^9Y7$s9k1#)?hQp zYc=oj(*uQ_lBT}6$#?*Mt`yR6UhH!FT^!Iwf-Ww+JynkCLUAf9ng%`s3`+CSK* zlUgklk*5ZEE`$w$J4o{VzINExgLQhNIQ`^%KUWcuU{cg*GvOzz3 z{?|-ZBdh)TIxi3wtK{d@AdW+6pgvGaYEWXAnN3v_{dd|VZ2J19t-Lq;$^nw`-^;;o z=l+$MvCM^%gG4LQQ|x}?-GxE{gs1aghV9IQ2i8AElgfd-N6O++>qE%l;#6%zN7QeZKs; z|IFsiDO2B2DSpedkEY6Ip(dA0;P>9~HsvZNNl6lPV?hcnWf!QN(-Q|~-A%jAh|6ZP zZ2#H)1NEJ%@r*%<>E8CKn65+)sy&#~1{OU2VE>q!=NA?tS5RHYl6R7=fn5fe*OL* zC-OLP%?stu`{C2S;`|cHS6y2e=cvMAeR*?EeKmf_G7EdpLtwXt{L+lCENQiIY{}sJ z4ClFwU1ngpoR6zGS#9Zd)&UhuI-=jcyP;pb{Rb0!3{H(wc7}fT z$=`9x{OZhlz{R)An&-%OnT1h&)FhJM$nm^WVK_utKxsPOXiWn19h#>A5C????{twT z*?DlK0b+yxh|?VGL9(eYj1t3G+HL!eR#wLTPpss5_UtJu5bbs+&}sMkLs?N6gvrGZ z`|l}NPSMz=(+UbA2)}ywf7lW20s^&exCll&b(6F_w-P!g_WRv&(Stmo?IRUwujB$A z9>_r7)2e<~a=|I6nTB`GD-&h|SZ4a~mu6xTY^~1?4c1(xC zVAyBsW0#pSsNI~@C=nvZ1e%vk>c?)h(Jx3g?GVnDRNj`QiVoKDT9Uq|J|GXqyWMYy zAyB7Hm5ICdP_dElBviTCWefIikn-Jahc?#MC+@{8YF%9hl9Qs4gx7_sV}LF_G+aX zY@?YJHVX{v3&!RB!7C~+Z59w{tn=NqzwrG=Ij@(N7DN4?umQ#48)j}qX|q1dpy_fGokAjPb)iIai)Fg= zE@_y!^_R4`j7dK~t=fV#BY~?G;CMuJYmnJ!Y3pjsR zJ7guwUX&vDlgWWd#WTt=ux=2h+SAnzYq-oneWTGht_VXOTBmIf@_l;IZa4+pr!2s1 zfb-jSEeXJAZ(UynLQ!EX*{76{_q%U(k-vAW>@#@v6WYgFuH-r5&et%OO#6)+idR?h zGmO_oeS^ceoU2Z>Us=Xw3n%pxC3n~SwdXz(oy+B%w!!R%DC0a^p2&*h zXE*m*Qw1x=BA3P08M+>x)9>E?lHP8=<-UdK1Nb1_uckCuED9Y{r@2 zgdzwfMPhw+-=Wah)CT}dMPwo|iVaxv@nj&JL9`obe?LFFppEr43WMX58hc;Dz-59nZ8s)ci)xPj;EPoPO@=jBsMB#Z_(x)pw2y3E}jUAHP z;h@2DtFt8*7iX;_s(o|7nP_XP8x!uw*IR$4@@z24X`~yj+d@bV&Ihv0phrNv1fqZx z=_dfJ^Wx$nltc1Tz-O~xDQfDHs}j4y+rAOAOn9&h2z_An(tR+^_M3JL+@hld{o}_v zKeLjr(vP40HTyUvaxQX@jJ%V+vCGr?7==f@f{`F7)mluSJS`Ur*c67x?yKcP0Ssz5$yreBuU8ziIuv?!BW9y zxt|xOC!_b9o66x^3RT&0?8dlt%H?r~q2hKrT`Ct#JWB+&c6JnEvlD~j+Hhf}iOZI3 zkn@ekDb3H$)8gX7#5DsIuRA!~Q3m@PqwO0qB47CUtoCQ0{C&Xd5(RL9{DJz3w!hADG;-yz0xcU8On~0xyg*#Qkfm?=EG!_aE1f>CG50#ubV2=trvN7oDF)*4R z&poG)g~iGWf8b(+PZjIrM@GAZwv7r`Fk7lhv&^T{|Gt|-$Cvd;$eTk>IwD&`tjzY}mX+4Lq7)Lu3%SKEpozfY`5rc0Zm+y9iUFx%`5?3M=l}%+Ql7*)M)-j;g47@JewRij; z$hTA?Mc)ciF1B+s@))G!>y%1%EZoAh!W(gH#PsGOK7B^L@B+@RiK2g4a zQ2Y*~N?Z#-&>V}3nB)+rY7Q>dd|C<&{^i9u%M9xl(oQObv2e_fk*`Sx20sFsQQt!~ zRCNsUrc?}9I;H_uQX$f?Xa?P`eqjTO7TAM)AHaTu39{RGM~#aU>J7WftFqx!7yvo2 zF6jK*ksqPK*a}i)oFrIl1K6yv(;_3!^bh~A3af(FH)bYqhZKKCuBc?0!5g7h^i0pu z1cV`BLOHUo4fVn}=0>$zVLJ-ZeN3j01+djmC#qj)02Teq>;Fw}4!@49{}T1gPgcI9 zAHVn;Wmar(BCg#BAj|y>j4TKBiG64H7n(f~CF3IFCZQ!)`;W=ev9fXiUtTr+L2EWI z>4}Qz3H3=9S*Vf`(mB^KpKuab9gUKaF7m;?QD*Y??v^%@rg3pW{}J%v_!U$6$;Bc4 z`_{kmva#Nv^Wgh|$kpmgKa&ig+2oMZRr=Nk-G|mGRV>7}DdPf9jJVX~yq(NjP=NuH zJV58yM_5>^!~5W;gVc?$?Lngxd4qwn6^98!+x!iqyfFD@!^a{Y&w-|k)lpa1*YuYH za$Zhb$G*n~(F{~*`u*m=@JgzOLVqxJGLL<(ll|)$ml;^1E&Bk1JbSEk>6aK&ANp-m zU#+#HS*X+u&6GS9OuSKEmL^Bk0q5s>`BRk3E6P_H24RTwoaflrOfx^=dMf0?y*(cT z2=bEuT+cVY5jWgxZ1TF1`=HO|I>+MzEX+WU^0Ww&+~=I0p40B$kur8~ z0_RvhE4$QQ$@^UZS|kd}`cL)@E=^mYu_ohV&I4)`1{aTSsDfwYL5l_A!{D&tUWuO5R+A? z8q^0FjVB}u@p#*7So(r(JQ>&|*BpL-E7_Al_1G{T@(X^V-O4 zaL>8Slfc7p9Ih(8fRH#H0_pHT7~~FC-Xd7Lw|7X(%ZmZmnKXdM^0A8<9Ge2J{s61LXRR8YUY^j)G5()!Ak- zcIVj2N~Eb^%feB3D!v?JW0epGtA;-7FGU_;WAPJuH2YMCiF{eE&n?ZYaybzJT|W6X z=v)}-Ot-n>Blc-trsD!E0|7X2Jv8!a$ngqI$fYZf7@4z%@DSYog?3tU-puaRk(qnbGcy5nwAik`jUT4kO5qg8^y`(I0z#0{}K3 zj=7!~+hqojzgQfUi0ki|IL{Y<%(yaTM#$fcqmmqFR~MAV1ozObLwyKy*jiE)az;^n z#ehq#Tl-sd(LZ9P;r}N9kzZ~6Tv6q?9t$fvr<*1Tm&R-hoQe~YbV>v}rz4DZP!|v) zY48H*>&(ndK=TAh>R{-&v4|dz7viD_SFtNipZB;LUOq9FJ-p0#?FnsctohV;dUnp0 z)Fb_(qv>k}-0%K?-F4_x`S!fzh-;`J1s?L}W1P!>DcI2nxYxQpQ>QyNPRRf^AJ2ZK zub*PHLxyShS8^iKE?H&*G9I?_;)n4wv#lEInZ1y3LovQI*(qM^DW?tC$?w{;Z0d=Bvn3NIs=HP4k?T3G+t=bzU$nWU80zyR}3s7=C zS^a^@vl;oyS1CJ3g^bP!5c4ApY?qlmp+OXobJvz1SM0vF6%7g)`YH;PPLIP>o&GJ` zf>WoN-Nh*Y zNu!577{;AIKsNOqH$N!zCChP6R$_2dIkBiXg;voKP6_L*ohlFDnMIRkf(z4}-uRp~ z8IZ|X^)Lmb#k-J!jLwO112bG6;Quu*ZCvbGMf=_*kT<3;I7x^ zFv@oQZ9wbdU~eoulw?y?_#j00822qNDlbd%8I3v#@_k#L7g|9VtaYdMj(+|ApSYd( zDN3L|Ek`vQ#CnK7?)*w2^WT+ycS8>aWKyHtF+iOEVbC_qqQjII*J$THnXz%#JV?K0 zl%vFE(>3LZfzq{9dCWNBG9$@hkrJj}=#KJIprae}FUij8hv{Hfk9WaGk{9jwjIt3S zgO}!(l>PaLuwF5s_;|)h_Vh|40XQArAAL)|dH;`*6oo-)Tpk7Fj~uUG9W&n z`OF1+Ln;|(HtN1l7N>|COh5v-VH&9(gZRWT1aD*UvEu>}h`WB9zPF}#bNlx7Tg^ge zbK022Oht$V-i6uHSfSAxRX0-WbPi0g%CPHPHVQbXZ|jQr_BErCUjigX*@^h0NVJT2d3HAv<;*wp2WH{<7GspAGbpH9(TmBoXq_jcW z;Zjm3Onpdv73i@udu*FT*?;6{rD4}eV*?Yw9N(*%T`EaaNK6oIeoKO`Tn_-{J(+t+ zVF1k)Mc0{aI_<$siW=SAbgp{TQUwKfh z?+>vNZ8&Y7Q9p5O_R$^NTtaEvY9Cx`;DPtQ*hz)x^2;~-~FRfbpAlsx0CDXZP2yMdW3RQx`@K@D0#?tuo#Z`S+W5@BMSWghVO@pwsUv|KBy&3IqE=2AEw|*`>WO+4eD^B;3Dqq^Pf& znK1T6iQ(!F_BkT9%hn=f80PlRY2>=|EjjVr;`4$7R_akQe4MV~YT}Nr?Yhr)nw!k8&rM?K9fk-3)A##|Q-9 z=RNP#1J18&^qUWLDh?NUV?#vWZKt$5le~M3qQLbAAvUyH*Yx7ar_?6Zz`IjR-dWCY zqJUz9-)jre3P?qTgD$SmG#fOAC0HQ_8)*`@%-mzvdFwY%+Ke_J%NkoK2n$V_ji3dQ zXbYSWLUkB;h#Z&-6|-s?Y!Xq281IbQ^&<|hF)x6{LN@Zc@VeZb==Z7rPWFRl2qO?I zWIP*mxv6}FMtBE2ofigFR0mSDptPDlL$+kIZ7_p35^Z> zbV}PnQ6TB>P)v3j9~hCILCTZ)ai~g4NZQm2;Gn9q`%viIrn;`#6f6-RZ$m2+4b%q2 z0O0FHpMg9e5|kP_s|ZkaEh{^!}!7xWN-mRTvxu_tEt^gX-8 zZ0dt&2Wf*`XjM!W)8AFIhR^kNqFaJgAO@5KBtc;jHYz)vqN0+dONb_FYojs_VxQuA z`+b+~Q}%hvEWSRQWZ{VupZ{w{H5e$*NNHta@TVa%3c~KODe~m>n7;b{WV*XfS^qvg zUHFU+Pj{)-+GDwldyua(Us|Gv0-gnSyXcr3m?U*Ic^P@5aY+&YHdmZ0Ek>qDNPj>{ zQokB&`Jl)MLb#&5*}hilngOYhg`n1$k#`+qqCn4(#3g~lrpZ}V&%9M8WSCDrf$d|& z>4;ks!;HUmXcXIfkU>w;$Y(80$%>0kjefuV3&rkMnI%@NR0aSt1lE_H@dum&`wM-! z{!{uc;M$4-MaT03+-9M?M)%E8QBb5%s}4r%d=^=8Ya8`Ir1(cu>YD1@td`5_S=Tq$ z6V%sK&i$TpQZQbW2yQpSCsSf%D-G&Xh|dJvIsz{H3q#_^C^UOVJ6r-8BXy!!+_Cx; zvt{Kt{)DQ9$u=Q;1QdlTH zdMEG!BN|zMf-ImVpD&QDs-a!S%`LxO*XO9F9Nw0gZEN-Kl#Ntf47KCz?@`E$v=MDn zVx$w7KvCGQP$m%myH-;Ao88|k8|)vnYX1O0lI^ce@b_Z?6#2#DAJGq={TDV#&^9=! zmuH>^LN}rBycuta4!~cmPL{-6uuRBAAPs#LHj3YA)n~VQha1s3z1nB(6T>#_dDLk| zvxE45{~!PDf1>fc3MN*e+45W{>k|l*gHbl3-#|wzMJdQZy3L^}F$+BZAL6Y{&#q4B z=zO1DdPv~0SN_<53Kg)CPOoZo-D#;{Ygw`0hcDnnz!uef5noHjvRt)zFpM5Bj1$ZR zAn4jzTmwxL$AMh&bHe|L98Vw-auLh*raYdF_TAGz`(x2+47uE86eNUlFzIIU^P$?L zt5t^iJ*TlxH2&b|fT}Z9wh2IUlbNzowj0Tz>NWzfO8^ zl*5+RLyKPQ` zp1;Cq7zm@;ASQv7|F;3h>?|`}3$|)6q2_kq-c4wm0-(OL>jM&A);_ym+h=BshtFi^ z0tgEOmkMnkqy5{Z(7oCY%`TLwGMDE{4(Y7%)QkL$S(C)vE6B)180|+VC$v;rqf}Sf zUjw^@mc9=aIgifw=nq@}#u5Dc;LfP?cuo}c!R7;H*;&&9pf*`;E8`)l^a41C?Q^cN zZBEEAA76a%^@#2*_V9Qh0^v!To0$*1$kjUC?{baJX2Xz=#i2b@GZS0vRH{YJ>K^YE zWT#P(j|6?*eNwwW-FvTvlyt%(6i-FX*u_dhMnM6b~12CPsBQSRP5Ei@25T~ ztRr<=Y=9fhT^c6erA$ba*@fq&(&KR0liAOd9lA<4#$|>HaH2#7Ccxvzk3$g|d!mH= z-CcL0CP|b$3uC8YCI#TQenh!a!uNFeEYnOv?Fgoc0(G#H;4TX@-1U0>#6(*Kz*?*2 zDt)s211iuW_1lxaOkBTco-NcDkA-Jg+ly1|ol^v%I4?*QuL}aWwt;VRCEO<-nsO=V zeMu#<)M+LrjCMS0e}A9l@5aW4?`VN%Cs9&Z-R%wT-Rw#rOdAcm2fxo+bxK!LhOYBZaQ3Krz^O5b@Nb7sA^M@KxsuHu6IomwU<+#WFb>rWnM z5`iMum!DEKxuVS#b$;FK4RO~srTb%EB=yPS6qouifRd1F1CG1-pl%y+4mn2dJ2y8s z=^=ov`!I1BfmrpDOpdowvw9yY`@-0&YcF!7;p|vVjI=S##}#z7rC^-rqmjS1POf1G zc8Kh&b7EB?@ZOQrMp0bkyR-!ztu>GMI|90>(tmT;_LU25(M)n2+3GE1%lAJ|X35hb;!#ZoBBb zV&A!2!C_EsEmfXlj}bokkn$*R-@c`f0lXiaA=WqiT_B1TxdUdObH5*)>{Awz1`5tT z6T~Ll+cIV&%J5BR)c`*u7mk%ChAIs)Z7Bb@CGy`B!327Tpd*#Q-1@*<9f^)aZ^)%o}X3Ce%Vd|AXf%E@kOtXjZ@wYd0C{dc3*H6U2R~`pgw86nN9V-!nEHUg z&6D3zyQ}w>x;O~oR1X07T@&`!-||xTyF07xf$|$`x)0?go!5$rzc}BN|L5OE0}WC# zjCR!V45L2CQY-V?m>Mp)9wGp!4+Y3)SBk2mNiI7nsd+b@3)-0fGEiMm?vtfqwjC#9 z00SLLgnf@xQwq}=kmpi1=_#16kbQXfZBHBdx5{1Cx%v3zZvwH0vLbh8MeQzKDbLV+ z?g+qx$8p)i1q_09-^;|D?YFEDe)g!|eBkX`^zUb7hRU5XEJ_yueAi^QBd~ zZai$2RTNAF*`ip{xRaCiUf_Xh#ywtoLUVVE^r7|*dGVlT>#}M5%MR81L; z_W*Wo9|xPOUmeoSLf-F{I1FOe_TRypp1O{w?3`kcgA{adl@!S`3!7w_bc&aTjVml| z)5Y~M{rLIcC~Z4Sx#6tx-%bXu@l0sB;z!kWVusu&w@6STtnHFV_4G zye=ipx(m;Fz8)^^fBbayD{?`*%u*99J?h==_r2OKWs6C}+Q)L(9_ZQP3Kg?D4@dUw zlX@;vV9r-QOtirUd!@2HZt@*&HVF-|Km@ZuC}zMWj^RDYOAul9dW zUc1Qa`vl-!0rlIPTM0lOBjSPg3#*1pZF_s0rdG|FW^38UZNRbSd+Sz3*@$5*6yJb=X1k`? zV$P=s&!d2L3qXSI`r;(@Vbd&opLv&cMolC(+Ew_9cg&p0vFYNc>Y0h-%ck6dPknG? zpPe`T$b!pVz`AU)M$`MI}qY7JF@}j z@gA^rd|-nljaUUvTwK7 z4dkUxW7i|6t;oF@Ce2RSBhUAX3fsnCWT7pV*ZH_C4Fe_Fm2u^L@V!bT-X0rVD~Y^w z)fp<5%9P3Gl)YL|pQ4XERMg;lE^4y$`Z}qpeG2xg#RDk*VoKd_ydTktwY4?=4N8O= zW0zeH)k34RyJ-f!?}_OS=?9-&kVm; z4d}bWS5%qL_$+!f(tl-<3~oc(JSr^#Fqtl{#`_kzea8UWMmx7%DLHa2++wjrGLnKC zS9;YK>djP(^VELdqk5~MCg_ln5|%(M0J#Ttj(&jyfD=HOfxLY4W?YPL(hl^dxT`{t zX?L3Q9!>d40QO^-m9Wj5Gxmx=JAE=g$vWWx@9{#(#7CJj@_p}Umr{Ap-x^_PnG6yx z$}sh5*@tD(QvTn~u*P2upnc3AFk@mMK^MprXH%nvO+c$DB+0D3l*ph zOVT~5*LX_-w>|Fr!%UezJFNHEWya^Ejigi8@fS#(H>^|I4O1m51O$5w187sfqz-Bi zOTkCp{@H6@%iy*fzh?@%#@yDgG#M&_A>5?4bGFRH=BF?^cTRE)ZGDAB?o+L);ATlFSDHo7^ z{*IZ-Y(OPOAkH<=@jP)@F?~jSP4{JV7FB?iZD2D0` z06`>_7MKQ@Jnqgdke6ZZx(OTm3sckG z>#DIree&$Ec7+{70fu_(kmi;(^~rMVu?DOWx?CNv=*9W#>zj#a13*&Zh0^S`dwv0O zYbDWfbJKUrjSIg9<@V?v8fF*(6$8y60R(p zY9>ti-Z-yQCO1YBo`Rehd@u+|+yDOBf1YT-`FV4y&1XZHY<|1_TA2;$u|e%Wge?iC zgj~8zm8{OZ1NB|qw0Sm1g^NTpl(CQnoA{kFnPfoV$;Gx=gd)oU$XAv`|3xHhaYj=< zLU*6Od`9!L3K>T=y|N#wz0){R|JTKP=H)1v?CtEK&GbKmpt5vQ$MHDxK_*h(=qo4ldD@AFG6vgv^$eOZ~ z(Z)62y<1acfG(p9b$cLXmS5hS@`k_ly+alEN>fF0Rs``FOw}R1IAt={htgU(XRqBb zjo5C3J*jq2HmO+6k!eXr8ZR_LU4)g3 z_{csGMwvi)NJJa}F>A+6upqaRplt8vP8wO;hnDaf_L1ycbja_B8;YAO6{#W^sri6% z7TF&fvwHyVjq&oSqQ+(Vu({1FKP+bziBM2>VnoriJ!&A&FV9%x#3>98@=AU6nWR%n z{uCENsSgHn(b;QP{zl1U`9NVhRz`cShyp~hK*VFr&K&Af$AGjbqaA@#TlV3YRF?1+ z7c)dPvvUgDm!olZx!(`U!}_00000NkvXXu0mjfl^Hs4 literal 0 HcmV?d00001 diff --git a/lib/ui/esrimap/temp_assets/districts-thumbnail.png b/lib/ui/esrimap/temp_assets/districts-thumbnail.png new file mode 100644 index 0000000000000000000000000000000000000000..148916efacc3abc8b4a3ec77d048aa8286301d97 GIT binary patch literal 6086 zcmV;%7dhyOP)4DRLw%jDuI_Z|uXFA>|2g-T!FTX&M$!oTUOhko9+kB4{bBUONpGv(m zJ$YLS5r4}S+rp?Fb>T!BBE6ssW$+fA)YIzslvX;?f=L&}&+P;@gr)?}eqs3+|Uc2WsZFu4s8Tem28bVV75s-j}u2x!8K+h_6w`FX7zlrx+0#>~6 z)>PW^Y_vG;T7{-A^zjdd*>pUjPyZfObT-3{&hTc5EzceyKYk4t#Q!afp}XH2LnW1( z{yDmUrhoBGL-RN&DW$z}UUVkC`JiNUND-~v7D^dB21fGn_3>4-FWopKU%2C==el2$ zlemfhwAdLPxRd^k)l9XR={^h(bsAE2NCVF2edEPkA-^zGpUs zQzjpSG4tg=o~2R!is)K^K}#(Zt`XJ;7n;$Cn?ur$fMvm?bRPFSP1YB~@2RG{-W+X} zYlQXn_ba0}c7}-OAQZ?fbWFFZDS>d012`=xt#GOnRl?#1a&Yt7J!iygcfDB~Q9{hd z>k0LuP-_8eoG~(+KL5EFZQ{+*h}1NQxsjvL74uHBsO?Oj?hm9-_V*V1Kjtyd&y>s6 zk2sP4wUj(Sy*lTPPp9c4a|DqfF)`bf5;I%=xq3kdH}BAwNFyMHm>Qlhtjeov4Q)Oc zAod4%R8d|@XZrc92c_n^2uqCOv98n(slmR}o|IMOOp^!Y)1kzkG%oBC&4|dM*`u;J zkF2KsXFO?SFps_zrK zLY5o7`E>{-@}qm_%QR_l0gVhQ63>B0rkrOIi>b8AN$h)J(;)G)yYpr7sAp*U?O;(W zo2lu&`(UhiT)QXOZsY-Qm6q;uA6uOzV0npImnqD*oVPMT+N6O6v~uogib?H8N!f1n zBYTIKv~Hv~INdoelWrNFOW&RFro-%FFg~>fW{u7gZVc&yWrA)Gz>=0sKS!BN)Q5Zf zGeT&9u=?FOx;0@;6%@axw%OgL;?I??$DU1q6bSJH}@7m1h*BY(4BJ zKIFd17nqbvab?yLSV@29ltH;z4T8MrH6v-(m@HvwIF(PW3vW_cu_v-PZTOwPoKLq( zYAud4nb^MI^I-`$w$|Z+#bhuTXhLWKJuvYCt=JVxC(g?qH|zLF)ny(|>Omu)olJ18 zfSOBfJ?t-DQvpQ<_;_ESQZW}MXfVIFE!y8?m9^HEfic$9= z$pkEK&YICQqE9hR8=6DI0!t{{l$J~znk$IRF1G)8si_hJAO}P)IAw4i{bPG5?SAo) z*gx&{aSl~Q2x0e{oTIqc&mTWVzFn*6TTY`sJ`iYEA~hGY5g4FM^z{00di#Mmv2X2n zLDI=vd|NX8V_v+7bhUs=9$f2*^IfT|x+C2ho=Y1aJ0|wo3!3JEDAKN5c$^b@Pl}57 zqyheALe!S+K7mPt3dpxxHGLF`G(x-3AFg%P*P(2A)pY-aiz0p~Gl>ImvnMZfrPe@G z0%x&&1%Hj`4nY#gd++;TO$6pF&M!frTbJLcEdaN<>gy2m^M2kH^yZvXlvCnN{~H-Z zKikmkYzfT>MEY<$69@*8sKaGKPSdJ7ph{x)bYHE3flov>>%YETtLdd#XX%rJz3J0~ zy>0y%ZN==)9gP&rF5_E~6qBYpV?k*r`ueyp#dF?TbGc3G*mZEJyc2CbrlcandY974 zi`^*pqV4WfvnUi62$%WT&8c)Or3W23*PYs-z;Y~vn+G8|Rz|9tm;m}%-g)4Z$OX~r zU^J%D#J^3nOS#BeOdpX$e;A&_R_J4r#qEmYJO z)Ak)0b;}$y`0qdzIZ1 zu)sC*;>d^H>i4HT>4P8p2vSva*!o(@OG=wx7qU0d;`h;`$60YHr~I-`ZQ2nA7YcD% z4=IE#`1QBzM17#YZy62X?S`;RwEaYFz4SV@W(WLbb`q_AIF|04bWzL-YAsM{04B3= z{UHeMi8v+srJc>=3u=D&dCy62O3ZSnU>0uwzBR1PgNOO!GsNS@gZArqYYQNV z`GwUixKW#;(EeQh0bA&l{`0IPnvVos^ide-4KB`p_ERq*Sc7mR?{Dk~X;ZgZA8Myr zTX&M#6E>Mdf<#DZ-=uK&yIw&Vfomiq5I1+Ix?3xF{b>2H6UCh%% zD<3wDh4;KWN*B4;|15|TV)0X-g>y>b7-ZV@tYQp(@B1L}Gg5|^?m8=4)%B7%gFIgy zYoRTHw5&GFPst)xKv7K%66y2S_7u=L^5k(bxBro`81ueSbMXcd-cJD3C&+$p4HwU08rc2R#>c zZG{v9k^e!V$tu)Wu7&PsM4@h-+X=iPN~=0j32%BrS!DwJuH zq%lxROucw|GR?%AEL^tP730ftnkz*F*S7S*Yh#rr`Z2vu4i6auk|1PFwd`Qq(~g6Q3`zV!Nz zP@BG&n3rc%3ZjkzIa#f#|8qZES(0fjmSd^i%!>m6hzJ2#qFcRIKUn7OlRoC-RWUrf z*qM$q>BIZ9d?7nW8}Oyd5}zLopqNxe%*MnLZ1wTZxBVLIgUfvFtA=eGaGC3W45ZtJ zF_A5pdyc-Ca60E&ON%GI+1sRWQlL8b}Gp5;*Tu5^(!#p{3Ow#G*OLxh-3)H96PS+?MVLXpcg# za!9d2RUT92GJ66tn;TnD8CzmYs_S?^rfQY*`(-SBB?I2>O2AcK<3z5VE{jKee?SU> zbFR;zksRtjQ8?7@i=_Tn=p|Y@BZ&?qdWdybK%%cjM5!(i0HVyU(x^-h!M=r)&(qC= zb7}3qAli0J{sKd-0lxp7hzyz$u1JvaS?)B%AGhu^(5Xx}ic0j9D5XgX^DxPVj0QpE zoujho;{&}pH8>^G0+qab-;bc#5m~fge7gDjJhyqU_z~pcIJZvv9tXYMYiLUUd>R|9 z$cFjl&Qwv;fpSYb3l9P!u}RdFO?uRsQVn4IgEhh#wMU^k z!%QCUT-d?}vwK{%r(Xl|RJ?k70uA;nkz;`mO}Ze8uj}^ramX1#wqow6OfjATJL7z4 zS8U@84Z(H(F(Ok856gG=-r?g8hl$!5Cn~w!t@w0JUZfQqZQK-SxBB4KsmFwkc?Ph?yrPGqg)2*7G`*N@d zJiORN=9PA8^ms&-2w0Zw47190BAxJZtC2(Cy8VHiTzi`r{nis)uu27ATQaNi2t?-a zxQB56aB2@>EdWk>W0=yvfPLyj=vy&-Wlgh>wZ=iivXFy9u-wL13&LKQo@Dl9 z=y6$WYW4f`ACfqVtuZIzYa{#e@h(DL8P5s~@Xy^LEz&aI`mP_zgqOS0I=PFZ&2<(l z@Q&$IM2n`R2>EMuRJ~gZsl$y;Ze6LVNg*)Aw_K2iJD8yUh7!(4TcZ7ibOq~btcz^ru25y(dc7&ntG)@bcxEs!d4&A7gAk+{$gr`bLoT?&D= zoLpFEeOGw$LgN(-6k}Bh3{{15T-5dHT1AgdNh6aOO7C%%0ViY0t>?^NOl5J3X@2K@>p)VEM^(ORr|Qtm^-^+p&-!5z1n==ChP-&3VB4a8LhilLvsKT zGlpafq7cwT^7Go)JjH7u7w!+=86~34NBwR39Z+nb?%+?BLZHm4%n+#eu!@3m5ULBP zOq{$pqV{+5K17)htZTUM?eF{2;+s;;)+z%yxk?>Ubnn!8EtlQs=9mB`F;|ecCC2}X zic4dFo5uU2+2u+Rv)`Q`CjybDHx7}0_byxDDy+3yg!1;3(UA8ckL%O3Le%O2Sd}%3 zN=txob9#8Luy%P$j1K$u;6_ubue=hxtx)qm<##v<%aBDLfHG60DdCqB#Hek5I#ko9 z4$K!sVzs~409F^|sdk4e?((rsLv0E~TJyV6azd^tg+L{;)SrxoAm$k!19OWzwVJ>O z$169oQnl&4vd)^22aMrr4+0_Nno~4v3~WwzTz=0-~O(-DR{b~l41}+ zksKw)r$XqTkiYb_uuiTBTny$mz1HB17-fu$vPcuOf@1Z`1tjI{KEZBkI7?m7Hcwp8 z*S**66@A*8yV(<{)&p?a(xOnkwtYSP$uPRwv51u?rf6phrIuV!*H(9&Czn8X1#d{W!_ms6~tqO$-O zoD>2laE%Z1?+zsO(B1NmxtygTBlZ6xu>?= zCgtqTW~Cg3*R0|pt-edM-CSYc0?4Y(7Zq!RzNw}U zZIS;07y?jA!}teCOe08_TIkLux}rho@|^?eq4DQMivy%FOMpyF^}>}YQ>bnZt{l9e z5@Dp;IfGKlNw*HkBcE1X-$M5&|;1v=XByVLl4^mMsQ-Ccea9d1$*`TJO@fBv@QIx}bWg0dRrR;(@^ZC`Q{ zO-GQicEu@6hKcE2yp0XA|9Uv};o9kU@rV+VnqQ+YMhbzrFZwNTqYktxpbEG!M5%C{ z%XTVxqb8b@g)*uBK8(py3%YOI9Zw5B94Q3kJxdOeQmI#7oA&ngg5V8*Ixc!tjH21d zotFN45Zyc|pX+w#%&FFrv*e9nv822xyx?foQbdf;M*rAAOfLODs9 zDWn~ar1cQdD9(elL8`Gd!l=GrF+<0wGHNg=6Hlo23N!w0@xD5rp{)7Y5(3fgfbp!U zNhY=c#A%UEAb^4XsRABA?fRAyg(8VZXEl;|d(XjpdMd0ipWfZum-gB;m*DCJlJ`ZE zQ^bY0d}m#`@0y!p-P|M-TOn4GVD$z$V`PGyiwUk0^9xn|Hn*PVkP^iFZB_z(^2l-O z=hd<$A)A9}4P^J((&e&(m^|cDizcPksm$Z^@Z6Say%&=EQCT!OET3cm7sv~@B#W{Y zf~VX@+`be7(J_twOIHc2!#_OXJbf_#BwZg|NG*Xn`l6!@lPXm_H151OQP|M>ZvAH& zg+gL)!15sJAzWx~oRzj(p|sGtl{zcjW-2G-^{?nMi{-1l-K@L6AjYH$&dHG2tICYM zfO;dmLR6wxv(lZU$t?zH?dz>wFBD_nvz)5b$9h)wkrphPlG^M%_Bx-%gs=E6M0guz zA%g&MQCLbqpibSXYq-{EZF|Rm0E5*~{PX#hqW}N^ M07*qoM6N<$g1=0}CjbBd literal 0 HcmV?d00001 diff --git a/lib/ui/esrimap/temp_assets/light-thumbnail.png b/lib/ui/esrimap/temp_assets/light-thumbnail.png new file mode 100644 index 0000000000000000000000000000000000000000..36b5e8643df2f78a24aeac4fcce68e3ea24b338a GIT binary patch literal 9597 zcmV-@C4$ zJ|H2}G8Jw2EY9({zP7AD5a|U7CX2-)H*G0Dn&D_&{votnvbWa=oh_mCLQKd|RY z&A|RY91cwrtyU{}_Ipqo`;Z4LzZjUr-Z+ea#*>NJ*nt^Ore>FG*}yWzy<)@wPwn}ho}Pqx@_T!ofgL2hkJ!C#_j@xQkA-Ora>%^$u~nZf?I1H* zl*uvTyn{hzrn9+RFSiq#34E~EucN97dkf0SAMEYT96giDG_#U~6v_|nK<#%sMnD+D z`^*k>3WMx}!nBDUd#6DL!oZ(*NdV!u17h?!NbJNy69-#BVFKOE(MB$gp#0@M-r@$t2ghgU|IwL*C8 zD5CzB%awV3f4?|BreXB^h5gOSN@5iaMH?JN`=EKyHnEAQ6yE8B42gV`6jxdv*O}Vs(`~5*)UFp+G?1z^K)HZgi3-OzSz5l1D#|t|u zOtR0o+wSZ$E#x`SI=gMXbFy!+kJnO$hpg{bB^I5 z@hV4lFcUtrf7L!7jyOMq!bwsZSsOGxPUJdWX<=<9@{oEvTt&lSCX+;^oa4EN$z&X5 zJPb_JL^MrEdBfP<)BZtep9?TBGT_J4Z&ih&Qdfaj`e0S*YPBrvp?HaQFm~3SP9`%M zY^1QPhNgBPCony5Ui3W!S$0JDSHDM{B8}m(^76-Xz3qBqCC+)oB5n3r&??gsgTia@ z%t+tbKF{83prpd%Rk}L^O;1A75~~W2`>i`s>f$1#jSwT8{ltZzA0NeRM+&i{;?&^& z+rf$1L*la3dzmVw?!7VQ!m%+IVUPQpdzCtnNi#z7?BB6H_k*2mPY-jshKnO#ity!Z zkUW!6`%KV@b;LLxM%HPsDo^{C)SH3aoH!-c9v+V;Z<84(fwcWUw1+(S*XKv^dn6Xg zOuVX%IW^4sr^g2;p~l%L{vNFw=dVg=naUvt=UuNhWzcFh_FH)D6nBu@2HHd6z+E0vruAWy|*yv zpU)pe?K(umsn)VnBLh62$u+Dt6ecog1pBDjnY~UE?IqA3xj5FC3-lzB>&AzIYe_6S zbOAi~fxQns?keK>?@h_;>uZ!lU)CAeS_vX3e|mg0Ri3g)i5*NBHSiL|%;V-!HN;5_ zoZ5uF$pJjsCNrHYhXA;N#IU8Fc12$Itux8_UUkw_Uz@;_tJJgiD!Gi?UU#3bB1;4b0 z9p)*dq>cd+Do#xpAKJ-)XR604vzgHV0xE@NNkl@_AqklWft;WQRa%q^=fyLWNx9y( zmx@CAvY|*HXwt^p_QLt8Af!GWbek-F=;96*R&ADn*P~}*mBHp_`AsSinUfrB#KD6D z5<0BTJ<|`1kl^sV{rVwj4&Nh*NG5=B(*Ttzv&TQ%$x%lzV{JWD5Slh5ljsP5?`$m| zDxWQC#zILLSej7xpkjo$5V#}K5QD1@f@~}+PlS}IT2UrCd${ltWVBlp%Oz}LagMww^_wRvA(pQ7sP z?(29s0V7@RzYi5>Cw5ZQAXGhJ48~2pe^#qgR4HydLq<%+@u(iWO`I6)NT_CCzI_uW zA(6bWF$yeT6V)^AGK+QK60eF0v>DK;bz<_GP@zoD^UQ6?;qI5QSy<*dkNTnZw_wV4 zmKNu^C#3?9S+%LCM>(D<1IaiOV2&{rB6h~A7wqT2+706e4@bxW*%Psg%EV0KDmxf~ zO@nc$Ql!$U)4WyAO$mnMnaceFBwLAtX@n{-FVC%*r_ze*1eg~vUI6^WJlJ&ExX$w} zp-Otbdr`U&=CwEM41gl>F;ct~4{Q(AW>qH{2nNzg?#wSxyKkRm3Ln1+VH9E2t}=l6L}JD6hg6ov{fh&^%M-bsb> zAUn%!uu2Vtt4Lrc&q!1&s7=8{>zQr>&lD!%eTK0WlDTG*Qv?>B!w+=Fx0Vd1|0J;n{|KebP*m(m`LWr zpKt5|a3#`B*uM~hLw!jIk}H!7-eJEp`8%V-@e!Wc8>#SlE{6W zCJ__(c*EfEY)z%jWsY^Hjv`WfmKZ?%s)?Mfnj zF$fGKsKJ(n(#HhA7oZ-85RBKaw|8*@#Sb{#CQq0}?lVsI<{uyH)n*e(iG-caNU+#I z@8aXMh?i=d>O?X(#+6_|4|dX^%3vn;bhBQHBr;&P1dG*UEIT3DAgy;?jB((El`Oo~ zH`K02g<|*T9LC&UuNekxqSgjNY?_@-*A5uxL7g(2)g}@bhJ`^ek;LgH%xGAqD;VI) zGP;KtO{AexNT}haut72t7QJF@2HBu7$mh6QC3=N{F(;;s=<}Wep|6%GMjc5^CGgwO zGI3v|qCzGcm?+MYF=tK;bv39-^-jeTwpoFN4>`uunZRzh zU}EO$PESC9m3phP+t|IW$5;8SR;<;LW45^o$=#{v2|2Vsk5+Q&u^4%n*tQgd<6`QL z2UjLii-OBPDcKqVXCOAvoX?MU^ZN6r`(Hwgynx-b#-%zPij3~#$t~Tg& zA7voqbWw8?MQ^QmCBO|-7?2||q%8%y_jT42W4P#VU5?jh=-wD4HmWNJ^^ zQWX=)WJtB!aOB`GN+3q#v%yga3&#ESx4%0~ayBp2tE$tkObqX5Am_9>!(lVnEfwJv zsi{FaFio|r5?Al8w}V%MbOgGrJLn>bu_C5IoeqZrVd*Rm9UCMO$v8u79u%=b66c+m zc&2vc_YW2Av6Nllowh|7)X3 zWYyJO3Z=zW?CCvB`IK~0yPM+pn54i6VIm=hWk}|M1E;OA^qn~rHNMXzbh3{|SiMEH*%;o3hV+Af-u39q@iHpr-wTWq_ z72xiH!+O&g6S0Y$)2)@5xWzSm5u52iWA?lgL3TFg#~;57+S7%YSfdJTHcJPUp^bi? z`-L*s(1i}@GAm-oYUaL+B*vI{vWX*?1xS+%I7^wh2taWpQO}jiQm~l=&n*~DO(-}j zH8i;Tc!DsEa!2l0s}Z_Tc)gGYE$krIzc~YMLBd4qogVY{HZe9^VWJ{7QVZ%2DN7;@ zUREq*S^H`=U^%>8)F>)?yKyV6a9m`;jb-e!O+R(Y{!=|*UvrxtD^r>@53N9mSH^;O zOBLgtes!>kRUVn9qEc@YA&R6lhJrCL2{5_LM7|@lp;#;51C&d=XC)e_?yx_Y7n>$Z zYZjhH$)4l&*Dv$)$DhLVG62yw4|(nCrA}CA*JGJoU(4myH;IHwDr&&$p{;jB2Er7i zR8lvRqB#^yB-n>}V63tLC2^~x1Vb${?k?tBTF~IhX70NX6YJoMmt+|^`O1KNZKymwc?(D~ERYQh!vf@l^#N zH>gvNMUoj-B=gY09+Cb6P$1m7FL zq)JjfHU|9rKmNyu0j?r$qh)`&OF5Cn2&DriB8?PP8GlPKpOV2ane6VpdT=?~6yGQJSED!gLaPXe=HsjTirF&3M9u7L;jk_`p_q6h>)bQBx5TgKs|vUYA%-J| z#_T=Jhdo7tcVbh&q^_0D8>^NphGiK+kTz-}!FIPh)0a|H)Nq8}S5kVJ$ouZcViP|) zc&Akq<`c1r6i8u%U|u5EaULs)*d|B~1|y*ZpH6b+8sNMKsqG}oj$Ci>h`*Y(2n^A} zVF#(j#>W)zB@cQ9q?Q&s#Dq7NmtH3FzTdH~HfCXrY45JbNF5up7_6#wiQimK3z*!7 zc}iNW%U@zmjm^URpj`8CtX=i1q%BVzq?VZS_(;V!%*7j~czA!61m4dJjU5X)0K6OO z5hJbQhKW9jsX-{ zatDIcmju0aT0wiUm?$V6dX{~T)z7ui=U`uNHjDA}&~32G^A=Y#I9-uKw>dwtKWL=wBe zSTVwpk?t2ZpO~caoFLaj1>$Xv$8N0#5}|7`WO1n-_%>339b=X8wfFtu%MkmJJR$4G zudVsKhP1}!T3Sm0zdkFJI=hYs19o=CBdstJCZH*Z2?4c}z|m+TK#KLcUzOg`H~riD zY)fA%rs&+}wjSn}EjBKSae~jg9NYA{EM5Efx;n%NnYa%Me{~fwwWx_#n_#L)A%h5( z`eeauO6W}oJ4&f#mrjHVtP2i%aB*y(T%^*O6`uPbG^}$eXOZ2%$;Ed~$5tH|z9&OX zh%vJnf~H<-b)>HTWTMR379BH46eD>vkIsBrsdI_mlggEAAC9f#Gn^Dj9=9mR&`>3$ zYieUIMv1cCvmC0vI!D@5w{*R=fYA-Fp2CbP$h2F!UxfVwN_?=t-=u{_t2(Aj`FNyXYFVD@3 zSgzD|mp6k;ZPgK#Vb?HE346Eqi%li(M@9Gelr^Bz%}C8E_~j{sA_c^Qv{QOX8uWdA zHXg@>q2vSbov??$qfxh>ZXqRg9eZ7;+plQ2pqelCdEK$$_u+dyZR`@wc(k9(Ey$I} zKR8!DcOU}lbmHq-cu&&;?BO)Hu6AMqO6vl35u8sO0&|)=a4%AulO|p&`>D~|X->D? zr@}kE4U`u9{$9+Jv*)f23KNAmPbItP-R5J+&@NF0uHApTu5sUNgY_I0g#DG4U3L-rOCx{D%P9c%-awq*y}enD~Gg~4TViG zl+3)g!7REjiM`BRp3u0WC}CbwtwxjN)E+FX1tmln)OgYk(9S$sWuz-sA8PHZOHVR8 z?jJtju1c$f8R#msMlPJu^3nCV?!`Q-suo(@l;@I>Xd*n*(dbE9OEP$@cO3cD4+X>6 zyjkWxsI>G<2^1#=Mw3UZqLW0sW$f3alR5=ks8dwl>)X2t3u8l435%&t zWu!Js=*v91YAk*GW(Y<|g;|3nIv8zZ#=heO%nPMZ@lRc^sKLJR8U7dpkB4JX+u~Yi z`W^r^D|)rx44yAeOmanPt+TH_wsF<>m*?L2AI;{7$) z!ADV*Aye=kwefu3W6XUop3v+LSy@q3m4tT(sW2;{1Uub~I3sglscpSk=ge;J&gQ9nlU8NU05KbkUCDO z3r*5Ojf%Pq_Pfx@Ar)r6Aw$`jacbAWN{P2;q?)Q683|#eF!=iAWxW}AVn}Ro!>oi` zFLw>mX^=sz?(-S1mV=2fU>dQB#iEkjZF8_%x{mvhc570pR!=qGY@=#4R=U_!H#4`A z{n@bVOB?Df7K9XOqO}1HP+IDCAv;`Az&ZhAoQ@;cGS$~Lxi~hct11sN_YxS=&`y}p z4ytW0Z+B28?NUMdiW-|b<{;7Ial6&Pb<|q|X>4;W#e3y6k>&#>iD@5-7fIu;eXEtG zl58~>9$e_e#6HJ!W%4}OxHBA7DTo>lyf=DMmt$)Of!?&rTDwSz`i!hKT>ENqT|7FF z-{nSkv#BB}EVemB5TL!Uuq%?>qK;36P_FoCbCEmjHImF~-Iu5?TOWhc=v$5SRyi0= zFo8k)W2013ni31l@>kfYoBooXaM7=aF{?jDv>LUbH; zB^~uRsxqj}Xt*_uS27S)sBl_Lo3w$_)HY4V-Sc2by{2B8;?6Qr3-e~B@!L1I66qAv zwVjxZF!;|v){Rh#tAHkZ$hW*A%5n~rX`%>Y0; z(k9#1+H+@qH`LAc{p`3#2I9ee`YlXjm1b3*U+mbb->kfYQN={gMcHF)H_Vu-RvP#k z8<0P z5&-{;i*xLxOy8LokQjCQ+p2p}llC0+<<`!|GFkoi+`rp=gx+Z9z1S)lNURl>+n>+w z>RI3B*ea>ffV(QhK%%}qKNtJrHk}vGP@RBU^&aFY&z>W=cSU1NxUj)fT50d<(HPkQ z&N6-{_U&{nV%G2q;eD0wG0H%2y0`auU1+%8!99DO2Y5ObYEu`wT&;^GSurBEVt1BT zdw*@t>p~V2h0{!MmrxY|t=9-1>5Nd9T4L|4M&jO812Mh~@v8_EqSx|N4F)8a41{^V zUf;}ria=@b=8W_$i;qCp&5bpCUj=M4gp%?~&-;9)L2asr5+*VUNYI|CUr(zF6`JR+ zhP3U9B<^eHs|A4QSehqYIY>%}2Lg3bxTN+?9?r+5Nutuk4V0_Wx*i)-t40<(q9$=T zSZt%~9Et}wrr0&6tS;-$%a}VRnv2$0VV9_3pt`Y3Vduh~B%&uKCW7FpOy4eG&8oX@ihrw8bAtSNpIs)!<3 z_I=0rt1G3nd5$zzHAdD=?1FN=vbv6)x6pj{{g-vfKu5x0{`4HKkVz}j2t8&c)usJr z@{;6avOV3*?|bMP)4D|~@mvAS3Ab+$teCCsJUm!Na5Bk`nCSBf1A(UA-roYx(wq%a z%vNg!`%=f3!PBvN$c%u|Ai;Fo{?_}LkW8KiDc!>XOj81Q4U8CNj#gNHlFW{zp)mg7teZFPBy zmoNK&>$&heMIFn$+Ia-$XsSSfx@35Uw|VbvLd&G$FDQIAkT~bLVKEJ>rvCQZck|=d zFUfY-omWX>F~5K^#=N54vR|K2WZupBESIdsa4KCYpmIi@7_IGcxV>)&=6ckeCd_)Z zkjjIqmAX=jX;plg$(e52SQXn<<@l~SRvibt!ik-U&(H0)^P!UMzwIgh{pZh%?0}y4 z?4gF{WZJCbB{FPJ(x-3KdT) z5}yP_1KY#l{22-x_*YZvvk=roc3s*{bMt@v-IzaqzE(=2NRn|~o$9uqlcoqqw|Vm< zXiUd!pGL|a4|%+=S-F*$6#7=EdL~DqszHIo3DnJ2{SH#QXyfE(N93*GN8*JJ;F!TG;7dPwa>*E9%%kJF13%yohpA!#xx#8okVyy#L z0oB3d1v(=^D>k~pq2M`Uj61eeT9*V2)C#r5V(E9;PQ`|% zzP(B;W3!cY78cjF&+qb)j(JThl**m{3oP^$yLE@hx*VGb^Dy>lE9T*;xxUv^G5T1f zfp10!CMibUp8vnB6#wz_mv_W+nfYy&XJd!h>W+p78MZ52p%iwn&yDXT;|4gCK;5p# zKe*h(Q6`gX*6wyHJ$Q#LbGv-|tz30XQlB`MzNfw>CTzp3{(>}tk3fZgi4BzGrVM&2 zgWI^7)M_crQw)%DKiT4DvzDYQpCg4suZsU>ALfUJ|A3j=Fi+RcOH-gy9EoEw4$@l0 zbFM>heg=KTL4HSs1f%h#4V8vMK5W`JfI=OxJt;JmCR^?s|?Ph_X-Uki`Lk4=(+ z)OB(b-@kuv!Mv5AA!Ps;4^*?~t~KPKcu!;W@87;liF}*2_39mJ%Su$}#BWB4T~b_A zrBU*G$LiKwWkQ8Yv9DKdGWbY&?f|rXah`xtUK;E6qTrde7&uU&rgXB~L1{2yEX>Gc z2kAD<8~8POF=F7g_7a!>;QNH~ek853_N}U&i93-#X;+!&1@oK=3%V0hcIc0l8ktg| zQx!>3MSl9{c;KIA0HSGpm>7BD9X8`e`lkCvgvW|2?$xH-{=0dZGLkoJD01Q~NDliz}P&axT0 zz8Oo2)M4quJcxnp(f~Z{P2C(r4aDmtv`7QcI%J*{_Xb#~tReKCs!1*vwA884ds11= z%H7`r9#fKbT^*SR?W6*$-zJXQ5~REf3ZKEaP^yo3p5DfWu_d9(JlI}c?}M-;mU#V7 zF|bTG3nN55S+$8H@ZEyWP0ZuCq!=WZU7lP~9E)nCRY(-OUaWGdB1?sK#aTDP9lt;cl6gVqj{?$+#t}HXA z3-gpDgWaOwwhKuI`VJEU$d0{}Af6EryjV9c&P%%nJom_{W)V<=MXsx0@7}AtP$UoL zkyU77-v5U_xO0qMFP*U{CO|i(3xl@xKde59qtfj#7tsZVruU#Si$o!yaefO zmQnE=Iyl@ap3*)4+U(;HqrGIe%~=?c4PAO^=R5tz$~P28{VNz4+Y&YlDh4!lR;W$) zI?wUNwqS*MBVT|tZn?%!;zK*T@i@CsOaeaN-z)<^&Fin9@<8iVx4zW}+4<$m^$Yda zaBaBURslfET{mXjU(qhBiUtu89Qq81YP2&Jx2ZIvSsW+9S!l~VC0Q5V#zXZb=VH)( z|7uVd#Yk~7Xdx*@L_P+D0d2w%p5xOdY@fZ|gO~uEpVW`QX1VFC?(bn9V!L4{>G=w% zPEeZjHV1-e&?>8r!Z@!BQL*f7kA9NKvSw;RS-nIxS7z@6#{*TyqyUg+ox1$ra7}t- zKiW)v=yeV<7lV;OK>BcGy3jqOPXs6OdFqS7iY5%EC5gvKCi(H9k$Di~zwB57Pay8P zJH)@IvBLWOf31kRj=QOUkdOCw$#6F@k0x_7E4>=0qDl`3x7o*bL-BB0>$pI%5bJOU z7c{F)i=D35nt?nRu}NFCsab>NqTPNFFpum)lhkg^ceDKb-Q5$+dwaF&uo*nSW|Ab< z%4@NE#C%qD?l$Y9wQ?UPYk%k$wAay~t`;b5H4!rGyd?JR+j)=ZXpq)*J3KX( zO<6P=e8=?aIew|E?jowBHB;niH z{Nd~~0nP32D24CKyqMHqyWdlc1~pxLi&ao2IcK1%Q-XD0nqy4RJPy~EF7sipYi{1f zZf(_&m2w=U9+Fo8xESvW>=nsEjfBi2U8FW}V`DwM{#!_%(miZoofmpqdzfE_5zH_e z(iJOrJkgz9x5X)={fq;WxNm^Ta$)vY?>?D&Pos)1f3jf2zGgv3;FS;X8IZMgr1B)a zih1!k@UOLj(9n-XA{f!LZx1 zAS5OipM{B8SKaM8(#v)?>7W3rZ%K!HNMKgaKwT?Qc@$q_=YY>pOKmsjV4c9O)H51D z9FMRs^K@On*cS-zq?q><%cOVMg((GPQ#H57!E{VJE1K{D0kQXWno1cXpHo@emc+VY1uvB9dpwgWjTAY nib1`H7g`5S{Q2`|A@%f9Yb51=y(>|zJq|9@}Ys#E7w)ir(oi(e`i#4chn$=KjMak?$Cy0|Q{SVsEx_leo!kZ3F| ziNu!l_Vh`)EK)8NB)%P$_2`DgH#Q^|SrdE!{#!vx#i9hlRnm9xh@{dPF_leX!hg*d z@?x{u#bUKdG8vP(nMnzUs-(WDS@O9o{<>X?`K;LO4k_ew_&K|HJ$7ktt&!f{z0%rL zE1PSJ@_WDk-=x2{OKf(V%r7j<>_SA!_y&jFE}2Y9RyWr0_lx59c%`SiMZ|2A{-bBb z>vc;!9+PY;E_Rzmilri+sw{rLUn+wEIdS}`{Lb(GOYww7YAdVcvD44U_g^_L({r;j zGczNFTtUCn>vhP{!=2)C*d*Zhh#l)zU0o^d^{wJEJ0+XmmgUtAS>H}d|G@*Y5s69} z?-#I_WqxKH>r)ado;8g>bB7z`+__K0WGYBawO97^9h4^?c|xw;x+^#D49bE29x0o0 z@`r!&iaht|89BbIMl5C%_F`K$k_BfUo?_Tj#)JmwnSsL2+$n@BK{0uhHRKl8?B#W1{nTnE6SG?DNR(UKo|RD4Sa`nOazo^|iQIEEef#YmvU5F1dNHB>B8ZYjch4>u$mpndR`l zCfVMKiYb>Ci>)9g^sK!7!39}g zjYz7L5~s~3cn$n+6`#iiLoTY}7mGP56!E1Nr+%NyVU|$AF7s1UYWVG~?Q;LYu+;e7 zvKftt%WA>K!{A}aCyyPHTrMT)!nSx_4spBel1ilHt@p3Ug-@?acb8pyyG)YFrql>? znG6m_5^Ij1#a>y16#=Z7T|BVjQZ^$#e=8Pp2B*a;W~)Q&Zl8Eu9^r0`-M^_XkcOpi zMpnh;cS#DCX2GfPVG-OuHx>_{;q^*QI4IRM)zZDYPgd7f)N*Kj{M`y;xOM%CG&NPq z*%SNaU{4cXBB$2ta5-@@OyY97q=fG@!>9uO0RCP{a)pu{Id)JcAKaIf$g(6-X({5= zyX-D(0=~1RLH6#-NitoMhL#pRjpu)0vvc=pRBA# z#pCu%xUo|5=`@VPCJi-SiDDxX@NQFci*oSz2^kw6mfCuYgvS{ z<2-ugkT~F>tX9F#WTa3K*-n1k@k7$u z&>*p`b+t^py%R=alX3wr)dm*{_wmdl2gK*|i{0swwKXd?3nvpNxmd`FolgswoP#U1 z!RqO@X;4*_H8^o$SsZ(S7tGMy25z^CABJ1ZnPhZoLE0O_60(MMvrYM=*a~T}2EsD(;I6c` zb;u$%v)XTw7{X6WN0+QFFGxBDj|aoP|6o*3962Z_jvkW32QJFQ)HF8JEW;z4vVYIE zL^d|{y}kY*Vv?vE$I4m7h7GE&48zAeVYRDLf!LJEEx}#VJ(?x5vLIU<%Nk=!c!3Ny zjep1IhwpFikt2r>O5dJVyikn<@!>YRTTfahlY}W@p%KqMy?#?B25-ULlysALvR?em zm!zYsN8WwsO<3`&K2V-+37c+(C1Trfn%&q?ue#TlKmS$P+>F45ZzIOJWp7s-PJ;t( zDsBvZbyjVW0|8uM zcqVMZYRW7vwT%+r+z>7-!;l>=GgQ|A5VQi%f*8KH2Szn2Ep0A&^lZNz>OZXS4Cesv zgtdXMwVH8KHgGg?Y!Jt)#Im#?b_7xv78s9)heJ$BB=Dadu)+>$Ye8IV35&-i!m%F42vsEFoS`POr)$+Z@o;V5X@*=M0B^8^InntUP4c*gIU4%Q}smf-72;t|22sNIN0%D34ry>s* z>jL7n!f^bEm1e{{D`HcrxP=#w%i`*$Y-3{@0XRJH9A+T9LI$5(E=m>%&?Ni?R}7R` zLYOF*EV8)~$GbXY`2KBKoS#(mXm|JkIvnD3cyJ2rvI*pSe|#P(R2e6yQYx$J<^IqR z;=4!O_}P8^yJc5*m%RPXfK1NBB#mcqI?D(h6?mp)sjaC5a4Crg;ACngENvU`RLqb=|8YfRsnw8*0R{kNPm_WrK+(Lo}!3%s+8deBNB}!-U9>!4213YDk;LNZwL9E! zUt2OUI|tWXlrMkj^KxkaUin+ZtAfecWM4%Yu`4E4xG(0V1^nU(bGuwp8}`bvV-HJb zcQ5SIA{RbzIKjCx&AlR7KWq^V!5Vw(n;CWp5jC?*J)m1JT8lDp` zjIgrG4wq-c<^^%mJ>mok|M1EH4nvLH9iEo2K79tKwOU4p9w63bfohSf77OZDLk%@} z_mudswq=BxFw(C5{e3XD4Y_gqzBHLq5=N}E!BY+ok4hE(xw#D?4sNzOTq)KP9yniQ z0-ncOmErc1SjfC4xeT6gWPrX6urdG%a~WHp=gD=kGMDVkm z4kv!Mz-=SpCDeC1r3gga*w7??EY5Z!DOqf4Ay<}gz$1hA?%{KmWNT|fik3=6rwdaP zINcxy@LAh<=CagFWo4yqK#AW^C~h&ngXq#G(v(_&GmD;fU5o8Fp4*Q&ye)yC8(5+ezkB4?%~2rEMwwfhmzA+C{HRI3^6VKk zP8+<5lvfnp_a8YS+siX*#1^3J7($h)vp38k;!8b%zCoxYP-aNpO4JNVQd-A?~p|YU>ox zd0=>Zx;y13Z=RQ7yvylReX_fIk61%~2fm~r1v61!UTG#;4B!i5NftTCsNA|YsI*s8 z^IjPnxgl*GyJRc6B{#2~lS4-ymK0v%_LX-eIyZzQ8YiW>QC|A&i}K!EugK*1Jvn@^ zAHW1?l5oUogfP!C06B(*JYg7?YV7GS$c+F}7eMZ``;o|N3|Tlm2+sWa8$ZFyI=rUWNRCcA2BQkvVm+=W!Nvj@=Gt^!~(=5 zOER~(f=4gv^N?a&UW&+rJ1gqGtKe1x!4Qlthjm*=I)E7Ib;;FB?@8aTPGx>VaEFUa zpfESqWq52HaX$dp8B#yEikz_tK(M!~Q@-=xeoxL{M2`O%Nw#A$4i-aS2lyC&TnGfouK5&knzc@gf5ai>(G3(qTWN{>J$q6F9O zbbHjTu1D78($#y?*%FY?J$p)m0X#fV-$`(o)gd3yYY~4Iklww!r5Q;((}GkE00}W_ z_wL=uGuP$J@q^OV+JPi`O|D&jAIuIC{oOq{SylMHl$<+%5pHP%sJR*`&jAVeDrN7! zevlPuc#t$uc#mvsEvfO*?YrQfoj~k)5ESP=x+!(xMxe{Qj7~1&cTvWrEF?ojo`3k5 z8VVVh(WxZ>8h$@(%dZum<~<{xn+yI zkA!|>ka+vV)U@6Gkkp`lw-~e*u#!$s5ViS4t7<2M?a5H0_IttMkOdhcS zcHWBLHNl0NK*BtMoM>WvLiTjlXi8zi-`mEf(F4TK5g)yRRnJ8LDn3BDNVOgtV{ zYLF>ZE#mG5h;5j)Zd4TzYYr^V_SC#&Ed{vx)4D3zB3LgNAM@f2_UGKC^YUW<83_W+ z4S3x$_`kaK`a;GvWw*$5Fy+O zK1;0}CzAQ88T@Go2y%BfTzJrq(`$j-DuGUODuXdPv#LC25>#3ONG=b>Bb8iJODACX z=)xuW&0qVn{Lz2=Q;^PHIe73G_}d_UZreC{Am%IZSua2J98fB#F#xLoXu{XtIR`#+ zOva}N5gw{!7F@9z2#}|TX$Q^0jrf}dAz_C)FgZI9#wIIXe1`|vqPi-G_YrBtW^p}o zaG5!%KeX8-(wrg=OAc-`n*m){G)Wa$n9df&M11m_?|vu`#^!Lkd|f+FPApHIT8 z(ZeinrXh3TuoTpyO6qM=gAMS=)KW$sdhSuBzph{VBe4Hg=vN_e zV*#4mc8jZ+lqGPbfBWV|i6I3!d9WJ?4B!GM+X0tBx1mI}#j0E?kr;C-YH~%hP3fUI zQu4Ody%LGG)08zmGBY{>;MmnmtViQAIy@mYl_6Kx#9AvYlxo?qCM{{_SP;L4b! zKoMH4u=M`kPS9vxdGGy?WNXcd*yooBD76x#njlEnul&M4lsd!>qQTF6;cJ@EE4{^B z4G)zR( z70@1rQ%u94atPpNh{*|T2uS3qak!#Y&{B)YlVCh7&py+dil4@E zlaY#8b~4)Hj<~FQsZte{4x}y!7jM0HS>Al(eQE9V%Bj=)dT}kXsj& z{-dXGdp!yg(?Hlx7=q2>(-=v{D!U$$G$gqs@;pPRwt|t_1`q7RpO++nobbWOoFox{ zU0w*fDR6i`pHr&v1A96vAX_{qlanz(?QykK0uL*bS1vSQI$fKp6kHgMQ*gIHB=<+A zrM@wUmntB~NrRQBQA7B%pS%Xj2Ry00RvrwF$-zVYprTrF!n1(Um*o9-Kf=i|NmDIQ z6)35*M^8&)_L5A_ZOB_6-+IiU%0iHI4end-k; z{|~SN@WuF2N*N4H9xq>@0TJrsq!uk%xKLIM6je5J;3PS`7Ld|bSp5PJ`3fYcE|B3h z&=?QP-GQsfMV;yx_=_Br{!6hWNFSJD$oZaE2KM1lkQ&8MZ_IHTYwT(m+$97>xrtbU*8?q(kt&o~-0XrYVhFP$QIm8+( z+(o6kEX}o03c!szT!;sF!4x)#)@GwRkD%Vx(u$;b39Lp^UVZ(2nVp$ccpaqi1k6w- zB68$FB`k6aFXRMaUN5DyC7FgNXlrYhoA)>5(>oJdauGx7LRZWUv10=raB&XGN_4XT zDupf!2xWhAIuPqHUa{9 za%x0#PMlXgHEDcC4lGa^g!z-Fp8>=l2YHTXL8u_WDdIVjsXRUpuH0!DJay9~p4*1> zi%e6vvI-;sybCnXAlAtNAjDXohFe4?f|EOo&%|j45E>kumHh|XlqKu!+a*Kym*oHa z^`Dcr>Ht|Mym%>#Qy4@l5dq`{>C|SH=fBt|)AylY)mI}qhB6GOoWTb&Eubr4NkiTd zmY%L|#K1Lq>Y)?z^dqMwjtBqXgO61qxH~irUr%OzM1J`FPjD&$#S5UqpdvhUv=-KH zg-n%}{=MxWa1rRsQQ6gw_yYuqcnw{w9i%}EHY_b`u?fg5QFW0Hr&SpmGFpv|%~D-m zugU{yxgs{T5Xvd~RDg!(rPsK0Ye?d7?SJvz*WnpHz^UDqLwlQ%H}1vffg`P{P=uI* zn%~&e0kBjfpI-b_e)Q^_Na7czt*Z*mQWIePI$VEA9zJ>)uFnbLA|c~bGji$T1Eu2l zT=ohlKvofWBBRe`XQ>2Esu{*aO_iI)pEJQ=d?3l&8d_y;ZeE|0}hYnI&L7I;xFVf;Li~YzVy;VN(()hx-FykBS^?ivYv$k zP_9IRIU!BE56b0B*JODO!F6&JIfzvb^)<<7p8tweISsH8#3FqD<>vu>BJ#I?|FIfu5usqkchhegtSdH4Yg0i=S6x+9+Esf9Tu z7;MN1$y^i^Jr|I7?FZ-Xk=p|!8sn0gZOtp0LNmYODXj(_MWgu4vyaPx{=F=*0)w&+ zBTg*^7;V_=+a$<*Qi6750h?i!X)FW;2unHeC!4CuO)+y!~yV)0bg3}eWH zjzf+%Fevwip={vfn9C(KyzV{q;>G)UO)%KI@B&DqiinL2JMryAjq z=bw22G0jLPQZUBFl~pi7&;iS9cy5Q5BDO-A$5JTmM>>v##;(pLB<_^}MguZ9JSDA- z_3&y)ClC{?HWw%~x9sbzLpqU^43KyZ&l?N|;ZDmy{G$401YGpRo42V4W|fKg+>1}i z?AU!M$l(9>G|Dgi=$kU~U{L1aE~8*Ke&?S&tdRZf3s=B8c#%p}L77Nv353(>QNThm zHI0X4B3!^ioWK34e(_c;uI$7r*nfi_GpWMQm+^qKWtA6Qg4GsO*O*S{RW2%<4dIu@ z;RdZoAneEH`aM3`Dr_n0bb+q&!4;M?XGDsNgt$O*z@$8YewT%%fZm{{9Rxqy@l9-4 z4)P7WkGTl);=Vp}nPm$2OL=_vHY}Y)xE~~R1;~20-DfEGc!TIV(XSH(HezFIyRs}S zWn{I$Aacpht|r-zW#kwns1gW=e3s((wtRTuDo%0;M2HzDa7FG7O~}afy2R53>F@6b zMOY8kX9~o@Hh9-YJaa%ckXCtJ&G1ls2CK9J46>YadSF=kdUlEBH@^PDx19hn0b~TO ziYhsEV865@_jBMyYbq;LJDXpOXcBt!{@U{o7=Q@wrP& z38{kLC#zFX61)s)t3%5LlXs*g2Vyj z=H_RV+_xYMtw&>$1!$=bhloQECbD3OR`6VYxqS1U%q_DdVpC%;pFIY8aEoP`Ru>Ry zN~UJ!Ra>kN`Bl4&fpyu&pA-2u)zzxo&!#fS34=<|hk#_Q9`cpuk}ebz^nfP>-Xf(7 zoCSEuCeujBTjcw%p2HfZaU$2n6*M89R7rek2EO}&bbq5w-9$Zdzng=16DHcsdT)4R~UW728@ZO1&L|G_^1ux`Ex~U7u1?QIG{~N2M zCIs~#B5A&WI0f2|Pn?H~x_)C&dV0EXDv>MVBqUiBj1Arb&&b!xflDNSXsGhbCiKiV ze)5J)Oisx|K+P4wfGo{qG}fBTajhgNE08}I-bkPC5*M+8mH?Yp#cZFa^A)C+@n zv`1!0a>KCq?%501&T?ljkn2SQRTbVdbmb> zJ`r^?Wdg5?d>9Hx3>-5{KwR(~TacKhQ{0DI0J)5GfM@o>Yi+=*S&4j#Onvc^3cXp| z1tKVze^Pk=T3Z0R|hZ>}-y#hQTQh|6Gd0kTG?tUy^dGTTCXeN{g>MOJS z!6l2!i*oP501#-W9O&IIhkFmm!R~!Bj@BoC*X*C;}C%dgA_0`ofzrH2OY4EhjCF`of>Ln;DzxBa&uxITcURr_S zMf8Qq38wK7{GptcCF6`^0{si*bYr#r+i(4XBEF5yto-#W=kOqAIkf+PeCyeVv|`Gn zR8?74z+j}28*PCY&jC|UOi${shT0|s^cFdO@QCdB{4dJzuS&+u#vNYdM`2@F-b>_q3E% z$sp;#A6#9JYrP9=HM!9I7cw^0buIYZsJf(z3LnrVfLdc47Sf@>hlG3_Cn65xxpDKB z7DD%cSRa{~mYc{gfBs9)NC=xxF(Bx+K%t3=+s6FOfi*x5yS4!`1LQS42J2JT@$V!- zdf-u55}9R%0)CIdJ+e(;aAIASB3WJ21^^mzr%t471a(u>i&*=je0udh$a1*QWZ4Y@ zIstf^(IVDju~Pv^9;Yu3cb7$evjn$t>c~M=oB!myKbD8j9GBnx#V^R^+qXb9RVY~C zi*7^RUI&-A7THiR!?c2~h>JKjIVO|SV{&&GE^k-29Nl+Fc6D^X;-YY`;5lI&WIo2n z7v=uooQ#dJHqwO{+lVx$ETj1I2t-{M7C!|5qHH7pO9szZ8Sp95n@M9MqpRBEVZ>LW z(xR3?uymh*#|k6JB1W5bBrLK}E`lPU;w=D=;gN{4OC7VL$RFDwxH@EYc}_k(e-mEA zBY*eGn?SKSIk>M=t`AJ$weh_mv0r%nr0i*~lpnnDk+eXCaD&-#Vgq}SQfy-5cotEK&VI}U0Ge*1c0+Bh&*zrSFYY31=!nGqJ)Su0It)G5HpW-f|YxT6f{~=YWV&n zV&|)Go`;}Y1M1Abt-09v#NWU|+%ogv3J_R@MAHx?YkY8PM$&A9b?obHl|HE06@Ist zk27wt26A$4QNhVJPH_q+h%e6n6;wUSu>cj;Zh_xkliLr{vI1F(T|g%fpODl0P5_A| zwWlckeGlj$jUUL?E=0d00fwWJjU#a?v+Jd6qZSKu|0sUeH#ljK6_6N^*;mw z#H32i+UlZYN)-TF9(8p?FesAY)nUJMfEBrT?H=4-NM1(jG&RG9oRkvLHn`r+#i*(> z^fnf(ksmIxkTz*27@uz&-#v|dkB6qhhY(_S<9C-Dk{RHLKq^Zf7a_q+Ri~WS%4|M| zS&5L@UjvarHfY+J~Grvb}Hp*vo=d0oEyqwmW3s~5D$>C~ZP zfYPmi%{GXzB3>ssT9*Q>$_krQAhu>RMVvy1*6nC~6Osu?3&1m$ak@6J&{}2ozm;wn zRRCs%<_Vy@ve~7llc~#3={DwId^ej7Iwb;2OJgU{BLr$}01I!;K#D|-D{C>R<7p-K z<1l)5Rrvsd<`y^P!lk=1H$A6+pOjk$M#EI2!DmwyhIKKN9 z=a#S;Ny()sKm*LdFhT%X&pdG&Xc*6d=Vu$-Hr6SF^{xf65TY8vgqI>H>n|9GCg&0o z1RHIGyC{_n)}x38if$rBKtkE!A~Bnl;k);>ika4W8+6ixp%LlZ(;+>L?Xs(`P3oTi zf^0(UU4!gDi-tUY;FSS~@13%p|$;w`hbqW0st^mpc*Ti|MM z-a~#nKPxp5P-APea`Nn>S}vH}E+Eyh;gOgb{5M1e&YD)pmDRf%|+Qy?eT)3f}7G^*a#F5i;PGLpbfBfJdxpY``1u zT|i<9OKGZ*YuA?G^T87af?7b7%5BP6%qtBw)#8B#n6Yp{ybu13R54u=?<`tVIcigLuY*%*Qswq(FuBs21@eA!bR&!t$i_^`6jtl*IhW zqi66LH)JCX^b91JE4id|SF0S|%&;p#>f5^{clj33GNm^FL7-C~HBfl23kVIX*j%2Z z$+;<{YC$>i$Z^#w*OpenIjDS`ta%?B_=HG)KT*RBqb1G~kJQ~P&6en$hbx0fK}wAO%*0~@~!o143ktWUIef@|VOu=$wg0|u^ zvl3IeX%hJ+iS;_T&DMIK*4R+J5BR)budJ4zl@}DiX4s%AuxF4(V@uoMD$9W74zT&w zEObAURJYb4FuNt)*$H=)m1V@pq0u>61}RKdp|!P3>YMihNe)X(t6%Pb;O*@@DE$Wy zAwG;tW@AA9`=9&;K*^?bb=J#QKKFtoHn(Npt{$WZPKD7X!1ncxO>91!RqU#m6E!*= z72psloI;aid?gTtg~zp`E2ly$H&#R6P7@?gCDRYqwQjN*1}-j*=cXdCx*F3HnqgfE zzN-^N^4a}|brb8Vn(%!tQ<^S^vD@S>XXw@?GN|k^L>z~GBPqa zC9`XwAGb0vzO>8$)z^W0PNn<+N@3)v8Flr`NJp%>EaVqUNtqNbh*cX+v^rC2>RYun z%MXjmLC76kUP8XIDVg{rj(b8HYr)!Jfge7xSH_`YtZzh+r_3YftpMTMCKdopMOTGXM`&;cB?-!^#3t944?~C)DV~gxnl^AYDy%dE>3C5)8D-7hiZxP9E!) z4{;f$*b~5(U4j>SO{Bdo33bCmQR#_(tNEb{=Y&i0ne9D2i*(%45cFLmw zI&=ptZLs4*EoE4EbY4nWsKW<)C4hX0ka=o)RzAEwAnRKRm9CQbvUyq?SR7guhZS7- z^qS^E9^`7#^;MwWf^MK60LKNOWy7frRD=+}JGK2-0xXa4sc@=|D&%cgMuC5Fxcs^y z4ySLYbf24@Fluvf(xjAALW4A1L$yaGs8?Qn0|0G6VhAO7ZoUnMCn+C&d;?tSC@8KK zX{l?HiJ3)7&mzr2%v(>wGc0dO7fwC%#d`zuGQW|KU;ouFAo*{Us~2y|)myVTG~jVN z>VYjlmIGY9{L+j1&J@)51GF6I?Ue7nc1{-Y9ZsiBD+MyFW<$y`Hnxa7(=9JP{Rq?u z#2+Fs20qqeYCJF*#jAwK+ROogkyINQn+-@p^?14N?oKWLCLcEhq!d8X8>(!8u6P+a zh(&60WL6f0?Enr~^7!-&bh4n-f;~8}caN$LM2JXR)EfGM7l6j)-|x1 z3aXGWWhsEc|7ZWluiylS6+kg>w15nuno|og*$sEv*3u+X<3sZ3BM%`*%&UisF0Uca zvmri%AwsU4O{KI@jNxkvF>whoaB*o1F)}1kq#8ay47t*-n^-{l^wFhTq|)drL{)5( z!xmMHi#isB)EN_JE{YizQ`Ei%(cJLh(MM!?c2F9d`sKa1-;^rQJgj(TskzDQkcwE8j!=`&_#|zR-(YEu?yC` zu^EFJVTHw-rK!FasC8a$!9Cfn0YLGD#ye_S9a5|~WQC3pbQp1DsKgLTU z%ur<$-f3M8m*hlSTRRY7P6C0jeEu`f0pMK&iky;UJf)J7RuABr>T2q=^qtZa--T=t zQFx(XSHk|#@qR6zJCc~_~ z%;6VR>v3>_!$0}4!rWK_pMjTVy$C*1N?4pY;uI^?oc?M#e)2eCp;sR!i?}l|I3c6? z8HmL-$N?AR*2pk`Lr{+O?SuM1ED8L*9(?Z9{JfUScO$JZVH4PB+1&v{F{cF_upI2E z(L$gY_{UVip>oZ=(P^;uIJpECka`*b4%ox7vNVnqCkR(xtBF2K9VSPvf$QzkcXfcJ zDI?Y|vDvZ(NjJdDqmMo$ogEGGlb`&hwCvj_Lk||^#F1_o6+4unK0q5RAnxX2s0rW# zrYfbKc0HalE&V7KRAjcXA0B^3ewT+~df={vS~>x499pvS7vFsiY?4WS;pd*xc>(4` zPTLdstQFuyc>*~A!eTdT>Ef=I3N{Cs4Ge1D$*tH$1PR2>4j>{_R!FmF0vl{Jo#fyW z4NIN{A^q|fe+@2gMy_1Eq83f~o@b@C%Hc(gpLA1O5QU4Tm`qJfA*NZNRz#$>#tWuC zFKe*Ah1nG)Y15q9?LmSghn`nb?RCwFOKv=8R#lA>2=SyTpolVDRja6VGrEXH+y?tGidQSh^w@2w z2q4)8pxZ>caS0sn6HitlooK_KN;&R69pLsN%$IK z5n`J&jZN+XVny6EIW(on=Aeil=rM?b7)W(chSTE@6tJ)!l=E!zAhjKcK`xIK9s}S2 zMEkqvFT#Mxce-_v32vyWEUqj;j|+lEE6C8*Q4J+6p#A)u4-*b(tQFn7qSmPvw2Xrr zSk!;EnDhEO=|y#GI|arpGxP5P|>(bK?@R{j0^W$@m0DD_J+ zJ^P9-3cH9@>_YZq0z(k?*rlr>2(lTd7CPQTCy&a%|8L*d9`wUU4$Fa)56hn3J#fF> z*t`lYyp31fAZ-iu|S;d>S_iJZeRzZ05)EUB$m~U`Tcg)ORX&b(5B9W#F1S4@J+S}*9TMyB{=px^4cMi&x>Dzdd4Z6kHe=MsPkR|Sn1|))>{+O(K>S*a z$r8xm)s+>nAjqRgdH{l-JbD27U9+q$&glSw0xYe7leq*|g~~Q9mMS#IjHD6~&C4n( zt5pb%tW7H#EFgZS@@2sI0QgWlVv|c14?KhpmE-0yuCo5c50qF_+p4{Uq`X*kwYjmZ zfQ5xdEDG9A&MJ)-8ef)1P-X0br5N1Q*g$m#aNnc|b#`tZ7QUc^3bFtaTL39_4W07U zFFY%E2Co5BEokWplk}#h5DcfNq<#Xa7E38u7|kJeOvTuuMmdYs33QE$I^jNJo9lA> z_5)emMEGfLmSza$RI#b7up7(_cTdrnoNQ3%$yk+{VhQFNo@Z}QE4bnaXuUe!GaKYA zD=Vhf5k!}fhi!rZHv^)kKs8k$XPcZHmmoB<_+~^V0X`B?CDwsX86!CBWdE^~va72@ z8X6h_WHwZ}F5yAV*^X*)O@p0aUU|gG-rXJ2h)sRt zy&p<_xJ%NB2l&iYyn{!4zymW-$UnSLmZ#uKnM;#A(9UB{s3I_ATBe1z9+eIS?=RqZX?{8iKTn+9Bp9SgO*9R-y&~m?m)h`?IqPz3N)E~+8$l(Qv4gIA z4rxYheZ3AZ;36n;=7bC6R`d}BGN2*YgriYil%7URjIE z%?AVW@(VRMJptsqP&N=ATrh%bcgKJ@O_JUONOJj*I_0#TT-Qi;x^s~)1`rzBJDTL# zr%o7Xn;pQK!Qy8vhES~au6Q4}%cBD#zV_u8mAoejz~U@&p#>Zm0v?`V=D==eNl!0{ zdDa=d^3G)$o?3>2zX}fqY7*~Fig5#Zsg-Vxz3?nq*B&-lJ~y=pq~;3v#aG=Zrx3g9 zYO0j_DwlLr0X-TvCMpN_^=qZsBrK5-CbSJHgZBqz6$$>nLr3N0u0C0upOGSnfc4Fk_&qi)MHru$l>U7ORH-NFuBGX; zUAAY7F(5%(xOZ41V>ONLUS*lo+QC6C#-*~y0}U<&ZqbX4bIXmpcc8RH0Y;utgdN*X zNk@laEd1<0|Nbjl@}J1ANM%(!;w9uHlG^dS0vR$f92i7!!kBKfu^Bb3KTW;p9W2_i z%>t%Mo!mjAQ0535M-N10YN~Mw5w#Pj3ya(BK*ro8a<9>`IYp%h z4ipe?HjPDqYhr%@2LlltSlNP27Ep}JGo~>7rO1!&sE{#w080j`J-HBrN?_NP>9MIP zNMqn|%lz*)xY9AH358(UP!Iert&U5A3E~hty9-K8*oK^K0~o<3Jv~)QTx@Py;CY~L zu575<&$=6)s`3umW8~FFUwv68X4v)Lc~JOg2S$Q&?*`k{(hSBa zsQnXji&2QUL0MVdLVVtaXK`!t-`ZHkK|f`630WIVlGKy)-NjM!$uRj2Uv5H zwhNb#*wz>$JUCBA=M@yS>y!md>_NBaPyvC>((7N>r;Stlr2v`<2(U6{*?`b;~E#7#CzDa;y+3jZ4#&X~!0 zX)Pe~x3&QEa-he+4Odn}kF4ngcUyt5l!F{)mZ{k}q$yV6fZm7B9+Jz~?kXU(vTt3f z9v*cjS-*@+P_7^{+o3{u_Du7H7yq%BcmjH+@Iy_QsG zHHw8wMrW+YQ?Ww?>~!ej|E!wcv-hy}!{?9^%rCqHGB=?viJYJQ6jK_|PL1`|hzA9g zjrjSD7wSyermaXBn{6|6&C(8u!1qc4eR6}1(m;!z%Jt2>bU?FQTn0r4mE7rpt1IWU zdM%xdDv81Qr|fknvHjFT$K}AD7J1{-kEN}lO^uyx(nTF1VpSF;OJ`$&+>=fj&sHWm z0sw;dGJ1k7aD5vxJ2fHIHC4ulF?^32fz7TpNlXj&?>+%s@Q^{YW9=f*nEd{q{X_;p zvxP$}fM!!p3IhBr4uciB>IV1B;JR3VN<>Olo`}iLQHJ=Sv&Z_RDqzE38dcI&siI=h zaA`YW!faH+?^r*ZKFd0FmZ8Y_?`0jN%D+QPWGNpfKxVi~&QRl|z$DxXw6-*$c5*we3=7j9?JxoWQv=iP;+>O; zL^ueVFo{)ndg<2O5`t@ATPsRW*B){u`;;=<)z&1R zd-4!|uL5YZD8XTZ23l5qzzWVcffS~oV<8#eIQ@gz!VTtzU0Uq$4{h(K@9M@L!kM-@!2l|br$83)2HP9k8jIc zA6%9VB-d__QSZ67x~d2=f^;ef+RTCYt?vjoOhzXL3a>5b(K3`zKD~;+v#dkl=a*vg zpa0-L10+?$mBw@iIJ>5Xp>fh^swzG3NEV>c0Ai;_D-inn;3eQrt7~h;`uo58TiB!l zm2}32hPB3JcxXZ`focNBOw~8`!a|yL@rf9>w>OQJVa=xHXHdCZGDvTeRz(}gR5dvB z&%&R9&UENcSqb!LG%7c4T$W}$AT_UDAf+>QKN9#W5|0aXIm90Pyb0K%h7oS+pqK!{ZM{L7JR-2g>da`F6K%;W=CN5*6Qi(%1T0`)Cg+yr z(7}V!wR^8lLE=9v=-?PGPMO^)w_xBVeYG$>Cf;CJg-{|b)>D$(i*H6jGOtQQQ@hTH z#(C7K_pE|@_0>0|+E;{|sS{siqt40P29>q8wxpAS?Vhka^!N+ds5^M6tOVi0Vykm9 z3gv%kVGO`v1r%I`RtWSRItJk7ljVhFiALD(U((Iym}6>+o15Em_ra(%)r95DiT!f# z!4QPuIyrv)u!_Gn9q(ntEFxT!f}xTuE-dKgHGs8QfKuSpAqXA?PuoZ}I6Uahci+`f z(+@rIqD+ho8k>?!%H^w90+93ztm~rfH2B!)Xb4G60F}Mp^@CA*01EXQm2n zd~OU><QDrL*LZRfG0t6Bd@)B4oP}W!9)oBDp*>4zXyx%mHO%m9X?lEQ!VYy z?TEPzTCTzROs@_mfH2LLF!mEV44282BL+&2lv@Q(!r=I{YKQEzU;&t+{F^lo-GB6i ztS&AnIllyBpde1eVyiXRouP}~M!}uStIUuMr!V!K1WVai144wg1Y!NjwJG@IB>2M!d~O2_$f}FLX-F?fq2xu&Y#ZJkED|caGJ`mGc{cM7&rsf85 z0(eB$@VOwf+0iPzmpgd){ zg6|C|z2N0hE21#1YR1d4QIkzAvQsp~JP00JGSL4vC#UgTuw?xnkkj#k7PV3x9|l_c z^vVOnfN=U+8fz3}@a7bz1!Ovyr`mOBo=u0UQiN@5WzV2fQvzBe(K9!*vAIJI9y}rUyv);et=YE1@UY_(R;HFV)TI&CQwSU!9+sPThv06VpdjbeCC*I_ zXniV6RO%XWnX)P=n8sxO(Ntr*A;4kY~FpI{%BFiJ$SR$fTYF3L=y^M8gVnW@P z>V4!xaZ0jq6$(zM*8yo6C@-g)A=^QfWhonTS@hFEW;+1oSw*b9z9u7Wp!NKeuhha^ zm))qxgh3SHX4qc!$;DebD~40)t#HvZQ}c>;JRp0SOb0?pY2X=>h@(y{yv34|3}Qq! z%^~b9$h9`%;+;C}j|IdW5qamvCHcYk{}+699v~?N(YR5?T&6#?^w>71Ww`a7xnO~S zT^Ew&_dS5-E*AB`P&tLr?=X7#(^*cuuxRn|;r)H;RwDplg`!2T@;Q9sF)=%RI@g=h z+vGIDP#yDTyQ~6WjgO2WHOasTk~#xm6F^W?AiPU;(4(#1HZWN1k{%ddP@1h+TGXLI zeLd|u=`aqU!+GN|=%WYv`mkSVHn$WtuhMEO8>t#H3n^8KiBcSZ&{kL}PnVVT_{FkL zA57$nnzxWjGqe8=aoNcvRmwk0Axww~xq?CPnmAnof1jPM94zGb24!S&NtqU=7gn3q zxUmIXrx$V)djzO1R96Eml|3?-S(BEwYN+g;GW1|l`|(-u%7WgSN-sb{J)r!Yy#Ct% z(o@>Gt6F9uyj9kL7Q;zBa0qMYg;R14v$oY7`qIvk_5DBd&(u26eVfeu%kA!rX-GJbZcu%XRX2I3r^D8PsptoQwAO;AC+K~ITwsLM}ObwJmW2?3h>nb7ky5X9lAOIX$JD~TLS~*>c9YSXuIUz~&Eb_XlnhKmK zi?#$bK}w3jB{#!Ov)XM8z=K|aqp#HB@ot+*km(2&8<7=RTAY9@ypLx!>wxhue({&I z&+z?se<(+fJSJcI>aWUw{O^ARZT(#ybpB1bc6&tX>WQks>!x|F z53>8El`(BfYB9#fn^UQoen(WLo!CcbcNk8)p%JQYWK#wKbFUy{gS-=En?964U zJloZMpbCx2``a3FSXWAkj6IT^rA?1#$!QGJT<_lP8|v=o7am~qojPDIzU`8K_>C`# z^{>A7=VEbg;#ix-i8vI4OJfs1*?+e4I-FVUgIigyLT=L!*EI{aVOc>1%i~EVFRU%f zV-G(h;pz?urXiV~hLzM-V(~%<^z%3sd@zT&yf)Re7G+&-4U9^_RbdQN09erbBFM3F zYChs{7!S_Dh8-vXHDR2OiDj}xX;9er@EW^l4 z6yb8Jx;0`S7Dp66Fh(4j+!n=ZY8(ZNb;0I+P4|Ll-bDzEd^rsk%Ry2SJ@h%GQves>ti z*QaB@*tyIBeq@5~4P2G$*FMH~SINTiAl!8jv>W*1Tmowd=?Et*6o40iF?uQ*)R=zq z+FP>!@F^WKn@ndF?6rXyudl1oA~uFB=D|i|jxnf@r5P;nu7b=&W^5e9%d^isiv0>u zZ2?8(sMNVRucY@kI`04h5qGYAk_p2@h*VS)}$6E+(cW)cjtdYc)5 zRztAOEt@vdIWdMbFjw?}@nKQ$!t#Pl&rBiSI+bYH)x8V*3n8B5u+8Q+O17;osqzHi zU$=E6BE1=NJkBl2;uF`CY3<(8i#hOOUMwWSq+Ux}f|?Kq8`9oX4ee_ai@vHF7+-)M z&keGGM#X>G)7z@O5gf@pzYqbknuk>40xRN|C?_|#yqdCb22beI6Ruy5!ls%bS}X4j*X8?3kV8UKImj&y;dlzc!Rk(%SVhE;zfh_ zr>MY2mQosd?7E)F4BU6$!Q*-o(?#f=KAkoJ@zz=)lM@SYS79I{PKfp4&md5m3mUt4 zlsVFax)+%QR#!XlJG+W_66))HlFF7ePC0N235w=sW^`~HFPG%>hlPbj_4#H?2BfnS zFKL$p)jinIF32iN2<{FYWJ3!Nfq7Y5kLqmDsv58~^|h*C2mDTTVOv0a9J)~AbS9h- zoyn471BpqSTuS+@E+FGoVTYXNbmBy2OS`0M8d|W3W;|C;Dl6RJV!c4JS>%nIdUtPK zZJory-_o$kNFU75Grf3rYJRn#-mCBgj17r!07MBc9*7g% zEyqIc?&*XVNke_FLu!%L7?*-kn5#@WnaQpLigG_waLDAaHI9IXU1IDLset(W!TGC7 zv#|=D6r#0nZwEFZE_d$FLUHim;c5Uz!s_E$gTf8b>F=zew3)TkPp8Xj0TG1Wu~h_b zh>>CBNJ%HaL#GbU85kJW7#6DV>4Q1loJ8nRBDhk!fHJa`;}oW5b-Cb+Kt!8iy>@Ko z29o3rE!RKwa6eGvwkG}Y?Tqq}0mSNBUK+)#>F`-@Y-$1V>ETC?%gyWew9!S`3v3`8 zNmw3YvKZ9Vol6&uIW0ii9whJ?Y(!;!Sej3FgGAVnlMjDRCu*#(PRT&jxTK0|3Ujs^ z5C_qXWgt_hG1&qLID(TgGI$s4&!h6AOiAPO;NU9IZAMO>>eLx)+>nCuop7c0ok@$T zyIDY8c1UTaq{hYDQF*&5nJZBIeCVW%PmC)s z=yC$(A%SI*$|epbxr}-2o=qU3T?E%yN?YL4nzaBbmoBK(V@p7u!GZ??%Q;lG+E=CX z%!U*5K#wU22Hcu_BU3^?6w`h}&XVcd)hc^hYLI?lQ4lwxn~O@_edehXTH;TdYZEGm ziJiA_jT|tCol#AZo}w8>(YL=Jn{Ahsl?MDmp6E1cHMxm7rMHU6L#w2=o>$7nWqpYx zdsH`vcNlVjL9y1Zr;nU22be26BPI1%I?>*2j9y_V8o7U4w&1c|dRJmui=RmJ6TGSJ ziZ5nG-_*nmHgZd=8)oL_kY5@zdaS%)shH0g!@#vv&#H;I#q0p;3`;d~zjxj`hh$}0 z!U491rRAa1FW~rklv$i>LT27?}DgJ^)vBj;x4V>`^^&_Da|6VNz-*KdDt z53bHFPe1)xFavV{9bqXWUakRRzxmF4a^}wdgzAzV&>Bz*`in1x|pwe#K98<#}80F^YwMNqr zq2GD;Q!xV!ee;*T1{FRkN#s(@0gX5#I<6!hD<}XO8W@*`hmPvJG^=|RU@44EavI>y zTHNVe&H)=#ODz^~6hw6p9BVjWlMM3FM0^{{`kK6T?uO(+eI4j;k`nJn1>9X zy*nVMPMnhMve6AjnTutSY&T=ooYNOlgg!YwhIrqwQ~YGnXJ)v0@`+P2HZp>6ke274 zJ}DFYIk;0RXTsDY&kEo~F=kx6H~@49juC&^Wd*mB2lweHs+`ZuGyrHqc*pBSG}ptBNLRElhJash;N1p@t=cCSuNt{@hIREFDXXbh>gI6XV5 zauMAXsW~@N7v`Ou-=>wzyeyGddc!3>xId-ysktbc_?wJ@u9{JB=q#)~3F?n6VHJ1| zUbCK0Ms@x+=a=#JX@ZaGv5B9}N+V!6a`0)eI2|$r-Lhm^!(mf+dp1 zNkIHj{ki*N*X60^UD}}1x9_N2y7&e*(xS1H1{1>bdd+Z&IMoz=O;~VF3(h5D@{MnN zUS9w4UqQz-N+{_)csJ83RD8zK0+fl8wlQ#)jnP&7;%7gnlb!zjPybjORogmRW#H}z zo^4sWIy>a(@skp&td{Kds?1=Gqnio&_~sN09lY%ZJjOQA5+~(y=x8FIkm^dmH~|1y zftBFZ*vPML49?1L|I=T_f-Y$n4GV9wywa2@h1H}@_bl^c$phQTSQcR7g-rxH05@4) zvt}>i;Tn(t391kixX_K&O=+z2>v-fmTQ~5%Tj{i7hNYExxq9gXIezL%nH;<+ zu~bA>A^0{_HA5D2>HISfSQ879`)DMki8^~8`HYK;^Q!)^q@SSY`n7vXx9K(PSie!o zP^oPW%OlV-Nc=!uhnzio0tNzbwXe5Lr^PaEq~Ok|iLo|OyGwDxs;dLwKx?J5qf;4(cHU*1H4ovh_8U^85?OW&goe zEw=4wZ`a_>nV4D~juVssVX%hNno8s}R;(?=WDXF2Z8feWIyaBHB9nWI-a|;S)2eEJ zI-Ai!2PC=qE}6|`%9YxwtNNr~Hfh$RncY}Epv9Jk3gnSay>X1g^hQSSs0*dYytXXz z`rEgW+JF>TnbR@TtX$jNTGM73GFE@u2W5qNl!4kf{RUI69Du)s^R)*}WmBbb|=(;bPOhwcQaA-kuW1W2Q#V2KAQX4o+ch~5oz-Vv#DuA- z8D$SHU%jR!fQ%$Qzg5X$a*uRzEbXgn4$HnnJ#rNBG*#VNx4l=v7#X*o(A< zr@9ifTrA28xl8gns1tQHwX(9ft~b{3Gw4dQ{Jw0~xbT@pzDR56lA}m#%4Aw1Q60wa z)DhT5xg>`uRfk;4I{84RuvbI9PA;V-k4=sBVmWnU-?w#!HPF_*yR$MmwGLERDW?wZ z(dLkn_O02p0LQpiCa>KD$JI3e z8!oFF1}}zOT$}

%cqh0{mxtndl{4?QOk!8VXp%3`pw~!VcGD6({BP-D~pr6E911 zTep1j_D67?IeFyir(nQlz4u-3!N?eQ30ih8x(tPUV1g>}{k2F9Vmj0)0Z+(M4X%}4 zF9Gpse#nHLWh2}NN@77UN|yco-QUi@((N{vj&ovjCGUWJ^mxDS{N&V}{IA!~OJi*X zazCG{6GVP2iHouXj-_~TJ;#pkSK>7gu24>tO)9+VrnRL`$?=ljOky)m6yqFL+6Rc- z(%hr@j@eR_r8NK{K>mA%@jf>xfEPRYf=`w{P8&R6YTvzeWpjS&mOaA(@J+V$Lq) zr=EUE`uh(-BRqh76!~4C5;4%EVso*)B~cLLoPNKw0!?#cQ>MlS@{Xjw{sSr}g+TRj!bK$z zHMLqDbc^31#Q z0zj`eo6)Dixn(6Ct!R_xrdmbBv|h$TqEHe9RMolBR+91-qgjJxAZCkG6Z}eS9*6$W zh3Q0oP*-go^*XmSvPnUiBSv^7>jFnOQi_BDaFX!`PNoB)!!Og*ak+lwQ*7=AVp|p5 zrU?i$2DFVeLQZMRgM1$!l>h#p{w3UMjePT;{f_h>ISUcC4hB=DWt;5$%4f4$rl^fK z@JgF$AbKG1LnjW23o6Y~s42Ytjby^!{fD)fniE0x9zH5zcnZ$SZfWb%bvF~eF+Jc^ zbuLB>iMn<%u+XVg&|)KwN-pJ6MoSlyW-1hRUYfX}#k0&=cmc?B^H9I^^mgc`65KEbs2X23 z3Z7`0Jc7C?1tT#|C&8!M-RkbOyOl{hWg#Hq0^(3)D<&0C3J4-HD)HcZ^Bn1%R*H`K zR|O1>$C)brV~>9Z$b1QWDK-{p<~l^z2a|)?$UEBa$V;I+ckk9=4^`EORnDB=G&2L$ z;SYcBw?KN3yR4SxmR14#Ckyivn!i%f&%jMG&7qg$`V(DhQz@_e(|de#P+?ZYZy`n4 zrB{+K&J2mi4^RlAApqTxWVq$n(F5Nm%5i81tq;l0 zgRoet8C#oC@Ue4xdi(cu$i&PvL}@(N@+x5YxWe&s7tYK4`lJph;D|An|8Z(R2mbh= z#=P+S*MLlmGBk8vN&B|8z0$d>8*VlS_ho~&*@P1flj4EZt zN@yY?)_QuJI&1-!ISn_Olgk$`OMPvF3_%}jZ`vix%Vvm?t5DR}Ay@eU5^~`7*04a; za^T>)&Zcf?Y?FshJ}s9oUyM3mh+AxhqW#_2Phw&Lc(e2f;V4z@5_w z5Z5;VBtG|rUyvYDgLCJ9h|efO-MAJ5HxMw_Jzn;w=8 zxZj(1Ms;p#eKkj3ispkeQ)BYbqfbkB?|%8kU-~8(lqvk#C{l(sMadaXePnAp3{JfT zHgI)$Nj9-w9A4`Q_~o68*JXQaNqWP61vBA#j*Eu7KYZvAT#{ez58jazC(g)cp81Th zR&;oD3Vu4FjgOp6k%g+>-G5kCR@Y<+Fh9ASQnyH!opqafAuz1*FaPR$^6|xMdRZY) z#rvP$2dc6G;ZACKLw!?N?;Z?=-I}Yt{>D$hj;sN_J`VR;hwt$L41ff8R?5`q76&y* z2+BcCwP@Kn%O|QTs&uoMt|T~YfECk-gRGu={k0Fl_S6ALyr4<{Mmz?f)Py}w;Q8G0 z55N9Jy{Da5*bpU#8iT6HuP<*y(+mU6Hp+t=wk zqO)_0(gwfo0WpGjdnLUNPNt;)#lH6vU z2^&g~UcC9<`$$hLQe796V?c_vaBu$8L3#iE^YZLVUxc?*jadpkn<-8cXzG$0LaSuq*(v>JFm;g@B_Uln3vjXa^q96^;o$}%PA4qFwxBTnh`+XSV zJs{@_O|9rAYwDZi&W#)T%z2#VNyO_$fRo3cd|3h9@X!NA)_$;6U3(7d6+KG}<6vOY zNF(r!Sc}HyMvZsO^A;f@kXN3YpOc@w^<#N{VFrh%L-zI`5w7h1)5r0BAWy6bojJgn zHCRlrR^VO%pp=wH{I|d=ScE_K@BZMwN<3wtMx$%l zto;CHEfFnBRc)2>m@Eha;Uv}JYUDU3KxmI{j2GPJ>dFR=ztfNpSe}m*A*-Xj@V!nS zTt!aNE7|8 zX$Tbmt=fwM#kV_ayt7(6jc)?-?%vlt4(Q)Us;?}$Xieasbk|}*hDqTU%6`y|YtMaeD{d@A>yYC?_f#Oj}$naejH2anGs6xIQ zkFM#(kXCjf5pr|rx77q59UIb!jd=EPSOPD@;!G3#&U(v>S8mGZUV2PVDH(ktDk7&r zxVKo`Dqs7`%Ss0sH+~sCZg0K+F<6aN?RqT~k-s5nr}`YX;j=RZ1wW*Ys5WdzRx7wC|oky$|g5E9-VxqA7A)=nPk>(HqV4~7;sk7Fk= zIm}OP3~7w!M0f|ND$-S~=qi&fVq4qJ=IO)^Z0F?Uv^J=)4}t^GSC-~=^aw|Ck>ohA z|1%Ql*(+N}JxIOfGaw3P2f)LYk&Humfcp(s)r&t=Bc2*gGOm~Daj-sFliq%F`b3ZN zv^i*pS!Ka!>|x2^^QM;mB_?3Nn&Ftg0h?F;J!9FdZRUUcxbB~E*nN#X&%Sz62 z%n3VPEmBikiOtEt*Sn=2?t=e~?NoHB9c_&|;mK-oNn1<3#wgAvZ33B1zLDg63?eeS zgGjMmzB#H23n?;Q;lq?jbdC#LHYEz~m&NENBD=%3FV=K&3^JJu`9> z=f?V)-q)J~O;+CoKn20}i(mhza%f^0are5Md-qlCE(TR0*KRzJEL-N9CZ)BhO&U(W zfRpT(V-G*4A~2~owtQzmQr{hj09fHY5nf0kPS4ECD8%t#(2o?W9;bU7z-SR5EdlnX z1{`vW5-Qe0))?u_ctmZBL+(fet&SA17^_lIIu)_JGc9V*+IyD|#=-z$Dpo|}qy`9al z<~ty#K^Xyc%}tI;V||rQcxT@s2g#i{(yOO`aehkrdb^aNdF%Ce<=VYrdE$vP(zk!F z^dm+30C9u}^2|f0aq9EpMlR_DdgkB(N;pKiJfco`7*z=zP9>cgE7>Jwu~#F_NoeUl zr(}?>BR|};t6iMnODAS{1I?N|{N(4Qeb+vD;qzaYkq0;B{ChuTv<*a zj(7DRlt1||zb!R&ZPL=wCk-vT@eFBMnjMpq$J0RJ8+v2+#>SFdzcGvh0XeV6p#yGD zorKmnc3)cqLY2z(v7RKKH7>qdU0DPgo6)<4swzWR5Q}#1kd>#pPHin^0>Ua~ z@+cgWwSM&hy#n#>C(t8LdY#N`vxv-hB!dHnP8?mMpn`QDe^ zdyzw9@e^@uQY@I05W1r>zU;-h4$~{PM5E z5JEEWS0ey&UTNL62joEj&&pe;DQ$3QkLjla|%mS&a};E=(gyCsw?7a0Ex4UcZz zB!)4uoo#SrMAH+K$rwvg2hnt2SErt67F8^*ufn}SDXHeIE+Ku+a;dbV8H()dG;S7U zM=posa2myEY*R}C$Ht~)1e9Ari=ix9m%{H21~Uqf+FP2Xy1rJ=rY>ob*dnH9CDnWN%E*<-cdwsvb?^k zOg#nGeE?OYj%*g2x=j8V`~83=l}FsuwObhxQ;{7>?ebf{*{mZy>~z)ToKjVs6>qXs zYPp32Y|f>tSEZ(=Qo<~GA0Ai!kqLiCXP5RiXrUC_mtkBqy77q!5T#8=oKR!r^Dv30 z(KGkEar3@>^63qw<4&L61FCFMKDqcEX=(8({q`IG_kYsRLf}_Z-3Y~}Lk^#KTvLi% zYFh^HTnCwQ14cE2G@>3cjs?9Q#MoW<9>2VH=R^7S@BEH@>$krp-}{eCK_5KK)6v{vw(Ed2ViEfm@hOtYB_+XKU;(j{shi;A6 zs^zegEMZ6|l3G1i2^=W8~zBk>RZVU6w+U^=H1w;#$2F#8rjo# z2;cpw^zG?XDy*%o0bu|k0m#nba;h>@36Zt7p$VGdE8-QSev_L`uR=ka_Z3DKXY?{H zK4Z}D#3r+zvlfVw^+7&)`76Jsx$T3YD>64RD&vzwtV;m5T8|CxmbUg@IrG%>a{9@a zv z1pcIKf^jKo?}S(5tw{j=O@8UzQ!mSl1|eX@qOy#^W68^dtLKm=#iXt}s0f-ad2Vh} zSs@+G#R-m(oZfl+9J~wr8l6(#*s7y6iPT?z<*#KgQiDW%9gLF+>b+N0i|s5tR)Lpx zS>-D~|Bs}$zFDqZ`anLp{Dvf9Tr4SJ+7^k-%B@?UXuEnVHuB8b=fK`{%JX0NMQr3E z=)6~vGTg!YG{{%K_66j9Ygn(c+`e{6KDamzG6X3boSF5dXO7E9=RTGB)tD~2F>x=e zaGe+9wSd2?t#28NPO2%Rks6z>rZ? z6l#G1Y-(D;)1?xd@Q?n>@5sv96x1HO_Aqh^KgkBSjZ-_)S|qi+G$*(3T$I+vP6a>5 zPdzPP{rW%AZsx!L-k$*o&Pou(0Iw8E=NEMjj;WA>0t4^$Z+_>We|roGD(^IR4%S^*mWoUh2fIAh@(RPb%E!l^geE8ZXt1KpX>@Vet`5*bnUo zDT{^q@ZHxXwY{k~qI7llNC#pR(*{3K)a3MneDha+UQV1kEcYKgklOE@`AaWpKFIFbhaNsHjSaPO2jXfAa-k=mJS%r@4d~dafADiJYEDao7#tmk zE1H!@AAd;0z@F}IJ*ksp57hOt(1;;`X#?MZsG75CI7y1M8c%r)X#&%Lw&s8|H?>M# zeW$w6+c!SZ`kq3`3KilGHp-1yWztyy&ph*tJn{TL0Fthh)rnhjZ}6_(A>wMl<(r?l2q z5SN%G0Hj$4{gVd&clq4gGJNwBdHR`0Wea-M_{<#QLIP+gia&c2!80m%K@_uFwXvx| zfy4^$TCf&mYHkLSP^BiFEPrDo2Ad)mmLpIQJldVx-8BS7p;C^BY}}BV0@^Fs&{U%X4{Gax_{z2N_!Fn3y`xo$b9Mk%)m3PR&eJbENhTC8w@WX@ zs%~kL#UH+nl%}jxhq>rpxEvQY%lp)4)obLl39*!nJC$az(NVzrQ-@DzcM&bUt$nvV zCQqx_Of{dElqB$Z94WmOotOIN9^`LJ${IP`VL5o{l$?3^1)$b?8M<{vK6v{Lc$KKp znZ%jcuz2pU!-}^WJ>f1egc5AZ)$=jxeN>#)|m6g!a3i8TppTc@u zWo&8|$A4J?3cgzQ_4P?>dmA<)suyFhTxlE};+c~t5NHoWTWgTr;0r0LUcY`zE&9mu z6QGRlKzm!!eg$6h#@o%T&Y;XL$5qYdV1;l+K$~TF{TtPbQrT!8i9ljmSzN}cozP+G zZM;OwRhGvec?{osQeU2h!mN~g^~Z0jYkd6iGqBtZ6@poJk%8n@;2jr2H)aJPT@3-d zU5k`Co2;d&5nOO1=)|D-fH(=ynCq^_Gh$ppl+#*QPEFd|*Do)8>F4Az7)Ae~(=s-4 zPrm=xf2gz7KDl~c))BW7@MNUtbfjm|P~L+9ua3|xmy8x_#$1DiHHZ*WY4jRw{+yi| zf@>a?y1FKi6DOg7bjgETAL}&^P0d|m&BChQI(G$(!i*v@i^C$#ogETcTa}Zi&%*z% z%N`)LOIL3o7Xm4|&9D1u-BvM|3r$iPngpON zP6s$kj@e++%n65s19v0==7T&VZ71{ENXy{{dGN%3q-RPd z=(OIV7GvogaBUYbt|iYE*-RvI)VGUHf2sw_-PU`C^x`NM0)rc6sewJ< z*W8lNFgmiRGK$AXg`=n>1nW+xCX8D?|MY+S5bn&TardRqyreaiEAz9m8FA>a1M<0z z&>k!68uikUI|FyYaLgcy_X2e`X%zxv)!g_HxYHGB?AQwOwy2LDfro<#fW>1lSPW^veT_=HoBRtoO;1a zzCbjL!==v6{UFhSKG*q>jB0$wW>nf*!;t&&~jKn^tAlK-gWwso365 z=@?}{bVwHZQuU8xe($=$I zY5)#uTXunf{)~nXlR2-c!tUM2RQbO3=?4<3X@Q$9%gtLK;qx+jvPf2tWOsuN`f2+e z=X~nbta@KmPOG;$e=Xqisb^wwaTXiNQ|aP}FA<}G#cWkpiYL&yGq0O07iBHZ7&Y`u zGrr5F)aUHd~S`G|O%D(O<3Br|a#>w-gWgTG1j}71{Wg|ap|B1xvk=wBM zkX$88>zjZmc`Xkla^t=|yu{+thTftQ0Jxy5;^4SOUY49pBmcUkNHn^!t*Sv)O|>o{ z+uUZSBeH)_pFH>I5u^n%oi@xO+NH%6H5ll#@HS?3S#z`F04+VjbOjA2CViDa)N|Jke(oEe*xgYl$yE-ev7 zu$3Uma}a5Z#o`VXX)8u}9O&QZ|nN zc;}suWnpg4xDpLPG=@cd@4{uZ_Ug*8R&?z~GW^0*CjsX-VA<@rO(Gw$YZA-{*wxu6 z-T();)`BwHkfTSA$pvtGX1ximsH#E{X-FPH+?+Km)abH>Y5})MRfFBWxeRMO{j!D> zg=qow4wZ5EbE}c4eilpcP<9?&<;vBYu=1!DDj{!&C0Bt<-Bk60!MCsXAbw^- z`BD}Nvk@e^x~MJCbT2Ld87-~XZs3&mjC))bsP7>i?8@RF=1t^H@7LhHGz#P%HjQcq#l}@(UWKbh%&_G2Ba(@urwQ+tHvltY}j=q%Nr|5 z6Y{*%uU{T};TKgHzIT5_#ni6$upBx12+}GjroiZ8CL>FhF|;K$CKmfp^GSp{Pg4hO}!ovbMJbzw~(<`I9H=yT&7+Ry@RaA89# zAvXW|H@+;DL7yh{j58dT!&RvPyHkxEY!&e}g*@)_FF%jCd`NnFy5#oYfK*mj0-o>D zQC6Hj6^YENp%9tggWSWEgo|D-8T}zVA!eO(YEuKH0KmzHB;IxQ>CW74(s6o+5+2f~ zH^@*JPbw!$!k&GA{BPVu21Hh-S+#1x7;%!)8Qn%#GKbyKRTEirWTka|1 zi=3}HF|iKUR4vtEw`z;j=$e}wz$>;XiOcx+;m6ly@7^w*Q_ZeZmNPVf4dI|wCiz6k z+gmXm>3`_pK70mZDK>6oWJY`EwG_l8dKGI^a}7X{P2-Uiv8X`CEDqwGMbz!+pqLhI zMYh4DgaF7krL(gepsZRx`@%~Ss_WDR?F3!7wKyiN4bMuFlGWrry;Fj7LUKi8^1N!0 zdK0#7XUMHdi-%3TOsj0%{A~p(Vl{CifyiOhjP=@}YT|9+MLd^HC(&DZ%bJywGfFxU zkwB)T?Z-CdP8k*1LCinOVk1lVtfUePFr>XbyJdQH4*88uI=yZ38{hoLKb!a-i~q4+ zJyYWh=s1l%`#M474oH!}gB?n+f;a+eE^AWao83M9_aG4=+^qv{_|4bf(!wP+#qbwn zUOZ;>S7dh=+kTHnvlk>o0F{`}sU=SMsR0rZ9Pyyos^I^3b@u#7oT9f4Fg-pu1_B25CkGBFLZw z85E;LL1U;A!IGpDL{p_HMNK7TqL5h81T`X7L{Xy%$dDAp-~==Xf=mrG4c-0T>wfdQ z^S$T%J9|xgul=8M?|a?-?A`D5x#$1a|NnchwbxqTT6_4zJ3sQ42&8`@fXZBNmcJw9 za5}-i^|TzyNA*~YXc7UP3o$V5M!SX0cC!#Bnm{zMJS*Dq^xxiHhjD1}22A#+(Qg7y z-G3Ux;gGMHot?$n+8TE6-i@WDB`hv3VtIKPlarI!+}uR3*TY~ikb9@{jk8O5&*$#r z2Ylya4&jkU_hDsa1rrl}?Ax~wZ5wgd{hz_b^)q~pwvgLQ?P&8c)OAkZOdlF7uP))@ z@&#;cY+-)a9QG{i!$iN&ZHm^`w&ibh@8uX8W6SsR_2}~2^V#kp-$0-11vxm`o4_@* z*WqfE`_@ikGj3MGHO5$FnOWMFbIT{Owz-TO4?Qs*>0|fe0?wVkP&J&s>0`p;dp8Z! zOifKC!Lp8x zmOAO?7FL=SOis*T_xyt6dd#%?lRFNyz03zz5_(1wA{rsm$`GvyGMI7@1$7E)v+|?K zH$@l~`9mm0yO4Wb6ReMw;?J*bF5&L8pXa|PlR&1Yr*Z>Kh$bWxDBSh--40t7me9~O zq^-V8Ps|Ae5p!pVFlGrOV`g~B_u^-y&*oOLE{Ts#A1s7k=t~C;s$3D77VdaxN}Y-4 zN%`d4St_XqvX-(ijbGN`Si__7v`G7Em8Nu`!Wiw<-mKIQ4!F2_8kg42aHZ#W?P6Ne zE)!1ZRMZQSdwe!?7&U|bNllM=8?uWq6N&6PL=bviEcGSYy$kz6vgjwXIXg3#%=~oe zm?i<&R$ouwW`2H9?Q|X7I*s!<`FgL(jXf}4P4(kSH2Tf8&kyy5waJ-A;bFv?r4xL< z-=AQioIQJ%e{XGVv0tQPbnV2%1b@?S(=>Tp%nYYq+7%u@n|u#URv~`}Gel7t<~m?& znw~y$$uA!|cm%r__NI=ukWG1cQf(FTGh9`2Ux}ibVdQwIG}dHf9gBYTt#ZIQ>+5_C0TKE>e_qa?J9kd#)VJ-~vxmV=)2PX# zZsavSln2?f&D6t8C&Eaby#KWhM|GQ>n!(KEbZ(0Qn8shP+SRjT0i(29kErIn@%2R! zXoFB43ycA@QmiGztE+|DdhWUAWAfoPR;JA~mCCRkU~{m}fA{;n%EyI{2{z5M524c4 z)z$R9fz6E#tgNnZ2iiz~`?8(@lReh}0y8K&ja46BKn^mqd)Ztg*A0%gv^A({SJS8b zsA%avZRtEl%O6J@)sl&sS6q=HDG}9*@{mf=Y{zh`d?=>DXmd5k0G;Z-u{MbrxH!np zode~Wq@iSfB~*~IwzUK^N`{i2Y}P4PWR|^dN#9;Bsv=7SHTUn>uJp9m!5&Fr_tRo!hB^BXjFmZo{rM9 zqN9b=fXXB&7tG|8ST9PjT3C@AE~XG1%oibq>Lcb9@LDL1tqc1mLb1Wwr)Xx-Qwo2E zoy-c1H*G9n2&Oq>;#56uW;Ri z6fG$(AgYyVE9M(ba1XFf-#$sOK8fm3P$)jH6SuC@2)#@UC`r|E_!^YFlmf@0yL^gqOhp zq}N(6HdA6fvv%YG9xPc(jB=a4Uez^?p|D!e^-t^3#hJBUd(E~<1Dx>W>Na*mn&KEk zsGsFCL)Jkpm4>=s!NlzDnmac?Lbrv#Mrkl)xA1eni+<|P*Q5fFe&Z?M(mt(b)?muGju^lFPorrK2raUs#_P)^oQfTdbq5aa` z|A@9HKCAKmv2B47CbZS_yeX$*;KhTOQAFByT%R%1Ojw&ukl;8ovDUdn*k%@e9kQP` zzfRe}V2SB6`oN|iU4K_t8#?#(9j2m%>zH11we)GMt<%XLbQ$NLsI0B7W7k|iS5{0m zUr}`gSkLtu7;7!0ObZo@0lUwv%$f?Rm~&w|S%(b70Eh0BPKRscSYRn-+E@@NWn(=4 zmu!l3C=&*0DUFPf#gGnBo+T*0DTxF)jdMKm8f?nKw5bmLuBq%g>2bmt=NG%bE3FP? zJS#hYlmJ+IpF>&ho-}OJH93t)rzpiHglF*WbS-AKofiQ^&6LsC%M1*&OJH z5>ikydZIHBYY>`xb>-+oC!Li!AIG%AdcM1H)?C+_^_U+sw8RA~xT>YaZI+PE?NSZN z9UwT`SahHH(lo_a>T|2~APNud-bZ#{Qv_(z^~{f*-eC>%$h1paYjUyaO^1m#+6`xJ zOhbuwa-yG*>tr>UOT~tcD3H(Q*EKwAR|m+9>v&lYz4nGqh@c=VYiM+%?uH5h7aF-R zAp2CIsO(!PE<-wt>)4)$3YenTLcRB)J=dT=P5|3!Svg)bavY7p?p%lAB-+&pp74~L z+dAZE23}F(0!>;= zX4=Hpc7lHI+fDfx`$l(Nb|rEyqh4Vm+Ugn3vdC%dp4*4%iJ2n6a&6Zpk1NGgctLGP zgFzo*W2QPAwz)GMpY88~M_>6|sKH9tBIIlh{BRPg>+``_vOERMlw%v&Kl@bLnuORQ1ZoA|HDc9s5IU`jQjY8k2~Hpqcr2Lc_4-S z8+~SGX0pi~i*8*R36#Z2!D6nisSN?0SW)Tn_2s@X*4pe%ZgkT)qSdpKn7NOFWbK+< zSHRm(1x9*LmwUD6%uLSW@b2UMyYHv3)kV6?b|%%#q^B7dYK%vRmoL=QNq97A$lq^l zO+%e-v#>ILd*!id=qov^EIUA8BTjw{Ygk@j7a>HEGCH6zr0 z#!)5~`ubScKjmW&Tmcz0&}Zl-2dm5TP2(h7vJTa4wE4yI6p!W|s>mvvV@8xIBi9|cxoUrZoR$@WQEl=?I#+ON zKPoBdMLSQnq3MCgj~~wsvMKW|q-(HQ1wjY&4eK6eA>Km9CgxaWEewV+kB?|81) z$@AaXIh9s5AcSpzL$iiU;A4Aecg4}@$`5q9>fUnh>Xy{+Sba{I*z?s z5f)TfaZAzORu&%G4K}GUuA`TZ^QZ}r*)^Hj(%VZaja$b|M&&as^vD<@hXn=XWaFdL zHlp{9&O}DNMyg=6$d&_YW^X)nYkvOv)*9|Q{bgAjF`miZ$!|wfj_-sL10pV0DBdH~ zNsCwvz}Sek2(E=d>j4DRQ;Mz48W@s512&QdZmPhB(%B;klLSV`)>(i}qH9>djjqq= zu_cK#G7%a@f$eBVjrlL96jU9{hkz@i1wciXhu%;fLgdKVi&)H)k zwr~k}bP=j*jJC~uqEnm9!KPz68zTW736liN!i$ainU=Z*o8s7#7WPFmU4tr+7YgImQ=uw1lI9)4;_Tjhzq`-enXJ>0pWNTsSJh#`I1qDrnw|ZhFEUXn zrtb|5wjwsylcw~dYL*C0Ol4$^i*X>PRVUdtVS@n-38#robF!N&};4eA3Le4Fo+iPr7))&tLJ!v-5D4sB=3XMcq*+zQ=+};aPfU>o2v|7 zOq=_0XH|m_*hi1Y0;?;NS<}#<@t(a0c$)l9WiZ%EgTG76T)JVe8LB3U07?6%rzfz! zwu0H|$>c9L1;DUS1#z-}BW+_%9kK?B05?_ZiU6TLPX>5<+yMKVu9tgL1AAyQ$nUIo z3J%I4a{u{0Kc z6`E!&4TS}J_wLDAmGPxzcposIG;kH|U>#GF4Nsj292N}NY?8h(AmLuSq2Ys~Q}%W1 zia58J3FZR@nG$#bpCw$GWn+l zA%|k7kp@hfrm2NqS!as@BM%u_A>ViE!rf3*$M@-v3oPMoZHLB%3EQ3P2J+qP$!Lix zye$SF1ozigFD3>|CWaWQ9Iyt;Vw?>zcI@8_ol*ywOj^6ep~Ke33Z@dWZK42}hK1ha zrqZ!q7zlhP&1MZt|0SXIf{vcE4;(0GXz}Ji%$@qhGJ&apny7-Y1(^m`yb%35jBb*k zqm!7O+J!?d?z`*$I|_gGSl?82EL&r(ouk@yB{YFmesyyh&7f2@pGT|aagdmoOk{r| zk!&WpY+!X|S$!UvQPRMH#(kTjadA@wAS@M4O&Yj#{v3YqH+~n7eZph#;-@@632ak@ z9z=rz3vf$A2NE9Lqo3n7(L(y}@n1bQZ+(GFtQq|gOeT3!4Lw4|z%1NQVzvq;hQdgt zm1EZ)xGB@H_MN}GqK&43-gj+hPK!`?J~xhLY3(d7oxCTR(5BdagUVTWBA}^WABX0z zQ7}Rhr;nIW(L!jZMNOt+M=`<DWJh;cIx&%YPHEeqq4R{NQf<@h>03C;slE_{pF9Bdjc65;V)^ zS9~Jfi|*U!Y|W5OFPZQLTe$-XS{?BD9zS2hmyrF3x+Dn&G89pPb~9RHMp1%yi#v!P$hI~pEPdR1~(Ht)W#L z8|vR8$cAG*@^O5$jX>84)=0}8bb{F788VNM(d_)}Vx}4lx6)_RfhA3jr|*6dM)858WjsyoiwjK`#FSZS zdOgANV1YTYk2Fug3TXy2cOWK@?@GeZ5r#IZfcqlYbj|MhfTutCAm(PLaq850+<9Uh z_`J-WIkbNk&v?QoLbzyxH0y_J=XCFIWUX@T)`V*HJ*8V`jgsC?z2l=4!cWet=d zoy}#`W5Iw6)GrP6cPqg;C#xl3|L7<0#UH=>i}={5PT}IkOG%)>^+%;1uX}%j-zR{l zJ?RL(>pLEa7k>LAarn@*`nyJg_9#d*Xskz>m!32KmKSZ*l=6lJB+T9r0|G`ik=}(? zCdfujsMkCjBFgM@NYxPNj0@h^Hdc#JHU2Z&N`PI>>1x+_n$bYs)3KS6CA`W6n&FjL z(u(gQq496_OKlDtVw8AJeA5K8FNqhFxM41FOH$AV{m4pD-hLYI@bO7T5c@x}DfqWKo z93RM=;}sUPszsLS8cKY}$A)TJ1@+m;1LZ?WxDzQ1X$PCQ=fpX@{+B+43EYd{e*^HW zCt=4z8c8%p_h0|;4*bY#?!b#*a0_1Z%0~-Aj$%ZmZQ}P3#0v_@5VKF&8>$>&AA?EMV940#Jx^?ND6pGpkdTF2kseiwe=$Nm)G z_pE#I!8c!Cc;m`Xz6^ZrXFv5t{F|ToC{`}5F)GaobM}knw+vYcB4%G5q#bNcG{qMT z3i;XDmDMU8x>fUsh>SYDHq3PpD0PKzy8fH7ch`QWsj7uBhcj_R%esG$`|Xd7yPk@m zSMeq?*+|CoI4G`!roIs3BZWCz9AXfNdDs8_9RBrB{2#pI*EU!P52cW){oro_k3D`8 zKm3}%#`4lScbHy|^V)1JdZAd2Y(b(55+#*qsWkIbBRq2`6)wMA^DDBpbqh`6ecW~5 zg6j@EvO2!ai2QbbZhZV#r_x3>lQ6iTO-OGIG6WPF9STZ8Jpaw}9jsTA;}K2RTwll6 z?>moQdgBL~>5sp;zWtr|0w4ZliWUdZEJa-htNt}9vGIa$t*?F4PXVv}wTt+VZ~6!P zr=Nc^>l9^c8VzdHi1Mx(Q3VHgl(IKuK{(yZb?zZJo@Bmg+?GKo3YQyCn|>eNdo8vr z*B`t&nbbvm`NZc^dTn*PK;8oJu1PE?X*(f~qiGa|auD1^o%O6j3{gkahh@Z_&FVl0 zZ$*gT`>J=~buZr-5#BHUmV8V|x89JF!1clyzFlL{@WMv z!{7fXh(4(ZDXqrIY5BX2V)6wQsvV3{PjVGQn@@vMC(E=b2XiMc!bLttQzsT?_h6?& zDYjiVEa0i_s#oI80t-tva}-hY%rgqQtneT@C$lj~#8PU!SQ zpDe$h_Bh~g-%`_1sBzoNC-8wkdmiTIXOn;?l1OMoVuC-zR=(Si{^oP(@7QO$HYFY8 zw_M|S==o4e2?r#-Sh6sWI(Az%^XzhEhdD8$W#>S?(2Rl@P|isJ5O+7p_BYzs5oDB| z=XGjmK^jTE=bjT6@Fyw8`^cL|>+{xkj~@H3*QH)OD+B0c*691va!vDhp8>vfS7O%n zt4QjDHTP;Ybd_%&GvszCG*shg3uokzWpy-MQBN;c zNjA^x_j)+EI3^C-p=`UjWvAjbbF9zn(y&u7Q)9_r^?7VcA>o6K>(PM}CnALp6r?}* zNlRnnyOlNIhh6}@@ELeONp45$Tin<5aO_RSx} z11(M4#*BdKPaPI?KXQC~8Y`A@Kz91txM<;m1i-A7DqN$zl;X3`ees@=Snm(sn}Ex2 z;~|w3XMlh4`cW6~l4k=S_{a&aPh%Pv%yoz$7>EVYNI4Frm$pTeyk}5I%p%V&sHv8y z5p6GxgZg=&S6UvP#Vxk8f@Nb0sD<=QnKBrZ0nnM&pZ(HlJpNJmCn?*lxB0fzSw8-$ zGcJ2V@trPJGlR(euLw1&c5>%!%gW%`#sS3^gI9fA^fcgzJysVJ-B$drz#2wwZf?)(I|l(-D@EO#x?{ z5FBlQTl=o=LX)kgp;Sn4*B^W&9!zPr(=vZ-oc5J6E)Cc5mHL<*#O7XDG}$gGp-IHu zC&q)9mwzYlQ$K`8y}wG&mZeeF-!{_$43){i>G2~A_{`s9$3jCzcb&jhD|Ekw`3YSyB&Hp? zQ^{yUc|$;`+GZV)Ti{%h9W()#AtB&~L$@G2z|diN{Sq#$oaN8MvP*?sQ+%BL4tf2! zidM~#g!tDTU&K4#jUCGy-YluK2U5&;jVqtN19eTMjZqcPiu~|JN@7pZFZ`?|yv;x@2~L=jVY>rThK#n}Bwk_WeUT zfAq*K*MWs(g3LBl>T7~1=Ni}&H3`;*N9GR7xMkr(_Lqt~Sny;MvJpTF%@5iU_`Y7(Zcp{B9te5lpG5=}Gw!<$;?|=TR8}Qb5-Mj6;?Qg#$#ZY@ib9O4f_b%Yt z!^j#vJ2Of{zVyo{X7TOcb`%5FvZi!0r)gdrbLWg=Im};Xg@dz3f%6y4uR*(o(@99Q zaAnu@B0hi5-{Z`sQ~627OV&?stDW@S)cSFw30`jFXv)yjWoUFBr3enO^diH(tvg0$+FlmGjP|5A<}9g~eZmC|OX&jbJVKg;iD zJW)Q~Lca8ypLjrp*2@Bn_BYQ;lMl^EJS@>?cGxi&wtv zwlwI9kwVGmSA2JU><@l91>*0mKhJqeP4khIhFj=_U8H^g?-R3l%`0zBX3`1IYhoy- zGz7C6jUwpMQ7uG3rz88F>X`)@gZ>VcK%>qRm08>7BTFZiHphzj-kq=p1=sOAuFStMOa$tbOL4=) zvP*?jP8u)k;u_86_n8$UtX5Y75ip*R`I&5T``EQ>4uAYVUxM%dvA5&4N7bY9um4xT zBa&%7djYs6`M4)N8YAV6X^il>Pm$4!r{6Yu{~-=(j40!3n*%DH*>^hiZn1x zFe4)-*^JR|qW{k4+=AbI(@XJfubRStdmA27A)iN6E&lPuktDolCM}=Qg=#$&9(A0) z{EiO9s0nQqxWN3Rdk=0*rc2{}XjM^z+`%!Wl_1`FKQkk$CZMOnOrJQ(b5frAq-*j1xBUR#_(zL)!ppE@ zj5w}Ps_Yk2_U4(dp1{+daT|X9SH3j~Z&plp?5qD(!KFG3qnXaW)SEXw5FcshxSnWg z3u&*Xvz_^K$kpVS&WvQEtDD*mt&QAx>l<7gNM%P8T7#8Q8Urz1n(jU5+;C`H{p)7o zI>QS(#V{WuGs=ra`f4sFvU3lR%?6Gg*^ArX`zrjwpM45H{DzO?#v_+FkiYFwqf-t| zXcYhb#fKywyyfOYc*}1*F#(o&?MOZKxg>~*EX-n3Z8HQjnF6pFbhS-xleni!jKY^n z>wo>v>vuMr1v$kr$9*7Q;BS`(cD(`_5lE|*A;w9clxYdN z?FVTc9Zec2$0IK|k#YRU4F0|sJ~qXPx8nUD`U>9j;XCmQze9^#E^yk6MjJ?Q7nXr@ zOH+8v&HM4pr(Tawf8fbzCf0E&C4`6BkC{afVGZpV`kn7aX#^dUCg!As0~q4(TJ>wi zvSr}n-bh9~vxO^7Gn&rKU?$d~i1GSi*`>mQcB5`B_DhfN>)aT+Zb(96AeR`{OepP^ z>3G#+nQ?*k(;nb?&$UM0{M9*39Gbu%{@S&8#I<{|wbk-V zl}W3X)?*fe_+EOR0F_}Ew5Y&j*|nNfuZ?UzLzbU=*+E8>*-9C=Oqj|eS*q5e47!=W zw8>K;o7eoFDb>!0WpPW#F!Oy|4k?Hsvb{$yNGLIEqiSFuG6{b|XRX;j*18}w$j%YG znGb|7n3hmtl(xJr?Fx3O$ZQ|0fmcEk+#8;4PD$Xc zJ=jFXey%hdv=Fq{Pl!38mAXxUt!ttQz;txTS|bZfhEb*_wlN8acAsFwV$Ymnfr;Om z=KBnFLav!bNgy@F05dq0HS&O4@x77pDj5V~w2U&SmBlBUT5ih0#)xu(yik&cr; z9CGhe$j8Bp!yXf*mvn-eG0! z3;DGKmP!kqFe_Ub5eIC#VRYA7KDlIWoORTjL=8vs%kRexVT6`)kStEhdGg?UsL>(Fu?JU`r zHs?P}LcLY1U~^=wpPHt4#oXe>+BX?OH@8&|rxP0Nmvr9#=-X?w0 zF7mHlrTBm^MMS|AOn*kovcY2S+)-7Ia<^ftuVZF zj)!G&3s-W`)`CWvVn~Q|w%Mx!C&A8UU?Hfo<;`DbW@xL)Wf`Sl;Y=wCmHk}=oNQDm zw2jmeM2pZ&)4n0RJWPO%`qt>j{t6Nm^Vwv;BK|ApX4q@hxvkm9X*bo)3$no40%%x{ z?rooqqpgJ$Srem8gNvy6PQM?P#Vut_(6lYOeKWxtHa~GF(=*s%zec@(fIYi+VSQtj zcY`lxv0-Tzf$6&C*LPBG^MCbw;+Af&`^C>mIIzFcYBvUzLb16%AhaAYu_RFm|quC!y zLfshZUkDi$u*B?>;PAhW+j*XakZF8A6k*g#jr=X_RWlr`&LcojLCp5bx3hMJP}6J| zVvN4yHdg0pVdu>3bV{SiUMovWOL>|B%{@WVs*9H{px+nmp;bde9%9sOmo1(n6dG#{ zBzkGJ#(z=v{2WFzvpt#1!ZBY^TqsySr|ulHTid$O7WpZxkFm>O^@Y)psG3eYpN|ON zD3unRHj9~U%litQL}WR>9Jwm5V5NP?WWVcjj2b#@W!>M!OG~JraOYWMCMTyRFxj8x z-RhT@mop9hK6mbdzJqo`GzJn+4TiE=s~nlo^HUON!%WgNqtzj89u#IE`L6F-YY<*ytUJ7YH)rJ&cc}mpzo`)OU3=C z&th|{Xd%5Wz}~RQ*K-)9%!w@mwpIC3$!$yvPsJxqWg$*$*1u)VV{M~d4#Q++LOBHC zLE$OZh(VMvMKU@l+5}{vVMSt41w?t;L-FIjlN+sR4>XA%Jva%SQJli)BG3-+TlfA# zFJ$_@D!WwB@9VBRKJs2$E6eNWv3~z4yKC(;ff1jW(@-7S{DMaa@Zo@(vm(SSiR~oE zY0Z)_Vi>pBOp}i+L4N}uU)8AEbsoo`>q9M8ism z6^fQs=9$V>S==%?If2U+>qV_|?%5n{Lo28&@{2)MS6BJXF7yUZt0QfuP8+G)3q@q- zTpRH&*%7F3%lFUO9UZ2D*Fd-BzlH?G|CQ`f;dBY5%&b9abF$j#Gw5;0fHI-UWT3Po zb}E*cZnk;CRax9ZtXf-J-&O;6P4B_2$Lk$-THSY(vnlB|;1d zcrJG&5-16mXz8sl`BgoxhLu0DXSeN0_9VJCHlc$OQ97Nc4f&YaEL7+-BTjXM`Ci-N zivUZiN-9kTg-iC!E1F#UPqw(FTfBfSSG)SS6A0CPLs$y z0iASM>M zYcd0xd|fQBX1CNGV$7Yi|IsgeI0uJ}qIlA6AJ2HgbE-{es1YQ*llPtHEit-`nP0?J zDfaSXGKW4Eq=wSVvAhPD&!Z2WtAc4)OrS$GrMsqgV{U3URyHmut}x-W_24Rs(9C2R zYK;zQ7F{hkq6k5+Z$hT!*Xz+++2~l1R}A!fWdxA()|~|hEwU| znQ7^%>i+DnWA1u4ANdx{&CR6|j4doIEU_zJLaGCGq;4l!Utf0(F6Rgt zlNK%~E%g4%P$fJMGSiv@OyGQy`Cz4Om6i^)BU&t-VR3#zUip*iKbI_yneV(_Ud?Vm zJ&Iwa)zOW92^zhCT7EyBfz&$gyD}}Ja%lGrxUhOZ);3oh)DBgq!QOge@3*9p_nFCE ze12oS#l?#k^Zg{tBN-m^Q}(iC5*`UlE9@Ft-t$i9r>3T}V2)s^VG@3CS-lnN`D$4GF=`^p&ajgx^ zI*rM$Lunhecs!NRt`DIyn=DiJ))(8+sgjYNYs&l$6%NDoW*b2T3|!LsO3LEw0n8-F&>4>b2>fm18Zp$Cw?rZ=;!+E^*$*)*$;xdL#By610E*;p7YV z?K+kjV?2Pc@_dT_wZ(7*T1%VwuT)fDoDRB;OE$rt+H01ZHN51VREMT8jDTIGr~HY~N&Fj~*(^cJDcPhJX8DpI#1f zaQ{A@1!v`kgOA6TPJA3&!?n!t%-E=mi^y-G$*l+|t87DUGR?BVXJ<4xZ-J5IfZVUp z`c#@(SP^u{h_O^2VD z>M;Y4K!r`kFBvmEq|fz3X;;%R!36{cHMtI*)AissWg`Y1-F;K8MCny6!|Ce}+?MmDWa7+Ml*ZRgwPWqb z``)D-J+hA<^j9DIY>gmQ*jvdro=;hxp1YKu|L9{+$NpW{@ZTX628N;n<$_?LQO6fI zqbAg}6V7d@EZ`FmLCxXVv>>`ZIhjy0kG-a;f>=YFoHO)=2UEA-<>+!{_uL_zS-ux5 zX?)Ne^VH-luHXN-96AgJn~AZPs_TsDW=c7LP3F|hD4|g^rVX0$@6^z6CwDLJvo{?b6nvAs9r7;eVKU@fJ+Hh>YYRTmmn8MK3>*;{#p zh2A!1rjw2h+kwyxC05-`_qKHu5`GvUDn8SEv1N#?=4Neqjr@J5PbPnGSdeF1hYC~u zj=u{we#XuK52hU7dkemD>UK;|?85%}W0;@W&)P|awBh{HvQ{$k*dO^j5)7r*=tE$H zep}c;zS7XC*TyG2_D1~W2R_CEe9Irc2S5Ge|1z6Z0yP$LaEfqqE8Y82ipysCdD70v z?H}R6RV;&clj}^csO4A8@$W$r?s`JcD;UsroX&X0wASl&` z7A6pC^z6(Op8u>THfN7$Sj*UO`7v>lYWjZJOP-C#-Fj1XKTE+;2y*7k8TOC#vGZN~Kc^j`7mm%f1?g4)V6noB0G-&{f0 zcmRbeO^s+N^_5KIg$ozi7nMde+24@~?J}yHndxd$m+qS$eFN^g=f31umy$W%#O<)n!zWXW|*wW7KaHmx*UU{_w}%%Wn#zoAl^CK#lCUKq8-;P6^jQ z`EDHxj`aw2<4i}+lw`!^cD~R>1;bS7jby6$b*R8dNI=24jk+5nY*?vF>wk9L zXvz0dN22!oc|YUYYrnZ;-G2M+aXW&Ye(!Yi2U}?Fix&#{rJSIC5T#qMb4d%|_n}YV zYj@v=bLTHrbi_Ct(XhgR29k@Mnw&_VJ`0@6p2b~BxKk`#O5M@7ouhC2yK8!P5{y|P zvIJBQ(n9)eoqF88vH&kvx~9ResJR?%H;~@0bkQL()Q?8^;$uTUK6trjP@&Y@o!>Zx zQ}>_4=kNG>8kf6(yS{M}z4W}H3XtwIFDiQyVcO-icROcK74FV+p~^oH4Zo6S zk*W5h`J`#oQE1Bjop;^MG@F|P%+Bq?eP_;doz9#+hx6wz;%w4lnz?W;AzSjP6sBB_ za_sOv6><`8((ZkG7WnVk)B$!c&hrbNySygh=50oNgS!p)LiOcJgg5Sf+W`YlXWvvw z>wR6n*F}f^dE@GA$9S~g`Ab8(hYsxJH-_3dN`BvR<57v#+O{&UzO1JN`PpQW*ONe3 zRj34-R@3*n3(NeQ&Yfc*HD2KNo;r)23JI5lOxn744{7iM|Nj4HD#!uSgQp(=0000< KMNUMnLSTXuSe1zY literal 0 HcmV?d00001 diff --git a/lib/ui/esrimap/temp_assets/tgpt-dark.svg b/lib/ui/esrimap/temp_assets/tgpt-dark.svg new file mode 100644 index 000000000..59a576767 --- /dev/null +++ b/lib/ui/esrimap/temp_assets/tgpt-dark.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/lib/ui/esrimap/temp_assets/tgpt-light.svg b/lib/ui/esrimap/temp_assets/tgpt-light.svg new file mode 100644 index 000000000..10d9304a8 --- /dev/null +++ b/lib/ui/esrimap/temp_assets/tgpt-light.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/lib/ui/navigator/bottom.dart b/lib/ui/navigator/bottom.dart index 01e6c4427..5c974f0ad 100644 --- a/lib/ui/navigator/bottom.dart +++ b/lib/ui/navigator/bottom.dart @@ -4,7 +4,8 @@ import 'package:campus_mobile_experimental/core/providers/bottom_nav.dart'; import 'package:campus_mobile_experimental/core/wrappers/push_notifications.dart'; import 'package:campus_mobile_experimental/ui/ai_assistant/ai_assistant.dart'; import 'package:campus_mobile_experimental/ui/home/home.dart'; -import 'package:campus_mobile_experimental/ui/map/map.dart' as prefix0; +// import 'package:campus_mobile_experimental/ui/map/map.dart' as prefix0; +import 'package:campus_mobile_experimental/ui/esrimap/esrimap.dart'; import 'package:campus_mobile_experimental/ui/navigator/top.dart'; import 'package:campus_mobile_experimental/ui/notifications/notifications_list_view.dart'; import 'package:campus_mobile_experimental/ui/profile/profile.dart'; @@ -31,7 +32,7 @@ class BottomTabBar extends StatefulWidget { class _BottomTabBarState extends State { var currentTab = [ Home(), - prefix0.Maps(), + EsriMap(), AIAssistantTab(), NotificationsListView(), Profile(), @@ -47,14 +48,15 @@ class _BottomTabBarState extends State { drawerScrimColor: Colors.transparent, backgroundColor: provider.currentIndex == 0 ? lightPrimaryColor : theme.scaffoldBackgroundColor, appBar: isAssistantTab - ? null - : PreferredSize(preferredSize: Size.fromHeight(57), child: Provider.of(context).appBar), + ? null + : PreferredSize(preferredSize: Size.fromHeight(50), child: Provider.of(context).appBar), body: PushNotificationWrapper( child: IndexedStack( index: provider.currentIndex, children: currentTab, ), ), + bottomNavigationBar: Container( decoration: BoxDecoration( color: theme.bottomNavigationBarTheme.backgroundColor, From fcdc7413ea360d26081acaa41473bd29e474e253 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 12:01:10 -0700 Subject: [PATCH 006/139] fixed and cleaned up alessio's work --- lib/ui/esrimap/esrimap.dart | 1686 +++++++++------------- lib/ui/esrimap/esrimap_ai_search.dart | 22 +- lib/ui/esrimap/esrimap_basemaps.dart | 3 +- lib/ui/esrimap/esrimap_config.dart | 6 +- lib/ui/esrimap/esrimap_fab.dart | 20 +- lib/ui/esrimap/esrimap_layers_panel.dart | 3 +- 6 files changed, 724 insertions(+), 1016 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index e3e287e46..f3d74abd5 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -6,7 +6,6 @@ import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; import 'package:shared_preferences/shared_preferences.dart'; import 'package:url_launcher/url_launcher.dart'; - import 'esrimap_basemaps.dart'; import 'esrimap_fab.dart'; import 'esrimap_layers_panel.dart'; @@ -42,15 +41,15 @@ class MapSearchResult { /// Serialize to JSON for SharedPreferences storage. Map toJson() => { - 'name': name, - 'subtitle': subtitle, - 'latitude': latitude, - 'longitude': longitude, - 'source': source.index, - 'address': address, - 'description': description, - 'websiteUrl': websiteUrl, - }; + 'name': name, + 'subtitle': subtitle, + 'latitude': latitude, + 'longitude': longitude, + 'source': source.index, + 'address': address, + 'description': description, + 'websiteUrl': websiteUrl, + }; /// Deserialize from JSON. factory MapSearchResult.fromJson(Map json) { @@ -89,17 +88,24 @@ class _SearchCategory { IconData _iconDataForName(String name) { switch (name) { - case 'restaurant': return Icons.restaurant; - case 'menu_book': return Icons.menu_book; - case 'local_parking': return Icons.local_parking; - case 'fitness_center': return Icons.fitness_center; - case 'directions_bus': return Icons.directions_bus; - default: return Icons.place; + case 'restaurant': + return Icons.restaurant; + case 'menu_book': + return Icons.menu_book; + case 'local_parking': + return Icons.local_parking; + case 'fitness_center': + return Icons.fitness_center; + case 'directions_bus': + return Icons.directions_bus; + default: + return Icons.place; } } Color _colorFromHex(String? hex) { - if (hex == null || hex.isEmpty) return const Color(0xFFF5F0E6); + final isHexEmpty = hex == null || hex.isEmpty; + if (isHexEmpty) return const Color(0xFFF5F0E6); final stripped = hex.replaceFirst('#', ''); final value = int.tryParse(stripped, radix: 16); if (value == null) return const Color(0xFFF5F0E6); @@ -115,11 +121,7 @@ class _SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { final double height; final Color backgroundColor; - _SlideOverHeaderDelegate({ - required this.child, - required this.height, - required this.backgroundColor, - }); + _SlideOverHeaderDelegate({required this.child, required this.height, required this.backgroundColor}); @override double get minExtent => height; @@ -127,15 +129,12 @@ class _SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { double get maxExtent => height; @override - Widget build( - BuildContext context, double shrinkOffset, bool overlapsContent) { + Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) { return Container( height: height, decoration: BoxDecoration( color: backgroundColor, - borderRadius: shrinkOffset == 0 - ? const BorderRadius.vertical(top: Radius.circular(16)) - : null, + borderRadius: shrinkOffset == 0 ? const BorderRadius.vertical(top: Radius.circular(16)) : null, ), child: child, ); @@ -143,9 +142,7 @@ class _SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { @override bool shouldRebuild(covariant _SlideOverHeaderDelegate oldDelegate) { - return child != oldDelegate.child || - height != oldDelegate.height || - backgroundColor != oldDelegate.backgroundColor; + return child != oldDelegate.child || height != oldDelegate.height || backgroundColor != oldDelegate.backgroundColor; } } @@ -172,19 +169,19 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final _detailSheetController = DraggableScrollableController(); // Service base URL - static const _baseUrl = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; + static const _BASE_URL = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; // Config -- loaded on init, gates map setup EsriMapConfig? _config; // SharedPreferences key for recent searches - static const _recentSearchesKey = 'esri_map_recent_searches'; - static const _maxRecentSearches = 5; + static const _RECENT_SEARCHES_KEY = 'esri_map_recent_searches'; + static const _MAX_RECENT_SEARCHES = 5; // Search state List _searchResults = []; - List _allPoiClasses = []; // all distinct Class values from the server - List _matchingPoiClasses = []; // live-filtered subset while typing + List _allPoiClasses = []; // all distinct Class values from the server + List _matchingPoiClasses = []; // live-filtered subset while typing bool _showResults = false; bool _isSearching = false; bool _showSuggestions = false; @@ -255,12 +252,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { List<_SearchCategory> get _categories { if (_config == null) return []; return _config!.searchCategories - .map((c) => _SearchCategory( - label: c.label, - icon: _iconDataForName(c.icon), - poiClassValue: c.poiClass, - color: _colorFromHex(c.color), - )) + .map( + (c) => _SearchCategory( + label: c.label, + icon: _iconDataForName(c.icon), + poiClassValue: c.poiClass, + color: _colorFromHex(c.color), + ), + ) .toList(); } @@ -315,11 +314,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _setupAgeAuthChallengeHandler() { - ArcGISEnvironment - .authenticationManager - .arcGISAuthenticationChallengeHandler = _AgeAuthChallengeHandler( - EsriMapConfigService.instance.tokensUrl, - ); + ArcGISEnvironment.authenticationManager.arcGISAuthenticationChallengeHandler = _AgeAuthChallengeHandler( + EsriMapConfigService.instance.tokensUrl, + ); } void _initMap(EsriMapConfig config) { @@ -329,11 +326,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _map = ArcGISMap.withBasemap(_basemaps[_currentBasemapType]!); _map.initialViewpoint = Viewpoint.fromCenter( - ArcGISPoint( - x: -117.2340, - y: 32.8801, - spatialReference: SpatialReference.wgs84, - ), + ArcGISPoint(x: -117.2340, y: 32.8801, spatialReference: SpatialReference.wgs84), scale: 24000, ); _mapReadyCompleter.complete(); @@ -353,21 +346,18 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Wire up location display — blue dot, no auto-pan on start _mapViewController.locationDisplay.dataSource = _locationDataSource; - _mapViewController.locationDisplay.autoPanMode = - LocationDisplayAutoPanMode.off; + _mapViewController.locationDisplay.autoPanMode = LocationDisplayAutoPanMode.off; _startLocationDisplay(); _preloadAlternateBasemaps(); - _viewpointChangedSubscription = - _mapViewController.onViewpointChanged.listen((_) { - final vp = _mapViewController.getCurrentViewpoint( - ViewpointType.centerAndScale, - ); + _viewpointChangedSubscription = _mapViewController.onViewpointChanged.listen((_) { + final vp = _mapViewController.getCurrentViewpoint(ViewpointType.centerAndScale); if (vp != null && mounted) { setState(() { _mapRotation = vp.rotation; - if (!_ignoreViewpointReset && (_isLocationActive || _isRecenterActive)) { + final shouldResetVP = !_ignoreViewpointReset && (_isLocationActive || _isRecenterActive); + if (shouldResetVP) { _isLocationActive = false; _isRecenterActive = false; } @@ -417,11 +407,11 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (key != 'default') _showLayersPanel = false; if (_config == null) return; final scene = _config!.scenes[key]; - if (scene == null || scene.type != 'scene') return; - final portalUrl = scene.portalKey != null - ? _config!.portals[scene.portalKey!] - : null; - if (portalUrl == null || scene.itemId == null) return; + final isInvalidScene = scene == null || scene.type != 'scene'; + if (isInvalidScene) return; + final portalUrl = scene.portalKey != null ? _config!.portals[scene.portalKey!] : null; + final isMissingPortalItem = portalUrl == null || scene.itemId == null; + if (isMissingPortalItem) return; if (key == 'building3d' && _scene3DWidget == null) { _scene3DWidget = EsriSceneWidget( key: _scene3DKey, @@ -429,7 +419,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { itemId: scene.itemId!, onHeadingChanged: (h) => setState(() { _mapRotation = h; - if (!_ignoreViewpointReset && (_isLocationActive || _isRecenterActive)) { + final shouldResetVP3D = !_ignoreViewpointReset && (_isLocationActive || _isRecenterActive); + if (shouldResetVP3D) { _isLocationActive = false; _isRecenterActive = false; } @@ -442,7 +433,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { itemId: scene.itemId!, onHeadingChanged: (h) => setState(() { _mapRotation = h; - if (!_ignoreViewpointReset && (_isLocationActive || _isRecenterActive)) { + final shouldResetVPDrone = !_ignoreViewpointReset && (_isLocationActive || _isRecenterActive); + if (shouldResetVPDrone) { _isLocationActive = false; _isRecenterActive = false; } @@ -452,7 +444,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); } -void _toggleLayer(String key) async { + void _toggleLayer(String key) async { final entry = _config?.layers[key]; if (entry == null) return; @@ -499,20 +491,20 @@ void _toggleLayer(String key) async { } Layer? _layerFromSublayer(SublayerEntry sub) { - if (sub.source == 'url' && sub.url != null) { + final isUrlSub = sub.source == 'url' && sub.url != null; + if (isUrlSub) { return sub.url!.contains('FeatureServer') - ? FeatureLayer.withFeatureTable( - ServiceFeatureTable.withUri(Uri.parse(sub.url!))) + ? FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse(sub.url!))) : ArcGISMapImageLayer.withUri(Uri.parse(sub.url!)); } return null; } Layer? _layerFromEntry(LayerEntry entry) { - if (entry.source == 'url' && entry.url != null) { + final isUrlEntry = entry.source == 'url' && entry.url != null; + if (isUrlEntry) { return entry.url!.contains('FeatureServer') - ? FeatureLayer.withFeatureTable( - ServiceFeatureTable.withUri(Uri.parse(entry.url!))) + ? FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse(entry.url!))) : ArcGISMapImageLayer.withUri(Uri.parse(entry.url!)); } return null; @@ -520,9 +512,9 @@ void _toggleLayer(String key) async { void _applyLayerSpecialCases(String key, List instances) { // campusDistricts: show only sublayer id 4 - if (key == 'campusDistricts' && - instances.isNotEmpty && - instances.first is ArcGISMapImageLayer) { + final isCampusDistricts = + key == 'campusDistricts' && instances.isNotEmpty && instances.first is ArcGISMapImageLayer; + if (isCampusDistricts) { final imageLayer = instances.first as ArcGISMapImageLayer; for (final sub in imageLayer.mapImageSublayers) { sub.isVisible = sub.id == 4; @@ -551,7 +543,8 @@ void _toggleLayer(String key) async { _layerTimers[key] = Timer.periodic(Duration(seconds: interval), (_) async { if (!mounted) return; final instances = _layerInstances[key]; - if (instances == null || idx >= instances.length) return; + final isInvalidIndex = instances == null || idx >= instances.length; + if (isInvalidIndex) return; final oldLayer = instances[idx]; if (oldLayer != null) _map.operationalLayers.remove(oldLayer); @@ -581,7 +574,8 @@ void _toggleLayer(String key) async { } void _onFocusChanged() { - if (_focusNode.hasFocus && _searchController.text.isEmpty) { + final isSearchFocusEmpty = _focusNode.hasFocus && _searchController.text.isEmpty; + if (isSearchFocusEmpty) { setState(() { _showSuggestions = true; _showResults = false; @@ -599,11 +593,7 @@ void _toggleLayer(String key) async { } }); if (_detailSheetController.isAttached) { - _detailSheetController.animateTo( - 0.15, - duration: const Duration(milliseconds: 250), - curve: Curves.easeOut, - ); + _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); } } } @@ -618,11 +608,7 @@ void _toggleLayer(String key) async { } }); if (_detailSheetController.isAttached) { - _detailSheetController.animateTo( - 0.15, - duration: const Duration(milliseconds: 250), - curve: Curves.easeOut, - ); + _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); } } } @@ -633,15 +619,12 @@ void _toggleLayer(String key) async { Future _loadRecentSearches() async { final prefs = await SharedPreferences.getInstance(); - final jsonStr = prefs.getString(_recentSearchesKey); + final jsonStr = prefs.getString(_RECENT_SEARCHES_KEY); if (jsonStr != null) { try { final list = jsonDecode(jsonStr) as List; setState(() { - _recentSearches = list - .map((e) => - MapSearchResult.fromJson(e as Map)) - .toList(); + _recentSearches = list.map((e) => MapSearchResult.fromJson(e as Map)).toList(); }); } catch (_) { // ignore corrupted data @@ -651,20 +634,18 @@ void _toggleLayer(String key) async { Future _saveRecentSearches() async { final prefs = await SharedPreferences.getInstance(); - final jsonStr = - jsonEncode(_recentSearches.map((r) => r.toJson()).toList()); - await prefs.setString(_recentSearchesKey, jsonStr); + final jsonStr = jsonEncode(_recentSearches.map((r) => r.toJson()).toList()); + await prefs.setString(_RECENT_SEARCHES_KEY, jsonStr); } void _addToRecentSearches(MapSearchResult result) { // Remove duplicate if exists (match by name + source) - _recentSearches.removeWhere( - (r) => r.name == result.name && r.source == result.source); + _recentSearches.removeWhere((r) => r.name == result.name && r.source == result.source); // Insert at front _recentSearches.insert(0, result); // Trim to max - if (_recentSearches.length > _maxRecentSearches) { - _recentSearches = _recentSearches.sublist(0, _maxRecentSearches); + if (_recentSearches.length > _MAX_RECENT_SEARCHES) { + _recentSearches = _recentSearches.sublist(0, _MAX_RECENT_SEARCHES); } _saveRecentSearches(); } @@ -682,7 +663,7 @@ void _toggleLayer(String key) async { /// GET from the REST API. Future> _apiGet(String path, [Map? params]) async { - final uri = Uri.parse('$_baseUrl/$path').replace(queryParameters: params); + final uri = Uri.parse('$_BASE_URL/$path').replace(queryParameters: params); final response = await http.get(uri); if (response.statusCode != 200) { throw Exception('API error ${response.statusCode}: ${response.body}'); @@ -692,7 +673,7 @@ void _toggleLayer(String key) async { Future> _apiPost(String path, Map body) async { final response = await http.post( - Uri.parse('$_baseUrl/$path'), + Uri.parse('$_BASE_URL/$path'), headers: {'Content-Type': 'application/json'}, body: jsonEncode(body), ); @@ -704,24 +685,25 @@ void _toggleLayer(String key) async { Future> _queryBuildings(String query) async { final data = await _apiGet('buildings', {'q': query}); - return (data['results'] as List? ?? []).map((r) { - return MapSearchResult( - name: r['name'] as String? ?? 'Unknown Building', - subtitle: r['subtitle'] as String? ?? 'Building', - latitude: (r['latitude'] as num?)?.toDouble() ?? 0.0, - longitude: (r['longitude'] as num?)?.toDouble() ?? 0.0, - source: MapSearchSource.building, - address: r['address'] as String? ?? '', - ); - }).where((r) => r.latitude != 0.0 && r.longitude != 0.0).toList(); + return (data['results'] as List? ?? []) + .map((r) { + return MapSearchResult( + name: r['name'] as String? ?? 'Unknown Building', + subtitle: r['subtitle'] as String? ?? 'Building', + latitude: (r['latitude'] as num?)?.toDouble() ?? 0.0, + longitude: (r['longitude'] as num?)?.toDouble() ?? 0.0, + source: MapSearchSource.building, + address: r['address'] as String? ?? '', + ); + }) + .where((r) => r.latitude != 0.0 && r.longitude != 0.0) + .toList(); } Future _fetchAllPoiClasses() async { try { final data = await _apiGet('poi/classes'); - final classes = (data['classes'] as List? ?? []) - .map((c) => c as String) - .toList(); + final classes = (data['classes'] as List? ?? []).map((c) => c as String).toList(); setState(() => _allPoiClasses = classes); } catch (e) { debugPrint('Failed to fetch POI classes: $e'); @@ -739,17 +721,20 @@ void _toggleLayer(String key) async { } List _parsePOIResults(Map data) { - return (data['results'] as List? ?? []).map((r) { - return MapSearchResult( - name: r['name'] as String? ?? 'Unknown POI', - subtitle: r['subtitle'] as String? ?? '', - latitude: (r['latitude'] as num?)?.toDouble() ?? 0.0, - longitude: (r['longitude'] as num?)?.toDouble() ?? 0.0, - source: MapSearchSource.poi, - description: r['description'] as String? ?? '', - websiteUrl: r['websiteUrl'] as String?, - ); - }).where((r) => r.latitude != 0.0 && r.longitude != 0.0).toList(); + return (data['results'] as List? ?? []) + .map((r) { + return MapSearchResult( + name: r['name'] as String? ?? 'Unknown POI', + subtitle: r['subtitle'] as String? ?? '', + latitude: (r['latitude'] as num?)?.toDouble() ?? 0.0, + longitude: (r['longitude'] as num?)?.toDouble() ?? 0.0, + source: MapSearchSource.poi, + description: r['description'] as String? ?? '', + websiteUrl: r['websiteUrl'] as String?, + ); + }) + .where((r) => r.latitude != 0.0 && r.longitude != 0.0) + .toList(); } // --------------------------------------------------------------------------- @@ -762,13 +747,11 @@ void _toggleLayer(String key) async { // Recompute category matches on submit final q = query.toLowerCase(); - final matched = _allPoiClasses - .where((c) => c.toLowerCase().contains(q)) - .toList(); + final matched = _allPoiClasses.where((c) => c.toLowerCase().contains(q)).toList(); for (final cat in _categories) { - if (cat.poiClassValue.toLowerCase().contains(q) && - !matched.contains(cat.poiClassValue)) { + final matchesCategory = cat.poiClassValue.toLowerCase().contains(q) && !matched.contains(cat.poiClassValue); + if (matchesCategory) { matched.insert(0, cat.poiClassValue); } } @@ -782,10 +765,7 @@ void _toggleLayer(String key) async { }); try { - final results = await Future.wait([ - _queryBuildings(query), - _queryPOIs(query), - ]); + final results = await Future.wait([_queryBuildings(query), _queryPOIs(query)]); final merged = [...results[0], ...results[1]]; setState(() { _searchResults = merged; @@ -802,16 +782,11 @@ void _toggleLayer(String key) async { /// Returns the current visible map extent projected to WGS84. Envelope? _getViewportEnvelopeWGS84() { - final vp = _mapViewController.getCurrentViewpoint( - ViewpointType.boundingGeometry, - ); + final vp = _mapViewController.getCurrentViewpoint(ViewpointType.boundingGeometry); if (vp == null) return null; final geom = vp.targetGeometry; if (geom == null) return null; - final projected = GeometryEngine.project( - geom, - outputSpatialReference: SpatialReference.wgs84, - ); + final projected = GeometryEngine.project(geom, outputSpatialReference: SpatialReference.wgs84); return projected as Envelope?; } @@ -821,24 +796,18 @@ void _toggleLayer(String key) async { final env = _getViewportEnvelopeWGS84(); if (env == null) return results; return results.where((r) { - return r.latitude >= env.yMin && - r.latitude <= env.yMax && - r.longitude >= env.xMin && - r.longitude <= env.xMax; + return r.latitude >= env.yMin && r.latitude <= env.yMax && r.longitude >= env.xMin && r.longitude <= env.xMax; }).toList(); } /// distance in meters between two WGS84 points - double _distanceMeters( - double lat1, double lng1, double lat2, double lng2) { + double _distanceMeters(double lat1, double lng1, double lat2, double lng2) { const r = 6371000.0; final dLat = (lat2 - lat1) * math.pi / 180; final dLng = (lng2 - lng1) * math.pi / 180; - final a = math.sin(dLat / 2) * math.sin(dLat / 2) + - math.cos(lat1 * math.pi / 180) * - math.cos(lat2 * math.pi / 180) * - math.sin(dLng / 2) * - math.sin(dLng / 2); + final a = + math.sin(dLat / 2) * math.sin(dLat / 2) + + math.cos(lat1 * math.pi / 180) * math.cos(lat2 * math.pi / 180) * math.sin(dLng / 2) * math.sin(dLng / 2); return r * 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a)); } @@ -846,10 +815,7 @@ void _toggleLayer(String key) async { (double lat, double lng)? _getUserLatLng() { final pos = _mapViewController.locationDisplay.location?.position; if (pos == null) return null; - final wgs = GeometryEngine.project( - pos, - outputSpatialReference: SpatialReference.wgs84, - ) as ArcGISPoint?; + final wgs = GeometryEngine.project(pos, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; if (wgs == null) return null; return (wgs.y, wgs.x); } @@ -860,18 +826,10 @@ void _toggleLayer(String key) async { _mappedResults = results; for (int i = 0; i < results.length; i++) { final result = results[i]; - final point = ArcGISPoint( - x: result.longitude, - y: result.latitude, - spatialReference: SpatialReference.wgs84, - ); + final point = ArcGISPoint(x: result.longitude, y: result.latitude, spatialReference: SpatialReference.wgs84); final graphic = Graphic( geometry: point, - symbol: SimpleMarkerSymbol( - style: SimpleMarkerSymbolStyle.circle, - color: Colors.red, - size: 14, - ), + symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.red, size: 14), ); // Store the list index so we can retrieve the result on tap graphic.attributes['resultIndex'] = i; @@ -887,11 +845,7 @@ void _toggleLayer(String key) async { final r = results.first; _mapViewController.setViewpointAnimated( Viewpoint.fromCenter( - ArcGISPoint( - x: r.longitude, - y: r.latitude, - spatialReference: SpatialReference.wgs84, - ), + ArcGISPoint(x: r.longitude, y: r.latitude, spatialReference: SpatialReference.wgs84), scale: 5000, ), ); @@ -911,9 +865,7 @@ void _toggleLayer(String key) async { yMax: maxLat + padding, spatialReference: SpatialReference.wgs84, ); - _mapViewController.setViewpointAnimated( - Viewpoint.fromTargetExtent(envelope), - ); + _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(envelope)); } /// Category search: query POIs filtered by Class. @@ -1014,27 +966,19 @@ void _toggleLayer(String key) async { _graphicsOverlay.graphics.clear(); - final point = ArcGISPoint( - x: result.longitude, - y: result.latitude, - spatialReference: SpatialReference.wgs84, - ); + final point = ArcGISPoint(x: result.longitude, y: result.latitude, spatialReference: SpatialReference.wgs84); final graphic = Graphic( geometry: point, symbol: SimpleMarkerSymbol( style: SimpleMarkerSymbolStyle.circle, - color: result.source == MapSearchSource.building - ? Colors.blue - : Colors.red, + color: result.source == MapSearchSource.building ? Colors.blue : Colors.red, size: 14, ), ); _graphicsOverlay.graphics.add(graphic); - _mapViewController.setViewpointAnimated( - Viewpoint.fromCenter(point, scale: 5000), - ); + _mapViewController.setViewpointAnimated(Viewpoint.fromCenter(point, scale: 5000)); setState(() { _showResults = false; @@ -1079,7 +1023,8 @@ void _toggleLayer(String key) async { if (identifyResult.graphics.isNotEmpty) { final tappedGraphic = identifyResult.graphics.first; final index = tappedGraphic.attributes['resultIndex'] as int?; - if (index != null && index >= 0 && index < _mappedResults.length) { + final isValidResultIndex = index != null && index >= 0 && index < _mappedResults.length; + if (isValidResultIndex) { _selectResultFromPin(_mappedResults[index]); } } else { @@ -1133,15 +1078,9 @@ void _toggleLayer(String key) async { return; } - final point = ArcGISPoint( - x: result.longitude, - y: result.latitude, - spatialReference: SpatialReference.wgs84, - ); + final point = ArcGISPoint(x: result.longitude, y: result.latitude, spatialReference: SpatialReference.wgs84); - _mapViewController.setViewpointAnimated( - Viewpoint.fromCenter(point, scale: 5000), - ); + _mapViewController.setViewpointAnimated(Viewpoint.fromCenter(point, scale: 5000)); setState(() { _selectedResult = result; @@ -1157,8 +1096,8 @@ void _toggleLayer(String key) async { void _closeDetail() { // If a category search is active and not in routing mode, reopen the list view - if (_allCategoryResults.isNotEmpty && - !_showRouteFields && !_hasRoute && !_routeFailed) { + final canShowCategoryResults = _allCategoryResults.isNotEmpty && !_showRouteFields && !_hasRoute && !_routeFailed; + if (canShowCategoryResults) { setState(() { _selectedResult = null; _showCategoryList = true; @@ -1177,15 +1116,13 @@ void _toggleLayer(String key) async { if (loc == null) return; // Briefly snap to recenter mode, then release back to free pan - _mapViewController.locationDisplay.autoPanMode = - LocationDisplayAutoPanMode.recenter; + _mapViewController.locationDisplay.autoPanMode = LocationDisplayAutoPanMode.recenter; _ignoreViewpointReset = true; setState(() => _isLocationActive = true); Future.delayed(const Duration(milliseconds: 1500), () { if (mounted) { _ignoreViewpointReset = false; - _mapViewController.locationDisplay.autoPanMode = - LocationDisplayAutoPanMode.off; + _mapViewController.locationDisplay.autoPanMode = LocationDisplayAutoPanMode.off; } }); } @@ -1204,6 +1141,7 @@ void _toggleLayer(String key) async { } return; } + final hasLastResultNoMapped = _lastSelectedResult != null && _mappedResults.isEmpty; if (_selectedResult != null) { _mapViewController.setViewpointAnimated( Viewpoint.fromCenter( @@ -1215,7 +1153,7 @@ void _toggleLayer(String key) async { scale: 5000, ), ); - } else if (_lastSelectedResult != null && _mappedResults.isEmpty) { + } else if (hasLastResultNoMapped) { // Single pin on map, slide-over closed _mapViewController.setViewpointAnimated( Viewpoint.fromCenter( @@ -1233,11 +1171,7 @@ void _toggleLayer(String key) async { } else { _mapViewController.setViewpointAnimated( Viewpoint.fromCenter( - ArcGISPoint( - x: -117.2340, - y: 32.8801, - spatialReference: SpatialReference.wgs84, - ), + ArcGISPoint(x: -117.2340, y: 32.8801, spatialReference: SpatialReference.wgs84), scale: 24000, ), ); @@ -1284,7 +1218,7 @@ void _toggleLayer(String key) async { // Routing // --------------------------------------------------------------------------- -/* Future _launchDirections(MapSearchResult result) async { + /* Future _launchDirections(MapSearchResult result) async { final uri = Uri.parse( 'https://www.google.com/maps/dir/?api=1' '&destination=${result.latitude},${result.longitude}', @@ -1294,7 +1228,7 @@ void _toggleLayer(String key) async { } } */ - static const _routeServiceUrl = + static const _ROUTE_SERVICE_URL = 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/' 'Wayfinding/Campus_Wayfinding_Network/NAServer/Route'; @@ -1315,29 +1249,21 @@ void _toggleLayer(String key) async { }); try { - final routeTask = RouteTask.withUri(Uri.parse(_routeServiceUrl)); + final routeTask = RouteTask.withUri(Uri.parse(_ROUTE_SERVICE_URL)); await routeTask.load(); final params = await routeTask.createDefaultParameters(); params.returnDirections = true; final taskInfo = routeTask.getRouteTaskInfo(); - final matchingMode = taskInfo.travelModes - .where((m) => m.name == mode) - .firstOrNull; + final matchingMode = taskInfo.travelModes.where((m) => m.name == mode).firstOrNull; if (matchingMode != null) { params.travelMode = matchingMode; } - final origin = Stop(ArcGISPoint( - x: userLatLng.$2, - y: userLatLng.$1, - spatialReference: SpatialReference.wgs84, - )); - final dest = Stop(ArcGISPoint( - x: destination.longitude, - y: destination.latitude, - spatialReference: SpatialReference.wgs84, - )); + final origin = Stop(ArcGISPoint(x: userLatLng.$2, y: userLatLng.$1, spatialReference: SpatialReference.wgs84)); + final dest = Stop( + ArcGISPoint(x: destination.longitude, y: destination.latitude, spatialReference: SpatialReference.wgs84), + ); params.setStops([origin, dest]); final result = await routeTask.solveRoute(params); @@ -1365,47 +1291,33 @@ void _toggleLayer(String key) async { _routeGraphicsOverlay.graphics.clear(); final routeGraphic = Graphic( geometry: routeGeometry, - symbol: SimpleLineSymbol( - style: SimpleLineSymbolStyle.solid, - color: Colors.blue, - width: 4, - ), + symbol: SimpleLineSymbol(style: SimpleLineSymbolStyle.solid, color: Colors.blue, width: 4), ); _routeGraphicsOverlay.graphics.add(routeGraphic); // End point marker - final whiteOutline = SimpleLineSymbol( - style: SimpleLineSymbolStyle.solid, - color: Colors.white, - width: 2, - ); - _routeGraphicsOverlay.graphics.add(Graphic( - geometry: ArcGISPoint( - x: destination.longitude, - y: destination.latitude, - spatialReference: SpatialReference.wgs84, + final whiteOutline = SimpleLineSymbol(style: SimpleLineSymbolStyle.solid, color: Colors.white, width: 2); + _routeGraphicsOverlay.graphics.add( + Graphic( + geometry: ArcGISPoint( + x: destination.longitude, + y: destination.latitude, + spatialReference: SpatialReference.wgs84, + ), + symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.red, size: 12) + ..outline = whiteOutline, ), - symbol: SimpleMarkerSymbol( - style: SimpleMarkerSymbolStyle.circle, - color: Colors.red, - size: 12, - )..outline = whiteOutline, - )); + ); // Start point marker (only when origin is not GPS) if (originLatLng != null) { - _routeGraphicsOverlay.graphics.add(Graphic( - geometry: ArcGISPoint( - x: originLatLng.$2, - y: originLatLng.$1, - spatialReference: SpatialReference.wgs84, + _routeGraphicsOverlay.graphics.add( + Graphic( + geometry: ArcGISPoint(x: originLatLng.$2, y: originLatLng.$1, spatialReference: SpatialReference.wgs84), + symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.blue, size: 12) + ..outline = whiteOutline, ), - symbol: SimpleMarkerSymbol( - style: SimpleMarkerSymbolStyle.circle, - color: Colors.blue, - size: 12, - )..outline = whiteOutline, - )); + ); } // Zoom to the route extent with extra bottom padding so the line @@ -1422,9 +1334,7 @@ void _toggleLayer(String key) async { spatialReference: extent.spatialReference, ); _routePaddedExtent = paddedExtent; - _mapViewController.setViewpointAnimated( - Viewpoint.fromTargetExtent(paddedExtent), - ); + _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(paddedExtent)); _graphicsOverlay.graphics.clear(); _mappedResults = []; @@ -1449,23 +1359,15 @@ void _toggleLayer(String key) async { void _onAiLocationSelected(AiSearchResult result) { _searchController.text = result.name; - final point = ArcGISPoint( - x: result.longitude, - y: result.latitude, - spatialReference: SpatialReference.wgs84, - ); + final point = ArcGISPoint(x: result.longitude, y: result.latitude, spatialReference: SpatialReference.wgs84); _graphicsOverlay.graphics.clear(); - _graphicsOverlay.graphics.add(Graphic( - geometry: point, - symbol: SimpleMarkerSymbol( - style: SimpleMarkerSymbolStyle.circle, - color: Colors.red, - size: 14, + _graphicsOverlay.graphics.add( + Graphic( + geometry: point, + symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.red, size: 14), ), - )); - _mapViewController.setViewpointAnimated( - Viewpoint.fromCenter(point, scale: 5000), ); + _mapViewController.setViewpointAnimated(Viewpoint.fromCenter(point, scale: 5000)); final mapResult = MapSearchResult( name: result.name, subtitle: result.subtitle, @@ -1527,19 +1429,17 @@ void _toggleLayer(String key) async { spatialReference: SpatialReference.wgs84, ); _graphicsOverlay.graphics.clear(); - _graphicsOverlay.graphics.add(Graphic( - geometry: point, - symbol: SimpleMarkerSymbol( - style: SimpleMarkerSymbolStyle.circle, - color: destination.source == MapSearchSource.building - ? Colors.blue - : Colors.red, - size: 14, + _graphicsOverlay.graphics.add( + Graphic( + geometry: point, + symbol: SimpleMarkerSymbol( + style: SimpleMarkerSymbolStyle.circle, + color: destination.source == MapSearchSource.building ? Colors.blue : Colors.red, + size: 14, + ), ), - )); - _mapViewController.setViewpointAnimated( - Viewpoint.fromCenter(point, scale: 5000), ); + _mapViewController.setViewpointAnimated(Viewpoint.fromCenter(point, scale: 5000)); } setState(() { @@ -1556,9 +1456,7 @@ void _toggleLayer(String key) async { } IconData _iconForResult(MapSearchResult result) { - return result.source == MapSearchSource.building - ? Icons.business - : Icons.place; + return result.source == MapSearchSource.building ? Icons.business : Icons.place; } /// Returns the icon for a POI class — uses the hardcoded category icon if one @@ -1567,8 +1465,7 @@ void _toggleLayer(String key) async { return _categories .firstWhere( (c) => c.poiClassValue.toLowerCase() == classValue.toLowerCase(), - orElse: () => const _SearchCategory( - label: '', icon: Icons.place, poiClassValue: ''), + orElse: () => const _SearchCategory(label: '', icon: Icons.place, poiClassValue: ''), ) .icon; } @@ -1576,8 +1473,7 @@ void _toggleLayer(String key) async { /// Converts a raw class value like "Food and Beverage" into a display label. /// Uses the hardcoded category label if available, otherwise returns as-is. String _labelForClass(String classValue) { - final match = _categories.where( - (c) => c.poiClassValue.toLowerCase() == classValue.toLowerCase()); + final match = _categories.where((c) => c.poiClassValue.toLowerCase() == classValue.toLowerCase()); return match.isNotEmpty ? match.first.label : classValue; } @@ -1594,10 +1490,7 @@ void _toggleLayer(String key) async { borderRadius: BorderRadius.circular(8), color: bgColor, child: Padding( - padding: EdgeInsets.only( - top: (_showRouteFields && _activeRouteField == 'from') ? 0 : 12, - bottom: 12, - ), + padding: EdgeInsets.only(top: (_showRouteFields && _activeRouteField == 'from') ? 0 : 12, bottom: 12), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, @@ -1664,9 +1557,7 @@ void _toggleLayer(String key) async { padding: const EdgeInsets.symmetric(horizontal: 16), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: _categories - .map((cat) => _buildCategoryChip(context, cat)) - .toList(), + children: _categories.map((cat) => _buildCategoryChip(context, cat)).toList(), ), ), @@ -1692,23 +1583,11 @@ void _toggleLayer(String key) async { return ListTile( splashColor: Colors.transparent, dense: true, - leading: Icon( - Icons.history, - size: 20, - color: isDark ? Colors.grey[500] : Colors.grey[400], - ), - title: Text( - recent.name, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), + leading: Icon(Icons.history, size: 20, color: isDark ? Colors.grey[500] : Colors.grey[400]), + title: Text(recent.name, maxLines: 1, overflow: TextOverflow.ellipsis), trailing: GestureDetector( onTap: () => _removeFromRecentSearches(index), - child: Icon( - Icons.close, - size: 16, - color: isDark ? Colors.grey[500] : Colors.grey[400], - ), + child: Icon(Icons.close, size: 16, color: isDark ? Colors.grey[500] : Colors.grey[400]), ), onTap: () => _selectResult(recent), ); @@ -1731,24 +1610,11 @@ void _toggleLayer(String key) async { Container( width: 56, height: 56, - decoration: BoxDecoration( - color: category.color, - shape: BoxShape.circle, - ), - child: Icon( - category.icon, - size: 24, - color: Colors.black, - ), + decoration: BoxDecoration(color: category.color, shape: BoxShape.circle), + child: Icon(category.icon, size: 24, color: Colors.black), ), SizedBox(height: 6), - Text( - category.label, - style: TextStyle( - fontSize: 13, - color: isDark ? Colors.grey[400] : Colors.grey[600], - ), - ), + Text(category.label, style: TextStyle(fontSize: 13, color: isDark ? Colors.grey[400] : Colors.grey[600])), ], ), ); @@ -1767,20 +1633,12 @@ void _toggleLayer(String key) async { // Collapse whichever sheet is active to the minimum snap if (_showCategoryList && _selectedResult == null) { if (_categorySheetController.isAttached) { - _categorySheetController.animateTo( - 0.15, - duration: const Duration(milliseconds: 250), - curve: Curves.easeOut, - ); + _categorySheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); } } if (_selectedResult != null) { if (_detailSheetController.isAttached) { - _detailSheetController.animateTo( - 0.15, - duration: const Duration(milliseconds: 250), - curve: Curves.easeOut, - ); + _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); } } } @@ -1794,7 +1652,7 @@ void _toggleLayer(String key) async { /// [onClose] is called when the X button is tapped. /// [trailing] is an optional widget shown before the close button (e.g. "Search here"). /// [sliverBody] is the scrollable content below the header. - static const _slideOverHeaderHeight = 80.0; + static const _SLIDE_OVER_HEADER_HEIGHT = 80.0; Widget _buildSlideOverContent({ required BuildContext context, @@ -1819,7 +1677,7 @@ void _toggleLayer(String key) async { SliverPersistentHeader( pinned: true, delegate: _SlideOverHeaderDelegate( - height: _slideOverHeaderHeight, + height: _SLIDE_OVER_HEADER_HEIGHT, backgroundColor: bgColor, child: Column( children: [ @@ -1841,11 +1699,7 @@ void _toggleLayer(String key) async { child: Row( children: [ if (headerIcon != null) ...[ - Icon( - headerIcon, - size: 18, - color: isDark ? Colors.white70 : Colors.grey[700], - ), + Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), const SizedBox(width: 8), ], Expanded( @@ -1866,14 +1720,9 @@ void _toggleLayer(String key) async { height: 34, decoration: BoxDecoration( shape: BoxShape.circle, - color: - isDark ? Colors.grey[800] : Colors.grey[200], - ), - child: Icon( - Icons.close, - size: 18, - color: isDark ? Colors.white70 : Colors.grey[700], + color: isDark ? Colors.grey[800] : Colors.grey[200], ), + child: Icon(Icons.close, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), ), ), ], @@ -1884,9 +1733,7 @@ void _toggleLayer(String key) async { ), ), // Divider below header - SliverToBoxAdapter( - child: Divider(height: 1), - ), + SliverToBoxAdapter(child: Divider(height: 1)), ...sliverBody, ], ), @@ -1904,21 +1751,22 @@ void _toggleLayer(String key) async { final userPos = _getUserLatLng(); final results = List.from(viewport); if (userPos != null) { - results.sort((a, b) => - _distanceMeters(userPos.$1, userPos.$2, a.latitude, a.longitude) - .compareTo( - _distanceMeters( - userPos.$1, userPos.$2, b.latitude, b.longitude))); + results.sort( + (a, b) => _distanceMeters( + userPos.$1, + userPos.$2, + a.latitude, + a.longitude, + ).compareTo(_distanceMeters(userPos.$1, userPos.$2, b.latitude, b.longitude)), + ); } // Content-aware sizing: estimate content height as fraction of screen final screenHeight = MediaQuery.of(context).size.height; // Each list tile ~56px + header ~80px + divider - final contentHeight = - _slideOverHeaderHeight + (results.length * 56.0).clamp(56.0, 600.0); + final contentHeight = _SLIDE_OVER_HEADER_HEIGHT + (results.length * 56.0).clamp(56.0, 600.0); final contentFraction = (contentHeight / screenHeight).clamp(0.15, 0.80); - final initialSize = - contentFraction < 0.45 ? contentFraction : 0.45; + final initialSize = contentFraction < 0.45 ? contentFraction : 0.45; final maxSize = contentFraction < 0.80 ? contentFraction.clamp(0.45, 0.80) : 0.80; // Snap sizes must be strictly increasing and within [min, max] final snaps = [0.15]; @@ -1932,9 +1780,7 @@ void _toggleLayer(String key) async { snap: true, snapSizes: snaps, builder: (context, scrollController) { - final headerTitle = results.isEmpty - ? '$label - None in view' - : '$label - ${results.length} in view'; + final headerTitle = results.isEmpty ? '$label - None in view' : '$label - ${results.length} in view'; return _buildSlideOverContent( context: context, @@ -1944,17 +1790,10 @@ void _toggleLayer(String key) async { onClose: _clearSearch, trailing: _allCategoryResults.length > results.length ? TextButton.icon( - icon: Icon( - Icons.layers_outlined, - size: 16, - color: isDark ? Colors.white54 : Colors.grey[600], - ), + icon: Icon(Icons.layers_outlined, size: 16, color: isDark ? Colors.white54 : Colors.grey[600]), label: Text( 'See all ${_allCategoryResults.length} results', - style: TextStyle( - fontSize: 13, - color: isDark ? Colors.white54 : Colors.grey[600], - ), + style: TextStyle(fontSize: 13, color: isDark ? Colors.white54 : Colors.grey[600]), ), style: TextButton.styleFrom( tapTargetSize: MaterialTapTargetSize.shrinkWrap, @@ -1972,21 +1811,12 @@ void _toggleLayer(String key) async { child: Column( mainAxisSize: MainAxisSize.min, children: [ - Icon(Icons.location_off, - size: 32, - color: isDark - ? Colors.grey[600] - : Colors.grey[400]), + Icon(Icons.location_off, size: 32, color: isDark ? Colors.grey[600] : Colors.grey[400]), const SizedBox(height: 8), Text( 'No $label in current view.\nPan the map to see results.', textAlign: TextAlign.center, - style: TextStyle( - fontSize: 16, - color: isDark - ? Colors.grey[500] - : Colors.grey[600], - ), + style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[500] : Colors.grey[600]), ), ], ), @@ -1995,59 +1825,49 @@ void _toggleLayer(String key) async { ] : [ SliverList( - delegate: SliverChildBuilderDelegate( - (context, index) { - final r = results[index]; - final dist = userPos != null - ? _distanceMeters(userPos.$1, userPos.$2, - r.latitude, r.longitude) - : null; - final distLabel = dist == null - ? null - : dist < 1000 - ? '${dist.round()} m away' - : '${(dist / 1000).toStringAsFixed(1)} km away'; - - return Column( - children: [ - ListTile( - splashColor: Colors.transparent, - leading: Icon( - _iconForResult(r), - size: 20, - color: isDark - ? Colors.grey[400] - : Colors.grey[600], - ), - title: Text( - r.name, - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: const TextStyle(fontSize: 16), - ), - subtitle: distLabel != null - ? Text(distLabel, - style: TextStyle( - fontSize: 13, - color: Colors.grey[500], - )) - : (r.subtitle.isNotEmpty - ? Text(r.subtitle, + delegate: SliverChildBuilderDelegate((context, index) { + final r = results[index]; + final dist = userPos != null + ? _distanceMeters(userPos.$1, userPos.$2, r.latitude, r.longitude) + : null; + final distLabel = dist == null + ? null + : dist < 1000 + ? '${dist.round()} m away' + : '${(dist / 1000).toStringAsFixed(1)} km away'; + final isNotLastResult = index < results.length - 1; + return Column( + children: [ + ListTile( + splashColor: Colors.transparent, + leading: Icon( + _iconForResult(r), + size: 20, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + title: Text( + r.name, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: const TextStyle(fontSize: 16), + ), + subtitle: distLabel != null + ? Text(distLabel, style: TextStyle(fontSize: 13, color: Colors.grey[500])) + : (r.subtitle.isNotEmpty + ? Text( + r.subtitle, maxLines: 1, overflow: TextOverflow.ellipsis, - style: - const TextStyle(fontSize: 13)) + style: TextStyle(fontSize: 13, color: Colors.grey[500]), + ) : null), - dense: true, - onTap: () => _selectResultFromPin(r), - ), - if (index < results.length - 1) - const Divider(height: 1), - ], - ); - }, - childCount: results.length, - ), + dense: true, + onTap: () => _selectResultFromPin(r), + ), + if (isNotLastResult) const Divider(height: 1), + ], + ); + }, childCount: results.length), ), ], ); @@ -2063,25 +1883,19 @@ void _toggleLayer(String key) async { final isDark = Theme.of(context).brightness == Brightness.dark; final isRouting = _showRouteFields || _hasRoute || _routeFailed; - final detailText = result.source == MapSearchSource.building - ? result.address - : result.description; - final categoryLabel = result.source == MapSearchSource.building - ? 'Building' - : result.subtitle; + final detailText = result.source == MapSearchSource.building ? result.address : result.description; + final categoryLabel = result.source == MapSearchSource.building ? 'Building' : result.subtitle; // Content-aware sizing: estimate how tall the detail content is final screenHeight = MediaQuery.of(context).size.height; // header ~80 + name ~30 + detail ~20 + buttons ~48 + padding ~40 - double contentEst = _slideOverHeaderHeight + 30 + 48 + 40; + double contentEst = _SLIDE_OVER_HEADER_HEIGHT + 30 + 48 + 40; if (detailText.isNotEmpty) contentEst += 60; - if (_hasRoute && _routeManeuvers.isNotEmpty) contentEst += _routeManeuvers.length * 52.0; + final hasRouteManeuvers = _hasRoute && _routeManeuvers.isNotEmpty; + if (hasRouteManeuvers) contentEst += _routeManeuvers.length * 52.0; final contentFraction = (contentEst / screenHeight).clamp(0.15, 0.80); - final initialSize = - _hasRoute ? 0.35 : (contentFraction < 0.30 ? contentFraction : 0.30); - final maxSize = _hasRoute - ? 0.80 - : (contentFraction < 0.80 ? contentFraction.clamp(0.30, 0.80) : 0.80); + final initialSize = _hasRoute ? 0.35 : (contentFraction < 0.30 ? contentFraction : 0.30); + final maxSize = _hasRoute ? 0.80 : (contentFraction < 0.80 ? contentFraction.clamp(0.30, 0.80) : 0.80); // Snap sizes must be strictly increasing and within [min, max] final snaps = [0.15]; if (initialSize > 0.15 + 0.01) snaps.add(initialSize); @@ -2094,12 +1908,11 @@ void _toggleLayer(String key) async { snap: true, snapSizes: snaps, builder: (context, scrollController) { + final shouldShowDetailText = !isRouting && detailText.isNotEmpty; return _buildSlideOverContent( context: context, scrollController: scrollController, - headerTitle: isRouting - ? 'Directions to ${result.name}' - : result.name, + headerTitle: isRouting ? 'Directions to ${result.name}' : result.name, headerIcon: _iconForResult(result), onClose: isRouting ? _clearRoute : _closeDetail, sliverBody: [ @@ -2113,22 +1926,15 @@ void _toggleLayer(String key) async { if (!isRouting) Text( categoryLabel, - style: TextStyle( - fontSize: 14, - color: isDark ? Colors.grey[400] : Colors.grey[600], - ), + style: TextStyle(fontSize: 14, color: isDark ? Colors.grey[400] : Colors.grey[600]), ), // Detail text (hidden in routing mode) - if (!isRouting && detailText.isNotEmpty) ...[ + if (shouldShowDetailText) ...[ const SizedBox(height: 8), Text( detailText, - style: TextStyle( - fontSize: 16, - color: - isDark ? Colors.grey[400] : Colors.grey[600], - ), + style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[400] : Colors.grey[600]), maxLines: 3, overflow: TextOverflow.ellipsis, ), @@ -2139,10 +1945,7 @@ void _toggleLayer(String key) async { if (_routeFailed) ...[ Text( 'No route available from your current location.', - style: TextStyle( - fontSize: 16, - color: isDark ? Colors.grey[400] : Colors.grey[600], - ), + style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[400] : Colors.grey[600]), ), const SizedBox(height: 12), SizedBox( @@ -2157,11 +1960,8 @@ void _toggleLayer(String key) async { icon: const Icon(Icons.map_outlined, size: 18), label: const Text('Navigate in Google Maps'), style: FilledButton.styleFrom( - padding: - const EdgeInsets.symmetric(vertical: 12), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), ), ), ), @@ -2169,16 +1969,10 @@ void _toggleLayer(String key) async { // Travel time Row( children: [ - Icon( - Icons.schedule, - size: 18, - color: isDark ? Colors.grey[400] : Colors.grey[600], - ), + Icon(Icons.schedule, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), const SizedBox(width: 6), Text( - _routeTravelTimeMinutes < 1 - ? '< 1 min' - : '${_routeTravelTimeMinutes.ceil()} min', + _routeTravelTimeMinutes < 1 ? '< 1 min' : '${_routeTravelTimeMinutes.ceil()} min', style: TextStyle( fontSize: 16, fontWeight: FontWeight.w600, @@ -2199,33 +1993,22 @@ void _toggleLayer(String key) async { ? null : () => _solveRoute(result, travelMode: mode, originLatLng: _fromLatLng), child: Container( - padding: const EdgeInsets.symmetric( - horizontal: 14, vertical: 8), + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8), decoration: BoxDecoration( color: mode == _travelMode - ? (isDark - ? Colors.white - : Colors.grey[900]) - : (isDark - ? Colors.grey[800] - : Colors.grey[100]), + ? (isDark ? Colors.white : Colors.grey[900]) + : (isDark ? Colors.grey[800] : Colors.grey[100]), borderRadius: BorderRadius.circular(16), ), child: Row( mainAxisSize: MainAxisSize.min, children: [ Icon( - mode == 'Walking' - ? Icons.directions_walk - : Icons.accessible, + mode == 'Walking' ? Icons.directions_walk : Icons.accessible, size: 16, color: mode == _travelMode - ? (isDark - ? Colors.grey[900] - : Colors.white) - : (isDark - ? Colors.white70 - : Colors.grey[700]), + ? (isDark ? Colors.grey[900] : Colors.white) + : (isDark ? Colors.white70 : Colors.grey[700]), ), const SizedBox(width: 6), Text( @@ -2234,12 +2017,8 @@ void _toggleLayer(String key) async { fontSize: 14, fontWeight: FontWeight.w500, color: mode == _travelMode - ? (isDark - ? Colors.grey[900] - : Colors.white) - : (isDark - ? Colors.white70 - : Colors.grey[700]), + ? (isDark ? Colors.grey[900] : Colors.white) + : (isDark ? Colors.white70 : Colors.grey[700]), ), ), ], @@ -2264,18 +2043,10 @@ void _toggleLayer(String key) async { icon: const Icon(Icons.map_outlined, size: 18), label: const Text('Navigate in Google Maps'), style: OutlinedButton.styleFrom( - foregroundColor: isDark - ? const Color(0xFFFFCD00) - : null, - side: isDark - ? const BorderSide( - color: Color(0xFFFFCD00)) - : null, - padding: - const EdgeInsets.symmetric(vertical: 12), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), + foregroundColor: isDark ? const Color(0xFFFFCD00) : null, + side: isDark ? const BorderSide(color: Color(0xFFFFCD00)) : null, + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), ), ), ), @@ -2285,23 +2056,14 @@ void _toggleLayer(String key) async { if (result.websiteUrl != null) ...[ Expanded( child: OutlinedButton.icon( - onPressed: () => - _launchWebsite(result.websiteUrl!), + onPressed: () => _launchWebsite(result.websiteUrl!), icon: const Icon(Icons.language, size: 18), label: const Text('View website'), style: OutlinedButton.styleFrom( - foregroundColor: isDark - ? const Color(0xFFFFCD00) - : null, - side: isDark - ? const BorderSide( - color: Color(0xFFFFCD00)) - : null, - padding: const EdgeInsets.symmetric( - vertical: 12), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), + foregroundColor: isDark ? const Color(0xFFFFCD00) : null, + side: isDark ? const BorderSide(color: Color(0xFFFFCD00)) : null, + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), ), ), ), @@ -2313,8 +2075,7 @@ void _toggleLayer(String key) async { ? null : () { final gps = _getUserLatLng(); - _fromController.text = - gps != null ? 'My Location' : ''; + _fromController.text = gps != null ? 'My Location' : ''; _toController.text = result.name; _routeDestination = result; _graphicsOverlay.graphics.clear(); @@ -2332,20 +2093,13 @@ void _toggleLayer(String key) async { ? const SizedBox( width: 18, height: 18, - child: CircularProgressIndicator( - strokeWidth: 2, - color: Colors.white, - ), + child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white), ) : const Icon(Icons.directions, size: 18), - label: Text( - _isRouting ? 'Routing...' : 'Get Directions'), + label: Text(_isRouting ? 'Routing...' : 'Get Directions'), style: FilledButton.styleFrom( - padding: - const EdgeInsets.symmetric(vertical: 12), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), ), ), ), @@ -2356,48 +2110,37 @@ void _toggleLayer(String key) async { ), ), // Direction maneuver steps (when route is active) - if (_hasRoute && _routeManeuvers.isNotEmpty) + if (hasRouteManeuvers) SliverList( - delegate: SliverChildBuilderDelegate( - (context, index) { - final step = _routeManeuvers[index]; - final distMeters = step.length; - final distLabel = distMeters < 1000 - ? '${distMeters.round()} m' - : '${(distMeters / 1000).toStringAsFixed(1)} km'; - return Column( - children: [ - if (index == 0) const Divider(height: 1), - ListTile( - leading: Icon( - Icons.subdirectory_arrow_right, - size: 20, - color: isDark ? Colors.grey[400] : Colors.grey[600], - ), - title: Text( - step.directionText, - style: const TextStyle(fontSize: 14), - ), - trailing: distMeters > 0 - ? Text( - distLabel, - style: TextStyle( - fontSize: 13, - color: isDark - ? Colors.grey[500] - : Colors.grey[500], - ), - ) - : null, - dense: true, + delegate: SliverChildBuilderDelegate((context, index) { + final step = _routeManeuvers[index]; + final distMeters = step.length; + final distLabel = distMeters < 1000 + ? '${distMeters.round()} m' + : '${(distMeters / 1000).toStringAsFixed(1)} km'; + final isNotLastManeuver = index < _routeManeuvers.length - 1; + return Column( + children: [ + if (index == 0) const Divider(height: 1), + ListTile( + leading: Icon( + Icons.subdirectory_arrow_right, + size: 20, + color: isDark ? Colors.grey[400] : Colors.grey[600], ), - if (index < _routeManeuvers.length - 1) - const Divider(height: 1), - ], - ); - }, - childCount: _routeManeuvers.length, - ), + title: Text(step.directionText, style: const TextStyle(fontSize: 14)), + trailing: distMeters > 0 + ? Text( + distLabel, + style: TextStyle(fontSize: 13, color: isDark ? Colors.grey[500] : Colors.grey[500]), + ) + : null, + dense: true, + ), + if (isNotLastManeuver) const Divider(height: 1), + ], + ); + }, childCount: _routeManeuvers.length), ), ], ); @@ -2414,6 +2157,8 @@ void _toggleLayer(String key) async { super.build(context); final isDark = Theme.of(context).brightness == Brightness.dark; final keyboardVisible = MediaQuery.of(context).viewInsets.bottom > 0; + final shouldShowResultsDivider = _showResults && (_isSearching || _searchResults.isNotEmpty); + final shouldShowCatListPanel = _showCategoryList && _selectedResult == null && _allCategoryResults.isNotEmpty; return Scaffold( body: Stack( @@ -2423,9 +2168,11 @@ void _toggleLayer(String key) async { children: [ Expanded( child: IndexedStack( - index: _sceneMode == 'building3d' ? 1 - : _sceneMode == 'droneView' ? 2 - : 0, + index: _sceneMode == 'building3d' + ? 1 + : _sceneMode == 'droneView' + ? 2 + : 0, children: [ Listener( onPointerDown: _onMapPointerDown, @@ -2445,418 +2192,385 @@ void _toggleLayer(String key) async { // Floating search bar + dropdown — hidden in 3D/Drone View modes if (_sceneMode == 'default') - Positioned( - top: 8, - left: 12, - right: 12, - child: Column( - children: [ - // Search bar / route fields - if (_showRouteFields) - Material( - elevation: 4, - borderRadius: BorderRadius.circular(8), - color: isDark ? Colors.grey[850] : Colors.white, - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 4), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - // Left dot column - Padding( - padding: const EdgeInsets.only(left: 14), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Icon(Icons.circle_outlined, - size: 12, - color: Colors.blue), - Container( - width: 1.5, - height: 24, - color: isDark - ? Colors.grey[600] - : Colors.grey[300], - ), - Icon(Icons.circle, - size: 12, - color: Colors.red), - ], + Positioned( + top: 8, + left: 12, + right: 12, + child: Column( + children: [ + // Search bar / route fields + if (_showRouteFields) + Material( + elevation: 4, + borderRadius: BorderRadius.circular(8), + color: isDark ? Colors.grey[850] : Colors.white, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 4), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + // Left dot column + Padding( + padding: const EdgeInsets.only(left: 14), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Icon(Icons.circle_outlined, size: 12, color: Colors.blue), + Container( + width: 1.5, + height: 24, + color: isDark ? Colors.grey[600] : Colors.grey[300], + ), + Icon(Icons.circle, size: 12, color: Colors.red), + ], + ), ), - ), - // Text fields - Expanded( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Row( - children: [ - Expanded( - child: TextField( - controller: _fromController, - focusNode: _fromFocusNode, - style: const TextStyle(fontSize: 16), - decoration: const InputDecoration( - border: InputBorder.none, - contentPadding: - EdgeInsets.symmetric( - horizontal: 10, - vertical: 14), - hintText: 'From', - isDense: true, - ), - onTap: () { - setState(() { - _activeRouteField = 'from'; - _showSuggestions = true; - _showResults = false; - }); - }, - onChanged: (text) { - _fromLatLng = null; - if (text.length >= 3) { - _performSearch(text); - } else if (text.isEmpty) { + // Text fields + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + children: [ + Expanded( + child: TextField( + controller: _fromController, + focusNode: _fromFocusNode, + style: const TextStyle(fontSize: 16), + decoration: const InputDecoration( + border: InputBorder.none, + contentPadding: EdgeInsets.symmetric(horizontal: 10, vertical: 14), + hintText: 'From', + isDense: true, + ), + onTap: () { setState(() { - _showResults = false; + _activeRouteField = 'from'; _showSuggestions = true; - }); - } else { - setState(() { _showResults = false; - _showSuggestions = false; }); - } - }, - ), - ), - if (_fromController.text.isNotEmpty) - SizedBox( - width: 28, - height: 28, - child: IconButton( - padding: EdgeInsets.zero, - icon: Icon(Icons.close, - size: 16, - color: isDark - ? Colors.white70 - : Colors.grey[600]), - onPressed: () { - _fromController.clear(); + }, + onChanged: (text) { _fromLatLng = null; - setState(() => - _showSuggestions = true); + if (text.length >= 3) { + _performSearch(text); + } else if (text.isEmpty) { + setState(() { + _showResults = false; + _showSuggestions = true; + }); + } else { + setState(() { + _showResults = false; + _showSuggestions = false; + }); + } }, ), ), - ], - ), - Divider(height: 1, indent: 10, endIndent: 10), - Row( - children: [ - Expanded( - child: TextField( - controller: _toController, - focusNode: _toFocusNode, - style: const TextStyle(fontSize: 16), - decoration: const InputDecoration( - border: InputBorder.none, - contentPadding: - EdgeInsets.symmetric( - horizontal: 10, - vertical: 14), - hintText: 'To', - isDense: true, + if (_fromController.text.isNotEmpty) + SizedBox( + width: 28, + height: 28, + child: IconButton( + padding: EdgeInsets.zero, + icon: Icon( + Icons.close, + size: 16, + color: isDark ? Colors.white70 : Colors.grey[600], + ), + onPressed: () { + _fromController.clear(); + _fromLatLng = null; + setState(() => _showSuggestions = true); + }, + ), ), - onTap: () { - setState(() { - _activeRouteField = 'to'; - _showSuggestions = true; - _showResults = false; - }); - }, - onChanged: (text) { - if (text.length >= 3) { - _performSearch(text); - } else if (text.isEmpty) { + ], + ), + Divider(height: 1, indent: 10, endIndent: 10), + Row( + children: [ + Expanded( + child: TextField( + controller: _toController, + focusNode: _toFocusNode, + style: const TextStyle(fontSize: 16), + decoration: const InputDecoration( + border: InputBorder.none, + contentPadding: EdgeInsets.symmetric(horizontal: 10, vertical: 14), + hintText: 'To', + isDense: true, + ), + onTap: () { setState(() { - _showResults = false; + _activeRouteField = 'to'; _showSuggestions = true; - }); - } else { - setState(() { _showResults = false; - _showSuggestions = false; }); - } - }, - ), - ), - if (_toController.text.isNotEmpty) - SizedBox( - width: 28, - height: 28, - child: IconButton( - padding: EdgeInsets.zero, - icon: Icon(Icons.close, - size: 16, - color: isDark - ? Colors.white70 - : Colors.grey[600]), - onPressed: () { - _toController.clear(); - setState(() => - _showSuggestions = true); + }, + onChanged: (text) { + if (text.length >= 3) { + _performSearch(text); + } else if (text.isEmpty) { + setState(() { + _showResults = false; + _showSuggestions = true; + }); + } else { + setState(() { + _showResults = false; + _showSuggestions = false; + }); + } }, ), ), - ], - ), - ], + if (_toController.text.isNotEmpty) + SizedBox( + width: 28, + height: 28, + child: IconButton( + padding: EdgeInsets.zero, + icon: Icon( + Icons.close, + size: 16, + color: isDark ? Colors.white70 : Colors.grey[600], + ), + onPressed: () { + _toController.clear(); + setState(() => _showSuggestions = true); + }, + ), + ), + ], + ), + ], + ), ), - ), - // Close + Swap buttons - Column( - mainAxisSize: MainAxisSize.min, - children: [ - SizedBox( - width: 36, - height: 36, - child: IconButton( - padding: EdgeInsets.zero, - icon: Icon(Icons.close, - size: 20, - color: Colors.redAccent), - onPressed: _clearRoute, + // Close + Swap buttons + Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + width: 36, + height: 36, + child: IconButton( + padding: EdgeInsets.zero, + icon: Icon(Icons.close, size: 20, color: Colors.redAccent), + onPressed: _clearRoute, + ), ), - ), - SizedBox( - width: 36, - height: 36, - child: IconButton( - padding: EdgeInsets.zero, - icon: Icon(Icons.swap_vert, + SizedBox( + width: 36, + height: 36, + child: IconButton( + padding: EdgeInsets.zero, + icon: Icon( + Icons.swap_vert, size: 20, - color: isDark - ? Colors.white70 - : Colors.grey[600]), - onPressed: () { - final tmpText = _fromController.text; - final tmpLatLng = _fromLatLng; - _fromController.text = _toController.text; - _toController.text = tmpText; - setState(() { - _fromLatLng = _routeDestination != null - ? (_routeDestination!.latitude, _routeDestination!.longitude) - : null; - _routeDestination = tmpLatLng != null - ? MapSearchResult( - name: tmpText, - subtitle: '', - latitude: tmpLatLng.$1, - longitude: tmpLatLng.$2, - source: MapSearchSource.building, - ) - : null; - }); - if (_routeDestination != null && _fromLatLng != null) { - _solveRoute(_routeDestination!, originLatLng: _fromLatLng); - } - }, + color: isDark ? Colors.white70 : Colors.grey[600], + ), + onPressed: () { + final tmpText = _fromController.text; + final tmpLatLng = _fromLatLng; + _fromController.text = _toController.text; + _toController.text = tmpText; + setState(() { + _fromLatLng = _routeDestination != null + ? (_routeDestination!.latitude, _routeDestination!.longitude) + : null; + _routeDestination = tmpLatLng != null + ? MapSearchResult( + name: tmpText, + subtitle: '', + latitude: tmpLatLng.$1, + longitude: tmpLatLng.$2, + source: MapSearchSource.building, + ) + : null; + }); + if (_routeDestination != null && _fromLatLng != null) { + _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + } + }, + ), + ), + ], ), - ), - ], - ), - const SizedBox(width: 4), - ], + const SizedBox(width: 4), + ], + ), ), - ), - ) - else - Material( - elevation: 4, - borderRadius: BorderRadius.circular(8), - color: isDark ? Colors.grey[850] : Colors.white, - child: Row( - children: [ - Padding( - padding: EdgeInsets.only(left: 12), - child: Icon( - Icons.search, - color: isDark ? Colors.white70 : Colors.grey[600], + ) + else + Material( + elevation: 4, + borderRadius: BorderRadius.circular(8), + color: isDark ? Colors.grey[850] : Colors.white, + child: Row( + children: [ + Padding( + padding: EdgeInsets.only(left: 12), + child: Icon(Icons.search, color: isDark ? Colors.white70 : Colors.grey[600]), ), - ), - Expanded( - child: TextField( - controller: _searchController, - focusNode: _focusNode, - textInputAction: TextInputAction.search, - onSubmitted: _performSearch, - onChanged: (text) { - if (text.isEmpty) { - setState(() { - _showResults = false; - _searchResults = []; - _matchingPoiClasses = []; - _showSuggestions = _focusNode.hasFocus; - }); - } else { - final q = text.toLowerCase(); - // Match against server-fetched classes - final matched = _allPoiClasses - .where((c) => c.toLowerCase().contains(q)) - .toList(); - - // Always include hardcoded category class values as a fallback - // so chips appear even if the server fetch is still in flight - for (final cat in _categories) { - if (cat.poiClassValue.toLowerCase().contains(q) && - !matched.contains(cat.poiClassValue)) { - matched.insert(0, cat.poiClassValue); + Expanded( + child: TextField( + controller: _searchController, + focusNode: _focusNode, + textInputAction: TextInputAction.search, + onSubmitted: _performSearch, + onChanged: (text) { + if (text.isEmpty) { + setState(() { + _showResults = false; + _searchResults = []; + _matchingPoiClasses = []; + _showSuggestions = _focusNode.hasFocus; + }); + } else { + final q = text.toLowerCase(); + // Match against server-fetched classes + final matched = _allPoiClasses.where((c) => c.toLowerCase().contains(q)).toList(); + + // Always include hardcoded category class values as a fallback + // so chips appear even if the server fetch is still in flight + for (final cat in _categories) { + final isCatMatched = + cat.poiClassValue.toLowerCase().contains(q) && + !matched.contains(cat.poiClassValue); + if (isCatMatched) { + matched.insert(0, cat.poiClassValue); + } } - } - setState(() { - _showSuggestions = false; - _matchingPoiClasses = matched; - }); - } - }, - onTap: () { - // Close detail panel when user taps search bar - if (_selectedResult != null) { - setState(() { - _selectedResult = null; - }); - } - // Show suggestions if text is empty - if (_searchController.text.isEmpty) { - setState(() { - _showSuggestions = true; - _showResults = false; - }); - } - }, - style: TextStyle(fontSize: 16), - decoration: InputDecoration( - border: InputBorder.none, - contentPadding: EdgeInsets.symmetric( - horizontal: 12, - vertical: 16, + setState(() { + _showSuggestions = false; + _matchingPoiClasses = matched; + }); + } + }, + onTap: () { + // Close detail panel when user taps search bar + if (_selectedResult != null) { + setState(() { + _selectedResult = null; + }); + } + // Show suggestions if text is empty + if (_searchController.text.isEmpty) { + setState(() { + _showSuggestions = true; + _showResults = false; + }); + } + }, + style: TextStyle(fontSize: 16), + decoration: InputDecoration( + border: InputBorder.none, + contentPadding: EdgeInsets.symmetric(horizontal: 12, vertical: 16), + hintText: 'Search buildings, places...', ), - hintText: 'Search buildings, places...', ), ), - ), - if (_searchController.text.isNotEmpty) - IconButton( - icon: Icon(Icons.clear), - onPressed: _clearSearch, - ), - if (_config?.features.aiSearch ?? false) - IconButton( - icon: Icon( - Icons.auto_awesome, - color: isDark - ? Colors.amber[300] - : Theme.of(context).colorScheme.primary, - size: 20, - ), - onPressed: () => showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (_) => EsriAiSearchSheet( - userLat: _getUserLatLng()?.$1, - userLon: _getUserLatLng()?.$2, - onLocationSelected: _onAiLocationSelected, - onRouteRequested: _onAiRouteRequested, + if (_searchController.text.isNotEmpty) + IconButton(icon: Icon(Icons.clear), onPressed: _clearSearch), + if (_config?.features.aiSearch ?? false) + IconButton( + icon: Icon( + Icons.auto_awesome, + color: isDark ? Colors.amber[300] : Theme.of(context).colorScheme.primary, + size: 20, + ), + onPressed: () => showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (_) => EsriAiSearchSheet( + userLat: _getUserLatLng()?.$1, + userLon: _getUserLatLng()?.$2, + onLocationSelected: _onAiLocationSelected, + onRouteRequested: _onAiRouteRequested, + ), ), ), - ), - ], + ], + ), ), - ), - SizedBox(height: 4), + SizedBox(height: 4), - // Suggestions panel (categories + recents) - if (_showSuggestions && !_showResults) - _buildSuggestionsPanel(context), + // Suggestions panel (categories + recents) + if (_showSuggestions && !_showResults) _buildSuggestionsPanel(context), - // Search results dropdown - if (_showResults || (_matchingPoiClasses.isNotEmpty && _searchController.text.isNotEmpty && !_showSuggestions)) - Material( - elevation: 4, - borderRadius: BorderRadius.circular(8), - color: isDark ? Colors.grey[850] : Colors.white, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - // ── Category matches (always at top) ────────────────────────── - if (_matchingPoiClasses.isNotEmpty) ...[ - Padding( - padding: const EdgeInsets.fromLTRB(16, 10, 16, 4), - child: Row( - children: [ - Icon(Icons.category_outlined, + // Search results dropdown + if (_showResults || + (_matchingPoiClasses.isNotEmpty && _searchController.text.isNotEmpty && !_showSuggestions)) + Material( + elevation: 4, + borderRadius: BorderRadius.circular(8), + color: isDark ? Colors.grey[850] : Colors.white, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + // ── Category matches (always at top) ────────────────────────── + if (_matchingPoiClasses.isNotEmpty) ...[ + Padding( + padding: const EdgeInsets.fromLTRB(16, 10, 16, 4), + child: Row( + children: [ + Icon( + Icons.category_outlined, size: 13, - color: isDark ? Colors.grey[500] : Colors.grey[500]), - const SizedBox(width: 6), - Text( - 'CATEGORIES', - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w700, - letterSpacing: 0.6, color: isDark ? Colors.grey[500] : Colors.grey[500], ), - ), - ], - ), - ), - ..._matchingPoiClasses.map( - (classValue) => ListTile( - splashColor: Colors.transparent, - leading: Icon( - _iconForClass(classValue), - size: 20, - color: isDark ? Colors.white70 : Colors.grey[700], + const SizedBox(width: 6), + Text( + 'CATEGORIES', + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w700, + letterSpacing: 0.6, + color: isDark ? Colors.grey[500] : Colors.grey[500], + ), + ), + ], ), - title: Text(_labelForClass(classValue)), - subtitle: Text( - classValue, - style: TextStyle( - fontSize: 13, - color: isDark ? Colors.grey[500] : Colors.grey[500]), + ), + ..._matchingPoiClasses.map( + (classValue) => ListTile( + splashColor: Colors.transparent, + leading: Icon( + _iconForClass(classValue), + size: 20, + color: isDark ? Colors.white70 : Colors.grey[700], + ), + title: Text(_labelForClass(classValue)), + subtitle: Text( + classValue, + style: TextStyle(fontSize: 13, color: isDark ? Colors.grey[500] : Colors.grey[500]), + ), + dense: true, + onTap: () => _performClassSearch(classValue), ), - dense: true, - onTap: () => _performClassSearch(classValue), ), - ), - if (_showResults && (_isSearching || _searchResults.isNotEmpty)) - const Divider(height: 1), - ], + if (shouldShowResultsDivider) const Divider(height: 1), + ], - // ── POI / building results ───────────────────────────────────── - if (_showResults) - _isSearching - ? const Padding( - padding: EdgeInsets.all(16), - child: Center(child: CircularProgressIndicator()), - ) - : _searchResults.isEmpty - // Only show "no results" if there are also no category matches - ? (_matchingPoiClasses.isEmpty - ? const Padding( - padding: EdgeInsets.all(16), - child: Text('No results found'), - ) - : const SizedBox.shrink()) - : ConstrainedBox( - constraints: BoxConstraints( - maxHeight: MediaQuery.of(context).size.height * 0.4, - ), + // ── POI / building results ───────────────────────────────────── + if (_showResults) + _isSearching + ? const Padding( + padding: EdgeInsets.all(16), + child: Center(child: CircularProgressIndicator()), + ) + : _searchResults.isEmpty + // Only show "no results" if there are also no category matches + ? (_matchingPoiClasses.isEmpty + ? const Padding(padding: EdgeInsets.all(16), child: Text('No results found')) + : const SizedBox.shrink()) + : ConstrainedBox( + constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.4), child: ListView.separated( shrinkWrap: true, padding: EdgeInsets.zero, @@ -2867,42 +2581,38 @@ void _toggleLayer(String key) async { return ListTile( splashColor: Colors.transparent, leading: Icon(_iconForResult(result)), - title: Text(result.name, - maxLines: 1, - overflow: TextOverflow.ellipsis), + title: Text(result.name, maxLines: 1, overflow: TextOverflow.ellipsis), subtitle: result.subtitle.isNotEmpty - ? Text(result.subtitle, - maxLines: 1, - overflow: TextOverflow.ellipsis) + ? Text(result.subtitle, maxLines: 1, overflow: TextOverflow.ellipsis) : null, dense: true, - onTap: () => _selectResult(result), + onTap: () => _selectResult(result), ); }, ), ), - - ], + ], + ), ), - ), - ], + ], + ), ), - ), - // Category list panel — shown when list button is toggled - if (_showCategoryList && _selectedResult == null && _allCategoryResults.isNotEmpty) - _buildCategoryListPanel(context), + if (shouldShowCatListPanel) _buildCategoryListPanel(context), // Detail slide-over - if (_selectedResult != null) - _buildDetailSlideOver(context, _selectedResult!), + if (_selectedResult != null) _buildDetailSlideOver(context, _selectedResult!), // Top-right FAB cluster — hidden when keyboard or layers panel is active - if (!keyboardVisible && !_focusNode.hasFocus && !_fromFocusNode.hasFocus && !_toFocusNode.hasFocus && !_showLayersPanel) + if (!keyboardVisible && + !_focusNode.hasFocus && + !_fromFocusNode.hasFocus && + !_toFocusNode.hasFocus && + !_showLayersPanel) Positioned( - right: 12, - top: _showRouteFields ? 120 : 68, + top: MediaQuery.of(context).padding.top + 68, + right: 16, child: EsriMapFabCluster( isDark: isDark, is3D: _sceneMode != 'default', @@ -2924,7 +2634,7 @@ void _toggleLayer(String key) async { currentSceneKey: _sceneMode, layerVisible: _layerVisible, layerLoading: _layerLoading, - hideSceneSwitcher: _selectedResult != null, + hideSceneSwitcher: _selectedResult != null || _showCategoryList, onSwitchBasemap: _switchBasemap, onSetSceneMode: _setSceneMode, onToggleLayer: _toggleLayer, @@ -2965,10 +2675,10 @@ class _AgeAuthChallengeHandler implements ArcGISAuthenticationChallengeHandler { } final response = await http.get(Uri.parse(tokensUrl)); - if (response.statusCode != 200) throw Exception('Token fetch failed: ${response.statusCode}'); + final isTokenFetchNotOk = response.statusCode != 200; + if (isTokenFetchNotOk) throw Exception('Token fetch failed: ${response.statusCode}'); final data = jsonDecode(response.body) as Map; - _cachedAgeToken = data['age']?['token'] as String?; final ageExpiresIn = data['age']?['expires_in'] as int? ?? 7200; _ageTokenExpiry = DateTime.now().add(Duration(seconds: ageExpiresIn)); @@ -2981,9 +2691,7 @@ class _AgeAuthChallengeHandler implements ArcGISAuthenticationChallengeHandler { } @override - Future handleArcGISAuthenticationChallenge( - ArcGISAuthenticationChallenge challenge, - ) async { + Future handleArcGISAuthenticationChallenge(ArcGISAuthenticationChallenge challenge) async { try { final host = challenge.requestUri.host; final (token, expiry) = await _getTokenForHost(host); @@ -2991,24 +2699,16 @@ class _AgeAuthChallengeHandler implements ArcGISAuthenticationChallengeHandler { challenge.continueAndFail(); return; } - final tokenInfo = TokenInfo.create( - accessToken: token, - expirationDate: expiry, - isSslRequired: true, - ); + final tokenInfo = TokenInfo.create(accessToken: token, expirationDate: expiry, isSslRequired: true); if (tokenInfo == null) { challenge.continueAndFail(); return; } - final credential = PregeneratedTokenCredential( - uri: challenge.requestUri, - tokenInfo: tokenInfo, - referer: '', - ); + final credential = PregeneratedTokenCredential(uri: challenge.requestUri, tokenInfo: tokenInfo, referer: ''); challenge.continueWithCredential(credential); } catch (e) { debugPrint('Auth challenge failed: $e'); challenge.continueAndFail(); } } -} \ No newline at end of file +} diff --git a/lib/ui/esrimap/esrimap_ai_search.dart b/lib/ui/esrimap/esrimap_ai_search.dart index 0f40ec052..21851a2dc 100644 --- a/lib/ui/esrimap/esrimap_ai_search.dart +++ b/lib/ui/esrimap/esrimap_ai_search.dart @@ -101,7 +101,7 @@ class _EsriAiSearchSheetState extends State { AiSearchResponse? _response; String? _errorMessage; - static const _baseUrl = + static const _BASE_URL = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; Future _submit() async { @@ -118,11 +118,12 @@ class _EsriAiSearchSheetState extends State { if (widget.userLon != null) body['lon'] = widget.userLon; final res = await http.post( - Uri.parse('$_baseUrl/ai-search'), + Uri.parse('$_BASE_URL/ai-search'), headers: {'Content-Type': 'application/json'}, body: jsonEncode(body), ); - if (res.statusCode != 200) throw Exception('Request failed: ${res.statusCode}'); + final isResNotOk = res.statusCode != 200; + if (isResNotOk) throw Exception('Request failed: ${res.statusCode}'); final data = jsonDecode(res.body) as Map; setState(() { _response = AiSearchResponse.fromJson(data); @@ -138,13 +139,17 @@ class _EsriAiSearchSheetState extends State { IconData _iconForSubtitle(String subtitle) { final s = subtitle.toLowerCase(); - if (s.contains('dining') || s.contains('food') || s.contains('coffee') || s.contains('cafe')) { + final isDining = s.contains('dining') || s.contains('food') || s.contains('coffee') || s.contains('cafe'); + if (isDining) { return Icons.restaurant; } - if (s.contains('library') || s.contains('academic')) return Icons.menu_book; + final isLibrary = s.contains('library') || s.contains('academic'); + if (isLibrary) return Icons.menu_book; if (s.contains('parking')) return Icons.local_parking; - if (s.contains('recreation') || s.contains('gym') || s.contains('fitness')) return Icons.fitness_center; - if (s.contains('transit') || s.contains('shuttle')) return Icons.directions_bus; + final isRec = s.contains('recreation') || s.contains('gym') || s.contains('fitness'); + if (isRec) return Icons.fitness_center; + final isTransit = s.contains('transit') || s.contains('shuttle'); + if (isTransit) return Icons.directions_bus; return Icons.place; } @@ -162,6 +167,7 @@ class _EsriAiSearchSheetState extends State { final subtitleColor = isDark ? Colors.grey[400]! : Colors.grey[600]!; final accent = Theme.of(context).colorScheme.primary; final bottomPad = MediaQuery.of(context).viewInsets.bottom; + final hasResults = _state == _AiSearchState.results && _response != null; return Container( decoration: BoxDecoration( @@ -241,7 +247,7 @@ class _EsriAiSearchSheetState extends State { ), // Results - if (_state == _AiSearchState.results && _response != null) ...[ + if (hasResults) ...[ if (_response!.message.isNotEmpty) Padding( padding: const EdgeInsets.fromLTRB(16, 0, 16, 8), diff --git a/lib/ui/esrimap/esrimap_basemaps.dart b/lib/ui/esrimap/esrimap_basemaps.dart index 6c373c6ad..e11ac4959 100644 --- a/lib/ui/esrimap/esrimap_basemaps.dart +++ b/lib/ui/esrimap/esrimap_basemaps.dart @@ -42,7 +42,8 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { final portalUrl = layer.portalKey != null ? config.portals[layer.portalKey!] : null; - if (portalUrl != null && layer.itemId != null) { + final hasPortalAndItem = portalUrl != null && layer.itemId != null; + if (hasPortalAndItem) { basemap.baseLayers.add( ArcGISVectorTiledLayer.withItem( PortalItem.withPortalAndItemId( diff --git a/lib/ui/esrimap/esrimap_config.dart b/lib/ui/esrimap/esrimap_config.dart index a63a01656..5f0de2661 100644 --- a/lib/ui/esrimap/esrimap_config.dart +++ b/lib/ui/esrimap/esrimap_config.dart @@ -235,7 +235,7 @@ class EsriMapConfigService { static final EsriMapConfigService instance = EsriMapConfigService._(); EsriMapConfigService._(); - static const _baseUrl = + static const _BASE_URL = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; EsriMapConfig? _config; @@ -245,10 +245,10 @@ class EsriMapConfigService { EsriMapConfig? get cached => _config; - String get tokensUrl => '$_baseUrl/tokens'; + String get tokensUrl => '$_BASE_URL/tokens'; Future _doFetch() async { - final response = await http.get(Uri.parse('$_baseUrl/config')); + final response = await http.get(Uri.parse('$_BASE_URL/config')); if (response.statusCode != 200) { throw Exception('Config fetch failed: ${response.statusCode}'); } diff --git a/lib/ui/esrimap/esrimap_fab.dart b/lib/ui/esrimap/esrimap_fab.dart index a2187190a..1e21e1a14 100644 --- a/lib/ui/esrimap/esrimap_fab.dart +++ b/lib/ui/esrimap/esrimap_fab.dart @@ -25,9 +25,9 @@ class EsriMapFabCluster extends StatelessWidget { required this.onSnapToNorth, }) : super(key: key); - static const _activeColor = Color(0xFFC69214); - static const _size = 48.0; - static const _btnHeight = 44.0; + static const _ACTIVE_COLOR = Color(0xFFC69214); + static const _SIZE = 48.0; + static const _BTN_HEIGHT = 44.0; @override Widget build(BuildContext context) { @@ -48,8 +48,8 @@ class EsriMapFabCluster extends StatelessWidget { onTap: onSnapToNorth, behavior: HitTestBehavior.opaque, child: SizedBox( - width: _size, - height: _size, + width: _SIZE, + height: _SIZE, child: Center( child: CustomPaint( size: const Size(24, 24), @@ -67,10 +67,10 @@ class EsriMapFabCluster extends StatelessWidget { Material( elevation: 4, color: bgColor, - borderRadius: BorderRadius.circular(_size / 2), + borderRadius: BorderRadius.circular(_SIZE / 2), clipBehavior: Clip.antiAlias, child: SizedBox( - width: _size, + width: _SIZE, child: Padding( padding: const EdgeInsets.symmetric(vertical: 4), child: Column( @@ -79,12 +79,12 @@ class EsriMapFabCluster extends StatelessWidget { if (!is3D) _pillButton( icon: Icons.my_location, - color: isLocationActive ? _activeColor : fgColor, + color: isLocationActive ? _ACTIVE_COLOR : fgColor, onTap: onRecenterOnUser, ), _pillButton( icon: Icons.center_focus_strong, - color: isRecenterActive ? _activeColor : fgColor, + color: isRecenterActive ? _ACTIVE_COLOR : fgColor, onTap: onRecenterOnView, ), _pillButton( @@ -110,7 +110,7 @@ class EsriMapFabCluster extends StatelessWidget { onTap: onTap, behavior: HitTestBehavior.opaque, child: SizedBox( - height: _btnHeight, + height: _BTN_HEIGHT, child: Center( child: Icon(icon, size: 22, color: color), ), diff --git a/lib/ui/esrimap/esrimap_layers_panel.dart b/lib/ui/esrimap/esrimap_layers_panel.dart index 7f25c7466..7433d531e 100644 --- a/lib/ui/esrimap/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esrimap_layers_panel.dart @@ -149,6 +149,7 @@ class EsriMapLayersPanel extends StatelessWidget { final bottomPad = MediaQuery.of(context).padding.bottom; final isDefault = currentSceneKey == 'default'; + final showSceneSwitcher = config.features.scenes && !hideSceneSwitcher; return Positioned( left: 12, @@ -253,7 +254,7 @@ class EsriMapLayersPanel extends StatelessWidget { ), // Scene chips — gated by features flag, hidden when slide-over is active - if (config.features.scenes && !hideSceneSwitcher) ...[ + if (showSceneSwitcher) ...[ const Divider(height: 24, indent: 16, endIndent: 16), sectionLabel('SCENE'), Padding( From 1a3b37a9ec574cf90ab197b5949fc80dee8a1346 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 12:06:38 -0700 Subject: [PATCH 007/139] fixed pre-commit things --- lib/ui/esrimap/esrimap.dart | 19 +++++++------------ lib/ui/esrimap/esrimap_ai_search.dart | 4 +--- lib/ui/esrimap/esrimap_config.dart | 5 ++--- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index f3d74abd5..26169abf9 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -644,9 +644,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Insert at front _recentSearches.insert(0, result); // Trim to max - if (_recentSearches.length > _MAX_RECENT_SEARCHES) { - _recentSearches = _recentSearches.sublist(0, _MAX_RECENT_SEARCHES); - } + final hasMaxSearches = _recentSearches.length > _MAX_RECENT_SEARCHES; + if (hasMaxSearches) _recentSearches = _recentSearches.sublist(0, _MAX_RECENT_SEARCHES); _saveRecentSearches(); } @@ -665,9 +664,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Future> _apiGet(String path, [Map? params]) async { final uri = Uri.parse('$_BASE_URL/$path').replace(queryParameters: params); final response = await http.get(uri); - if (response.statusCode != 200) { - throw Exception('API error ${response.statusCode}: ${response.body}'); - } + final isResNotOk = response.statusCode != 200; + if (isResNotOk) throw Exception('API error ${response.statusCode}: ${response.body}'); return jsonDecode(response.body) as Map; } @@ -677,9 +675,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { headers: {'Content-Type': 'application/json'}, body: jsonEncode(body), ); - if (response.statusCode != 200) { - throw Exception('API error ${response.statusCode}: ${response.body}'); - } + final isResNotOk = response.statusCode != 200; + if (isResNotOk) throw Exception('API error ${response.statusCode}: ${response.body}'); return jsonDecode(response.body) as Map; } @@ -751,9 +748,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { for (final cat in _categories) { final matchesCategory = cat.poiClassValue.toLowerCase().contains(q) && !matched.contains(cat.poiClassValue); - if (matchesCategory) { - matched.insert(0, cat.poiClassValue); - } + if (matchesCategory) matched.insert(0, cat.poiClassValue); } setState(() { diff --git a/lib/ui/esrimap/esrimap_ai_search.dart b/lib/ui/esrimap/esrimap_ai_search.dart index 21851a2dc..81b496beb 100644 --- a/lib/ui/esrimap/esrimap_ai_search.dart +++ b/lib/ui/esrimap/esrimap_ai_search.dart @@ -140,9 +140,7 @@ class _EsriAiSearchSheetState extends State { IconData _iconForSubtitle(String subtitle) { final s = subtitle.toLowerCase(); final isDining = s.contains('dining') || s.contains('food') || s.contains('coffee') || s.contains('cafe'); - if (isDining) { - return Icons.restaurant; - } + if (isDining) return Icons.restaurant; final isLibrary = s.contains('library') || s.contains('academic'); if (isLibrary) return Icons.menu_book; if (s.contains('parking')) return Icons.local_parking; diff --git a/lib/ui/esrimap/esrimap_config.dart b/lib/ui/esrimap/esrimap_config.dart index 5f0de2661..985899583 100644 --- a/lib/ui/esrimap/esrimap_config.dart +++ b/lib/ui/esrimap/esrimap_config.dart @@ -249,9 +249,8 @@ class EsriMapConfigService { Future _doFetch() async { final response = await http.get(Uri.parse('$_BASE_URL/config')); - if (response.statusCode != 200) { - throw Exception('Config fetch failed: ${response.statusCode}'); - } + final isResNotOk = response.statusCode != 200; + if (isResNotOk) throw Exception('Config fetch failed: ${response.statusCode}'); _config = EsriMapConfig.fromJson( jsonDecode(response.body) as Map, ); From 40f27db5a3a55181f5419d486bba7fcfeb630b63 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 12:16:54 -0700 Subject: [PATCH 008/139] fixed precommit so it pushes automatic changes --- .github/workflows/pre_commit_check.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pre_commit_check.yml b/.github/workflows/pre_commit_check.yml index 15afcf728..4904c9bfa 100644 --- a/.github/workflows/pre_commit_check.yml +++ b/.github/workflows/pre_commit_check.yml @@ -34,9 +34,19 @@ jobs: python -m pip install --upgrade pip pip install pre-commit - # 4 - Run pre-commit. If the script exits with a non-zero code, the GitHub Action will fail the PR. + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: 'stable' + + # 4 - Run pre-commit. We append || true so that if files are modified, it doesn't fail the workflow immediately. - name: Run pre-commit hooks - run: pre-commit run --all-files + run: pre-commit run --all-files || true + + - name: Commit and push auto-fixes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "style: auto fix formatting violations" - name: Check code style violations id: check From 6e395787b7e56c2a18ce8d5055aea0ca7f19a2ee Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Mon, 27 Jul 2026 19:18:32 +0000 Subject: [PATCH 009/139] style: auto fix formatting violations --- lib/app_constants.dart | 3 +- lib/app_networking.dart | 10 +- lib/app_provider.dart | 295 +++++----- lib/app_router.dart | 230 ++++---- lib/app_styles.dart | 242 +++++---- lib/core/models/authentication.dart | 17 +- lib/core/models/authentication.g.dart | 4 +- lib/core/models/availability.dart | 155 +++--- lib/core/models/cards.dart | 49 +- lib/core/models/classes.dart | 113 ++-- lib/core/models/dining.dart | 205 +++---- lib/core/models/dining_menu.dart | 144 +++-- lib/core/models/employee_id.dart | 31 +- lib/core/models/events.dart | 46 +- lib/core/models/location.dart | 16 +- lib/core/models/map.dart | 52 +- lib/core/models/news.dart | 38 +- lib/core/models/notices.dart | 12 +- lib/core/models/notifications.dart | 52 +- lib/core/models/notifications_freefood.dart | 29 +- lib/core/models/parking.dart | 38 +- lib/core/models/shuttle.dart | 81 +-- lib/core/models/shuttle_arrival.dart | 12 +- lib/core/models/shuttle_stop.dart | 22 +- lib/core/models/speed_test.dart | 90 +-- lib/core/models/spot_types.dart | 45 +- lib/core/models/student_id_name.dart | 32 +- lib/core/models/student_id_profile.dart | 75 +-- lib/core/models/term.dart | 16 +- lib/core/models/tgpt_models/chat_history.dart | 27 +- lib/core/models/tgpt_models/chat_message.dart | 44 +- .../tgpt_models/chat_message_persistent.dart | 32 +- .../chat_message_persistent.g.dart | 4 +- .../models/tgpt_models/chat_response.dart | 10 +- lib/core/models/tgpt_models/chat_session.dart | 21 +- lib/core/models/topics.dart | 51 +- lib/core/models/user_profile.dart | 134 +++-- lib/core/models/user_profile.g.dart | 4 +- lib/core/providers/availability.dart | 1 - lib/core/providers/cards.dart | 18 +- lib/core/providers/chat_provider.dart | 80 +-- lib/core/providers/classes.dart | 42 +- lib/core/providers/connectivity.dart | 19 +- lib/core/providers/dining.dart | 8 +- lib/core/providers/location.dart | 5 +- lib/core/providers/map.dart | 6 +- lib/core/providers/notifications.dart | 56 +- lib/core/providers/parking.dart | 17 +- lib/core/providers/shuttle.dart | 3 +- lib/core/providers/speed_test.dart | 25 +- lib/core/providers/student_id.dart | 2 +- lib/core/providers/user.dart | 4 +- lib/core/services/authentication.dart | 14 +- lib/core/services/availability.dart | 4 +- lib/core/services/cards.dart | 8 +- lib/core/services/classes.dart | 8 +- lib/core/services/dining.dart | 10 +- lib/core/services/events.dart | 4 +- lib/core/services/map.dart | 5 +- lib/core/services/messages.dart | 9 +- lib/core/services/news.dart | 4 +- lib/core/services/notifications.dart | 13 +- lib/core/services/notifications_freefood.dart | 12 +- lib/core/services/parking.dart | 14 +- lib/core/services/shuttle.dart | 14 +- lib/core/services/speed_test.dart | 10 +- lib/core/services/spot_types.dart | 4 +- .../tgpt_services/chat_session_creation.dart | 11 +- .../services/tgpt_services/chat_stream.dart | 23 +- .../tgpt_services/tgpt_error_message.dart | 9 +- lib/core/services/user.dart | 12 +- lib/core/utils/maps.dart | 3 +- lib/main.dart | 42 +- lib/ui/ai_assistant/ai_assistant_view.dart | 20 +- .../ai_assistant/assistant_empty_state.dart | 5 +- lib/ui/ai_assistant/assistant_header.dart | 7 +- lib/ui/ai_assistant/assistant_sidebar.dart | 38 +- lib/ui/ai_assistant/chat_citation.dart | 20 +- lib/ui/ai_assistant/chat_composer.dart | 23 +- lib/ui/ai_assistant/chat_message_bubble.dart | 48 +- lib/ui/ai_assistant/chat_message_list.dart | 12 +- lib/ui/ai_assistant/citation_web_view.dart | 13 +- lib/ui/availability/availability_card.dart | 27 +- .../availability_detail_view.dart | 40 +- lib/ui/availability/availability_display.dart | 44 +- .../manage_availability_view.dart | 66 +-- lib/ui/classes/classes_card.dart | 85 +-- lib/ui/classes/classes_list.dart | 117 ++-- lib/ui/classes/upcoming_classes.dart | 13 +- lib/ui/common/action_button.dart | 14 +- lib/ui/common/action_link.dart | 10 +- lib/ui/common/alert_dialog_widget.dart | 27 +- lib/ui/common/base64_image_widget.dart | 7 +- lib/ui/common/card_container.dart | 46 +- lib/ui/common/container_view.dart | 5 +- lib/ui/common/directions_helper.dart | 15 +- lib/ui/common/event_time.dart | 37 +- lib/ui/common/image_loader.dart | 10 +- lib/ui/common/last_updated_widget.dart | 16 +- lib/ui/common/linkify_with_catch.dart | 14 +- lib/ui/common/time_range_widget.dart | 21 +- lib/ui/common/top_content.dart | 22 +- lib/ui/common/webview_container.dart | 17 +- lib/ui/dining/dining_busyness_bar.dart | 30 +- lib/ui/dining/dining_card.dart | 19 +- lib/ui/dining/dining_detail_view.dart | 264 ++++----- lib/ui/dining/dining_filter_view.dart | 5 +- lib/ui/dining/dining_list.dart | 69 +-- lib/ui/dining/payment_filter_button.dart | 4 +- lib/ui/employee_id/employee_id_card.dart | 219 ++++---- lib/ui/esrimap/esrimap.dart | 80 +-- lib/ui/esrimap/esrimap_ai_search.dart | 77 +-- lib/ui/esrimap/esrimap_basemaps.dart | 9 +- lib/ui/esrimap/esrimap_config.dart | 117 ++-- lib/ui/esrimap/esrimap_fab.dart | 21 +- lib/ui/esrimap/esrimap_layers_panel.dart | 110 ++-- lib/ui/esrimap/esrimap_scene.dart | 37 +- lib/ui/events/event_tile.dart | 85 ++- lib/ui/events/events_card.dart | 11 +- lib/ui/events/events_card_list.dart | 5 +- lib/ui/events/events_detail_view.dart | 102 ++-- lib/ui/events/events_view_all.dart | 11 +- lib/ui/finals/finals_card.dart | 137 ++--- lib/ui/home/home.dart | 26 +- lib/ui/map/directions_button.dart | 19 +- lib/ui/map/map.dart | 5 +- lib/ui/map/map_search_bar_ph.dart | 75 ++- lib/ui/map/map_search_view.dart | 7 +- lib/ui/map/more_results_list.dart | 35 +- lib/ui/map/my_location_button.dart | 34 +- lib/ui/map/quick_search_icons.dart | 9 +- lib/ui/map/search_bar.dart | 18 +- lib/ui/map/search_history_list.dart | 7 +- .../my_student_chart_card.dart | 18 +- lib/ui/my_ucsd_chart/my_ucsd_chart_card.dart | 13 +- lib/ui/navigator/bottom.dart | 56 +- lib/ui/navigator/top.dart | 54 +- lib/ui/news/news_card.dart | 13 +- lib/ui/news/news_detail_view.dart | 79 ++- lib/ui/news/news_list.dart | 32 +- lib/ui/notices/notices_card.dart | 29 +- .../notifications/notifications_filter.dart | 11 +- .../notifications/notifications_freefood.dart | 154 +++--- .../notifications_list_view.dart | 62 +-- lib/ui/onboarding/onboarding_login.dart | 514 +++++++++--------- .../onboarding/onboarding_slide_template.dart | 10 +- lib/ui/onboarding/onboarding_slides.dart | 198 ++++--- .../parking/circular_parking_indicator.dart | 268 +++++---- lib/ui/parking/manage_parking_view.dart | 22 +- lib/ui/parking/neighborhood_lot_view.dart | 5 +- lib/ui/parking/neighborhoods_view.dart | 21 +- lib/ui/parking/parking_card.dart | 51 +- lib/ui/parking/parking_structure_view.dart | 13 +- lib/ui/parking/spot_types_view.dart | 94 ++-- lib/ui/profile/cards.dart | 46 +- lib/ui/profile/login.dart | 154 +++--- lib/ui/profile/profile.dart | 5 +- lib/ui/shuttle/add_shuttle_stops_view.dart | 58 +- lib/ui/shuttle/manage_shuttle_view.dart | 118 ++-- lib/ui/shuttle/shuttle_card.dart | 35 +- lib/ui/shuttle/shuttle_display.dart | 47 +- lib/ui/student_id/student_id_card.dart | 196 +++---- lib/ui/wifi/wifi_card.dart | 287 +++++----- 163 files changed, 3659 insertions(+), 4490 deletions(-) diff --git a/lib/app_constants.dart b/lib/app_constants.dart index 78eb746c1..aa5b41fd8 100644 --- a/lib/app_constants.dart +++ b/lib/app_constants.dart @@ -154,7 +154,8 @@ class NavigatorConstants { } class NotificationsConstants { - static const STATUS_NO_MESSAGES = 'You have no notifications.\n' + + static const STATUS_NO_MESSAGES = + 'You have no notifications.\n' + 'It looks like you\'ve unsubscribed from all topics.\n\n' + 'You can re-subscribe to specific topics via the Notifications Filter.'; static const STATUS_FETCH_PROBLEM = 'There was a problem fetching your messages.\n\n' + 'Please try again soon.'; diff --git a/lib/app_networking.dart b/lib/app_networking.dart index be082b042..f7026077a 100644 --- a/lib/app_networking.dart +++ b/lib/app_networking.dart @@ -40,9 +40,7 @@ class NetworkHelper { dio.options.receiveTimeout = DEFAULT_TIMEOUT; dio.options.responseType = ResponseType.plain; dio.options.headers = headers; - final _response = await dio.get( - url, - ); + final _response = await dio.get(url); if (_response.statusCode == 200) { // If server returns an OK response, return the body return _response.data; @@ -60,9 +58,7 @@ class NetworkHelper { content: const Text(LoginConstants.SILENT_LOGIN_FAILED_DESC), actions: [ TextButton( - style: TextButton.styleFrom( - foregroundColor: ucLabelColor, - ), + style: TextButton.styleFrom(foregroundColor: ucLabelColor), onPressed: () { Get.back(closeOverlays: true); }, @@ -205,7 +201,7 @@ class NetworkHelper { final String tokenEndpoint = dotenv.get('NEW_TOKEN_ENDPOINT'); final Map tokenHeaders = { "content-type": 'application/x-www-form-urlencoded', - "Authorization": dotenv.get('MOBILE_APP_PUBLIC_DATA_KEY') + "Authorization": dotenv.get('MOBILE_APP_PUBLIC_DATA_KEY'), }; try { var response = await authorizedPost(tokenEndpoint, tokenHeaders, "grant_type=client_credentials"); diff --git a/lib/app_provider.dart b/lib/app_provider.dart index 08ebf0811..644f2580c 100644 --- a/lib/app_provider.dart +++ b/lib/app_provider.dart @@ -24,11 +24,7 @@ import 'package:firebase_analytics/firebase_analytics.dart'; import 'package:provider/provider.dart'; import 'package:provider/single_child_widget.dart'; -List providers = [ - ...independentServices, - ...dependentServices, - ...uiConsumableProviders, -]; +List providers = [...independentServices, ...dependentServices, ...uiConsumableProviders]; final FirebaseAnalytics analytics = FirebaseAnalytics.instance; final FirebaseAnalyticsObserver observer = FirebaseAnalyticsObserver(analytics: analytics); @@ -68,9 +64,7 @@ List independentServices = [ }, lazy: false, ), - ChangeNotifierProvider( - create: (_) => CustomAppBar(), - ), + ChangeNotifierProvider(create: (_) => CustomAppBar()), ChangeNotifierProvider( create: (_) { NoticesDataProvider _noticesDataProvider = NoticesDataProvider(); @@ -88,139 +82,168 @@ List independentServices = [ ), ]; List dependentServices = [ - ChangeNotifierProxyProvider(create: (_) { - var diningDataProvider = DiningDataProvider(); - diningDataProvider.fetchDiningLocations(); - return diningDataProvider; - }, update: (_, coordinates, diningDataProvider) { - diningDataProvider!.coordinates = coordinates; - diningDataProvider.populateDistances(); - return diningDataProvider; - }), - ChangeNotifierProxyProvider(create: (_) { - var mapsDataProvider = MapsDataProvider(); - return mapsDataProvider; - }, update: (_, coordinates, mapsDataProvider) { - mapsDataProvider!.coordinates = coordinates; - mapsDataProvider.populateDistances(); - return mapsDataProvider; - }), + ChangeNotifierProxyProvider( + create: (_) { + var diningDataProvider = DiningDataProvider(); + diningDataProvider.fetchDiningLocations(); + return diningDataProvider; + }, + update: (_, coordinates, diningDataProvider) { + diningDataProvider!.coordinates = coordinates; + diningDataProvider.populateDistances(); + return diningDataProvider; + }, + ), + ChangeNotifierProxyProvider( + create: (_) { + var mapsDataProvider = MapsDataProvider(); + return mapsDataProvider; + }, + update: (_, coordinates, mapsDataProvider) { + mapsDataProvider!.coordinates = coordinates; + mapsDataProvider.populateDistances(); + return mapsDataProvider; + }, + ), ChangeNotifierProxyProvider( - create: (_) { - var _userDataProvider = UserDataProvider(); + create: (_) { + var _userDataProvider = UserDataProvider(); - /// try to load any persistent saved data - /// once loaded from memory get the user's online profile - _userDataProvider.loadSavedData().whenComplete(() => _userDataProvider.fetchUserProfile()); - return _userDataProvider; - }, - lazy: false, - update: (_, pushNotificationDataProvider, _userDataProvider) { - _userDataProvider!.pushNotificationDataProvider = pushNotificationDataProvider; - return _userDataProvider; - }), + /// try to load any persistent saved data + /// once loaded from memory get the user's online profile + _userDataProvider.loadSavedData().whenComplete(() => _userDataProvider.fetchUserProfile()); + return _userDataProvider; + }, + lazy: false, + update: (_, pushNotificationDataProvider, _userDataProvider) { + _userDataProvider!.pushNotificationDataProvider = pushNotificationDataProvider; + return _userDataProvider; + }, + ), ChangeNotifierProxyProvider( - create: (_) { - var cardsDataProvider = CardsDataProvider(); - return cardsDataProvider; - }, - lazy: false, - update: (_, userDataProvider, cardsDataProvider) { - cardsDataProvider!.userDataProvider = userDataProvider; - userDataProvider.cardsDataProvider = cardsDataProvider; - cardsDataProvider - ..loadSavedData().then((_) { - // Update available cards - cardsDataProvider.updateAvailableCards(userDataProvider.authenticationModel.ucsdaffiliation); + create: (_) { + var cardsDataProvider = CardsDataProvider(); + return cardsDataProvider; + }, + lazy: false, + update: (_, userDataProvider, cardsDataProvider) { + cardsDataProvider!.userDataProvider = userDataProvider; + userDataProvider.cardsDataProvider = cardsDataProvider; + cardsDataProvider + ..loadSavedData().then((_) { + // Update available cards + cardsDataProvider.updateAvailableCards(userDataProvider.authenticationModel.ucsdaffiliation); - // Student card activation - final bool isLoggedIn = userDataProvider.isLoggedIn; - final bool isStudent = userDataProvider.userProfileModel.classifications?.student ?? false; - if (isLoggedIn && isStudent) { - // Uses silent login, respect user preferences. - cardsDataProvider.activateStudentCardsForSilentLogin(); - } else { - cardsDataProvider.deactivateStudentCards(); - } + // Student card activation + final bool isLoggedIn = userDataProvider.isLoggedIn; + final bool isStudent = userDataProvider.userProfileModel.classifications?.student ?? false; + if (isLoggedIn && isStudent) { + // Uses silent login, respect user preferences. + cardsDataProvider.activateStudentCardsForSilentLogin(); + } else { + cardsDataProvider.deactivateStudentCards(); + } - // Staff card activation - final bool isStaff = userDataProvider.userProfileModel.classifications?.staff ?? false; - if (isLoggedIn && isStaff) { - // Uses silent login, respect user preferences. - cardsDataProvider.activateStaffCardsForSilentLogin(); - } else { - cardsDataProvider.deactivateStaffCards(); - } - }); - return cardsDataProvider; - }), - ChangeNotifierProxyProvider(create: (_) { - var classDataProvider = ClassScheduleDataProvider(); - return classDataProvider; - }, update: (_, userDataProvider, classScheduleDataProvider) { - classScheduleDataProvider!.userDataProvider = userDataProvider; - final bool isLoggedIn = userDataProvider.isLoggedIn; - final bool isNotLoading = !classScheduleDataProvider.isLoading; - if (isLoggedIn && isNotLoading) classScheduleDataProvider.fetchData(); - return classScheduleDataProvider; - }), - ChangeNotifierProxyProvider(create: (_) { - var studentIdDataProvider = StudentIdDataProvider(); - return studentIdDataProvider; - }, update: (_, userDataProvider, studentIdDataProvider) { - studentIdDataProvider!.userDataProvider = userDataProvider; - // Verify that the user is logged in - final bool isLoggedIn = userDataProvider.isLoggedIn; - final bool isNotLoading = !studentIdDataProvider.isLoading; - if (isLoggedIn && isNotLoading) studentIdDataProvider.fetchData(); - return studentIdDataProvider; - }), - ChangeNotifierProxyProvider(create: (_) { - var employeeIdDataProvider = EmployeeIdDataProvider(); - return employeeIdDataProvider; - }, update: (_, userDataProvider, employeeIdDataProvider) { - employeeIdDataProvider!.userDataProvider = userDataProvider; - // Verify that the user is logged in - final bool isLoggedIn = userDataProvider.isLoggedIn; - final bool isNotLoading = !employeeIdDataProvider.isLoading; - if (isLoggedIn && isNotLoading) employeeIdDataProvider.fetchData(); - return employeeIdDataProvider; - }), - ChangeNotifierProxyProvider(create: (_) { - var availabilityDataProvider = AvailabilityDataProvider(); - availabilityDataProvider.fetchAvailability(); - return availabilityDataProvider; - }, update: (_, userDataProvider, availabilityDataProvider) { - availabilityDataProvider!.userDataProvider = userDataProvider; - return availabilityDataProvider; - }), - ChangeNotifierProxyProvider2(create: (_) { - var shuttleDataProvider = ShuttleDataProvider(); - return shuttleDataProvider; - }, update: (_, coordinates, userDataProvider, shuttleDataProvider) { - print("UpdateProvider: shuttleDataProvider"); - shuttleDataProvider!.userCoords = coordinates; - shuttleDataProvider.userDataProvider = userDataProvider; - shuttleDataProvider.fetchStops(true); - return shuttleDataProvider; - }), - ChangeNotifierProxyProvider2(create: (_) { - SpeedTestProvider speedTestProvider = SpeedTestProvider(); - speedTestProvider.init(); - return speedTestProvider; - }, update: (_, coordinates, userDataProvider, speedTestProvider) { - speedTestProvider!.coordinates = coordinates; - speedTestProvider.userDataProvider = userDataProvider; - return speedTestProvider; - }), - ChangeNotifierProxyProvider(create: (_) { - var parkingDataProvider = ParkingDataProvider(); - return parkingDataProvider; - }, update: (_, userDataProvider, parkingDataProvider) { - parkingDataProvider!.userDataProvider = userDataProvider; - parkingDataProvider.fetchParkingData(); - return parkingDataProvider; - }), + // Staff card activation + final bool isStaff = userDataProvider.userProfileModel.classifications?.staff ?? false; + if (isLoggedIn && isStaff) { + // Uses silent login, respect user preferences. + cardsDataProvider.activateStaffCardsForSilentLogin(); + } else { + cardsDataProvider.deactivateStaffCards(); + } + }); + return cardsDataProvider; + }, + ), + ChangeNotifierProxyProvider( + create: (_) { + var classDataProvider = ClassScheduleDataProvider(); + return classDataProvider; + }, + update: (_, userDataProvider, classScheduleDataProvider) { + classScheduleDataProvider!.userDataProvider = userDataProvider; + final bool isLoggedIn = userDataProvider.isLoggedIn; + final bool isNotLoading = !classScheduleDataProvider.isLoading; + if (isLoggedIn && isNotLoading) classScheduleDataProvider.fetchData(); + return classScheduleDataProvider; + }, + ), + ChangeNotifierProxyProvider( + create: (_) { + var studentIdDataProvider = StudentIdDataProvider(); + return studentIdDataProvider; + }, + update: (_, userDataProvider, studentIdDataProvider) { + studentIdDataProvider!.userDataProvider = userDataProvider; + // Verify that the user is logged in + final bool isLoggedIn = userDataProvider.isLoggedIn; + final bool isNotLoading = !studentIdDataProvider.isLoading; + if (isLoggedIn && isNotLoading) studentIdDataProvider.fetchData(); + return studentIdDataProvider; + }, + ), + ChangeNotifierProxyProvider( + create: (_) { + var employeeIdDataProvider = EmployeeIdDataProvider(); + return employeeIdDataProvider; + }, + update: (_, userDataProvider, employeeIdDataProvider) { + employeeIdDataProvider!.userDataProvider = userDataProvider; + // Verify that the user is logged in + final bool isLoggedIn = userDataProvider.isLoggedIn; + final bool isNotLoading = !employeeIdDataProvider.isLoading; + if (isLoggedIn && isNotLoading) employeeIdDataProvider.fetchData(); + return employeeIdDataProvider; + }, + ), + ChangeNotifierProxyProvider( + create: (_) { + var availabilityDataProvider = AvailabilityDataProvider(); + availabilityDataProvider.fetchAvailability(); + return availabilityDataProvider; + }, + update: (_, userDataProvider, availabilityDataProvider) { + availabilityDataProvider!.userDataProvider = userDataProvider; + return availabilityDataProvider; + }, + ), + ChangeNotifierProxyProvider2( + create: (_) { + var shuttleDataProvider = ShuttleDataProvider(); + return shuttleDataProvider; + }, + update: (_, coordinates, userDataProvider, shuttleDataProvider) { + print("UpdateProvider: shuttleDataProvider"); + shuttleDataProvider!.userCoords = coordinates; + shuttleDataProvider.userDataProvider = userDataProvider; + shuttleDataProvider.fetchStops(true); + return shuttleDataProvider; + }, + ), + ChangeNotifierProxyProvider2( + create: (_) { + SpeedTestProvider speedTestProvider = SpeedTestProvider(); + speedTestProvider.init(); + return speedTestProvider; + }, + update: (_, coordinates, userDataProvider, speedTestProvider) { + speedTestProvider!.coordinates = coordinates; + speedTestProvider.userDataProvider = userDataProvider; + return speedTestProvider; + }, + ), + ChangeNotifierProxyProvider( + create: (_) { + var parkingDataProvider = ParkingDataProvider(); + return parkingDataProvider; + }, + update: (_, userDataProvider, parkingDataProvider) { + parkingDataProvider!.userDataProvider = userDataProvider; + parkingDataProvider.fetchParkingData(); + return parkingDataProvider; + }, + ), ChangeNotifierProxyProvider( create: (_) { var messageDataProvider = MessagesDataProvider(); diff --git a/lib/app_router.dart b/lib/app_router.dart index 53ec03f2b..5e0dc4947 100644 --- a/lib/app_router.dart +++ b/lib/app_router.dart @@ -47,76 +47,100 @@ class Router { case RoutePaths.ONBOARDING_LOGIN: return MaterialPageRoute(builder: (_) => OnboardingLogin()); case RoutePaths.HOME: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(null); - return Home(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(null); + return Home(); + }, + ); case RoutePaths.MAP: return MaterialPageRoute(builder: (_) => EsriMap()); case RoutePaths.MAP_SEARCH: return MaterialPageRoute(builder: (_) => MapSearchView()); case RoutePaths.NOTIFICATIONS: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return NotificationsListView(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return NotificationsListView(); + }, + ); case RoutePaths.PROFILE: return MaterialPageRoute(builder: (_) => Profile()); case RoutePaths.NEWS_VIEW_ALL: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return NewsList(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return NewsList(); + }, + ); case RoutePaths.EVENTS_VIEW_ALL: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return EventsCardList(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return EventsCardList(); + }, + ); case RoutePaths.NEWS_DETAIL_VIEW: Item newsItem = settings.arguments as Item; - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return NewsDetailView(data: newsItem); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return NewsDetailView(data: newsItem); + }, + ); case RoutePaths.TGPT_CITATION_WEB: final String citationUrl = settings.arguments as String; - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return CitationWebView(initialUrl: citationUrl); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return CitationWebView(initialUrl: citationUrl); + }, + ); case RoutePaths.EVENT_DETAIL_VIEW: EventModel data = settings.arguments as EventModel; - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return EventDetailView(data: data); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return EventDetailView(data: data); + }, + ); case RoutePaths.EVENTS_ALL: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return EventsAll(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return EventsAll(); + }, + ); case RoutePaths.MANAGE_AVAILABILITY_VIEW: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return ManageAvailabilityView(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return ManageAvailabilityView(); + }, + ); case RoutePaths.AVAILABILITY_DETAILED_VIEW: SubLocations subLocation = settings.arguments as SubLocations; - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return AvailabilityDetailedView(subLocation: subLocation); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return AvailabilityDetailedView(subLocation: subLocation); + }, + ); case RoutePaths.DINING_VIEW_ALL_DINING_OPTIONS: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return DiningList(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return DiningList(); + }, + ); case RoutePaths.DINING_OPTION_DETAIL_VIEW: DiningModel data = settings.arguments as DiningModel; - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return DiningDetailView(data: data); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return DiningDetailView(data: data); + }, + ); case RoutePaths.DINING_PAYMENT_FILTER_VIEW: // Don't Change the app bar title for this view return MaterialPageRoute(builder: (_) => DiningFilterView()); @@ -133,61 +157,83 @@ class Router { // disclaimerEmail: disclaimerEmail, // )); case RoutePaths.MANAGE_PARKING_VIEW: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return ManageParkingView(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return ManageParkingView(); + }, + ); case RoutePaths.SPOT_TYPES_VIEW: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return SpotTypesView(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return SpotTypesView(); + }, + ); case RoutePaths.MANAGE_SHUTTLE_VIEW: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return ManageShuttleView(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return ManageShuttleView(); + }, + ); case RoutePaths.ADD_SHUTTLE_STOPS_VIEW: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return AddShuttleStopsView(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return AddShuttleStopsView(); + }, + ); case RoutePaths.CARDS_VIEW: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return CardsView(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return CardsView(); + }, + ); case RoutePaths.NOTIFICATIONS_FILTER: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return NotificationsFilterView(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return NotificationsFilterView(); + }, + ); case RoutePaths.CLASS_SCHEDULE_VIEW_ALL: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name); - return ClassList(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name); + return ClassList(); + }, + ); case RoutePaths.PARKING_STRUCTURE_VIEW: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name, done: true); - return ParkingStructureView(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name, done: true); + return ParkingStructureView(); + }, + ); case RoutePaths.NEIGHBORHOODS_VIEW: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name, done: true); - return NeighborhoodsView(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name, done: true); + return NeighborhoodsView(); + }, + ); case RoutePaths.NEIGHBORHOODS_LOTS_VIEW: List data = settings.arguments as List; - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(settings.name, done: true); - return NeighborhoodLotsView(data); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(settings.name, done: true); + return NeighborhoodLotsView(data); + }, + ); default: - return MaterialPageRoute(builder: (context) { - Provider.of(context).changeTitle(null); - return Home(); - }); + return MaterialPageRoute( + builder: (context) { + Provider.of(context).changeTitle(null); + return Home(); + }, + ); } } } diff --git a/lib/app_styles.dart b/lib/app_styles.dart index 8edabcc07..5abe3fcbc 100644 --- a/lib/app_styles.dart +++ b/lib/app_styles.dart @@ -41,81 +41,105 @@ const Color systemErrorBackground = Color(0xFFF8E8E6); /* END Global Themes Configured in main.dart */ /* START Other Styles */ -final descriptiveTextSmallLight = TextStyle( - fontSize: 16.0, - color: descriptiveTextColorLight, -); +final descriptiveTextSmallLight = TextStyle(fontSize: 16.0, color: descriptiveTextColorLight); -final descriptiveTextSmallDark = TextStyle( - fontSize: 16.0, - color: descriptiveTextColorDark, -); +final descriptiveTextSmallDark = TextStyle(fontSize: 16.0, color: descriptiveTextColorDark); -const headerStyle = TextStyle( - fontFamily: 'Refrigerator Deluxe', - fontSize: 35, - fontWeight: FontWeight.w900, -); +const headerStyle = TextStyle(fontFamily: 'Refrigerator Deluxe', fontSize: 35, fontWeight: FontWeight.w900); + +const subHeaderStyle = TextStyle(fontFamily: 'Brix Sans', fontSize: 16.0, fontWeight: FontWeight.w500); -const subHeaderStyle = TextStyle( +final textButtonSmallLight = TextStyle( fontFamily: 'Brix Sans', - fontSize: 16.0, - fontWeight: FontWeight.w500, + fontSize: 22.0, + color: linkTextColorLight, + decoration: TextDecoration.underline, ); -final textButtonSmallLight = - TextStyle(fontFamily: 'Brix Sans', fontSize: 22.0, color: linkTextColorLight, decoration: TextDecoration.underline); - -final textButtonSmallDark = - TextStyle(fontFamily: 'Brix Sans', fontSize: 22.0, color: linkTextColorDark, decoration: TextDecoration.underline); +final textButtonSmallDark = TextStyle( + fontFamily: 'Brix Sans', + fontSize: 22.0, + color: linkTextColorDark, + decoration: TextDecoration.underline, +); const titleSmallLight = TextStyle( - fontFamily: 'Refrigerator Deluxe', - fontSize: 18.0, - letterSpacing: 0.8, - fontWeight: FontWeight.w900, - color: lightPrimaryColor); + fontFamily: 'Refrigerator Deluxe', + fontSize: 18.0, + letterSpacing: 0.8, + fontWeight: FontWeight.w900, + color: lightPrimaryColor, +); const titleSmallDark = TextStyle( - fontFamily: 'Refrigerator Deluxe', - fontSize: 18.0, - letterSpacing: 0.8, - fontWeight: FontWeight.w900, - color: Color(0xFFF5F0E6)); + fontFamily: 'Refrigerator Deluxe', + fontSize: 18.0, + letterSpacing: 0.8, + fontWeight: FontWeight.w900, + color: Color(0xFFF5F0E6), +); -const titleMediumLight = - TextStyle(fontFamily: 'Brix Sans', fontSize: 22.0, fontWeight: FontWeight.w700, color: lightPrimaryColor); +const titleMediumLight = TextStyle( + fontFamily: 'Brix Sans', + fontSize: 22.0, + fontWeight: FontWeight.w700, + color: lightPrimaryColor, +); -const titleMediumDark = - TextStyle(fontFamily: 'Brix Sans', fontSize: 22.0, fontWeight: FontWeight.w700, color: Colors.white); +const titleMediumDark = TextStyle( + fontFamily: 'Brix Sans', + fontSize: 22.0, + fontWeight: FontWeight.w700, + color: Colors.white, +); const headlineMediumLight = TextStyle( - fontFamily: 'Brix Sans', - fontSize: 20.0, - fontWeight: FontWeight.w700, - height: 1.2, - decoration: TextDecoration.underline, - color: linkColorLight); + fontFamily: 'Brix Sans', + fontSize: 20.0, + fontWeight: FontWeight.w700, + height: 1.2, + decoration: TextDecoration.underline, + color: linkColorLight, +); const headlineMediumDark = TextStyle( - fontFamily: 'Brix Sans', - fontSize: 20.0, - fontWeight: FontWeight.w700, - height: 1.2, - decoration: TextDecoration.underline, - color: linkColorDark); + fontFamily: 'Brix Sans', + fontSize: 20.0, + fontWeight: FontWeight.w700, + height: 1.2, + decoration: TextDecoration.underline, + color: linkColorDark, +); const headlineMediumLight2 = TextStyle( - fontFamily: 'Brix Sans', fontSize: 20.0, fontWeight: FontWeight.w700, height: 1.2, color: lightPrimaryColor); + fontFamily: 'Brix Sans', + fontSize: 20.0, + fontWeight: FontWeight.w700, + height: 1.2, + color: lightPrimaryColor, +); const headlineMediumDark2 = TextStyle( - fontFamily: 'Brix Sans', fontSize: 20.0, fontWeight: FontWeight.w700, height: 1.2, color: darkPrimaryColor2); + fontFamily: 'Brix Sans', + fontSize: 20.0, + fontWeight: FontWeight.w700, + height: 1.2, + color: darkPrimaryColor2, +); -const bodyMediumLight = - TextStyle(fontFamily: 'Brix Sans', fontSize: 22.0, fontWeight: FontWeight.w500, color: descriptiveTextColorLight); +const bodyMediumLight = TextStyle( + fontFamily: 'Brix Sans', + fontSize: 22.0, + fontWeight: FontWeight.w500, + color: descriptiveTextColorLight, +); -const bodyMediumDark = - TextStyle(fontFamily: 'Brix Sans', fontSize: 22.0, fontWeight: FontWeight.w500, color: descriptiveTextColorDark); +const bodyMediumDark = TextStyle( + fontFamily: 'Brix Sans', + fontSize: 22.0, + fontWeight: FontWeight.w500, + color: descriptiveTextColorDark, +); const appBarTitleStyle = TextStyle( fontFamily: 'Refrigerator Deluxe', @@ -124,8 +148,12 @@ const appBarTitleStyle = TextStyle( color: Colors.white, ); -const cardTitleStyleLight = - TextStyle(fontFamily: 'Refrigerator Deluxe', fontSize: 28, fontWeight: FontWeight.w900, color: lightPrimaryColor); +const cardTitleStyleLight = TextStyle( + fontFamily: 'Refrigerator Deluxe', + fontSize: 28, + fontWeight: FontWeight.w900, + color: lightPrimaryColor, +); const cardTitleStyleDark = TextStyle( fontFamily: 'Refrigerator Deluxe', @@ -151,27 +179,25 @@ const TextStyle labelLargeStyleDark = TextStyle( ); const labelMediumStyleLight = TextStyle( - fontFamily: 'Brix Sans', - fontSize: 22.0, - fontWeight: FontWeight.w400, - height: 1.0, - color: descriptiveTextColorLight); - -const labelMediumStyleDark = TextStyle( - fontFamily: 'Brix Sans', fontSize: 22.0, fontWeight: FontWeight.w400, height: 1.0, color: descriptiveTextColorDark); - -const TextStyle notificationsTitleLight = TextStyle( - color: linkTextColorLight, fontFamily: 'Brix Sans', - fontSize: 18, + fontSize: 22.0, + fontWeight: FontWeight.w400, + height: 1.0, + color: descriptiveTextColorLight, ); -const TextStyle notificationsTitleDark = TextStyle( - color: secondaryColorDark, +const labelMediumStyleDark = TextStyle( fontFamily: 'Brix Sans', - fontSize: 18, + fontSize: 22.0, + fontWeight: FontWeight.w400, + height: 1.0, + color: descriptiveTextColorDark, ); +const TextStyle notificationsTitleLight = TextStyle(color: linkTextColorLight, fontFamily: 'Brix Sans', fontSize: 18); + +const TextStyle notificationsTitleDark = TextStyle(color: secondaryColorDark, fontFamily: 'Brix Sans', fontSize: 18); + const TextStyle textSubheaderLight = TextStyle( color: lightPrimaryColor, fontFamily: 'Brix Sans', @@ -206,10 +232,18 @@ const TextStyle heading2StyleDark = TextStyle( ); const TextStyle linkTextDark = TextStyle( - fontFamily: 'Brix Sans', fontWeight: FontWeight.w400, decoration: TextDecoration.underline, color: linkColorDark); + fontFamily: 'Brix Sans', + fontWeight: FontWeight.w400, + decoration: TextDecoration.underline, + color: linkColorDark, +); const TextStyle linkTextLight = TextStyle( - fontFamily: 'Brix Sans', fontWeight: FontWeight.w400, decoration: TextDecoration.underline, color: linkColorLight); + fontFamily: 'Brix Sans', + fontWeight: FontWeight.w400, + decoration: TextDecoration.underline, + color: linkColorLight, +); const Color toggleActiveColor = Color(0xFF109B00); @@ -230,37 +264,31 @@ const cardContentMaxHeight = 568.0; const webViewMinHeight = 20.0; /// App Theme -const MaterialColor ColorPrimary = MaterialColor( - 0xFF182B49, - { - 50: Color(0xFF182B49), - 100: Color(0xFF182B49), - 200: Color(0xFF182B49), - 300: Color(0xFF182B49), - 400: Color(0xFF182B49), - 500: Color(0xFF182B49), - 600: Color(0xFF182B49), - 700: Color(0xFF182B49), - 800: Color(0xFF182B49), - 900: Color(0xFF182B49), - }, -); - -const MaterialColor ColorSecondary = MaterialColor( - 0xFF006A96, - { - 50: Color(0xFF006A96), - 100: Color(0xFF006A96), - 200: Color(0xFF006A96), - 300: Color(0xFF006A96), - 400: Color(0xFF006A96), - 500: Color(0xFF006A96), - 600: Color(0xFF006A96), - 700: Color(0xFF006A96), - 800: Color(0xFF006A96), - 900: Color(0xFF006A96), - }, -); +const MaterialColor ColorPrimary = MaterialColor(0xFF182B49, { + 50: Color(0xFF182B49), + 100: Color(0xFF182B49), + 200: Color(0xFF182B49), + 300: Color(0xFF182B49), + 400: Color(0xFF182B49), + 500: Color(0xFF182B49), + 600: Color(0xFF182B49), + 700: Color(0xFF182B49), + 800: Color(0xFF182B49), + 900: Color(0xFF182B49), +}); + +const MaterialColor ColorSecondary = MaterialColor(0xFF006A96, { + 50: Color(0xFF006A96), + 100: Color(0xFF006A96), + 200: Color(0xFF006A96), + 300: Color(0xFF006A96), + 400: Color(0xFF006A96), + 500: Color(0xFF006A96), + 600: Color(0xFF006A96), + 700: Color(0xFF006A96), + 800: Color(0xFF006A96), + 900: Color(0xFF006A96), +}); // Color for the top App Bar on light theme const AppBarTheme lightAppBarTheme = AppBarTheme(backgroundColor: ColorPrimary); @@ -280,14 +308,10 @@ const Color unselectedIconDarkColor = Color(0xFF6A6B6D); const noArrivalsFoundColor = "#747678"; // Colors for text on buttons using light theme -const TextTheme lightThemeText = TextTheme( - labelLarge: TextStyle(color: lightTextColor, fontSize: 20), -); +const TextTheme lightThemeText = TextTheme(labelLarge: TextStyle(color: lightTextColor, fontSize: 20)); // Colors for text on buttons using dark theme -const TextTheme darkThemeText = TextTheme( - labelLarge: TextStyle(color: darkTextColor, fontSize: 20), -); +const TextTheme darkThemeText = TextTheme(labelLarge: TextStyle(color: darkTextColor, fontSize: 20)); // Button color for themes const Color lightButtonColor = Color(0xFF034263); diff --git a/lib/core/models/authentication.dart b/lib/core/models/authentication.dart index 8039b2750..a5eca9aac 100644 --- a/lib/core/models/authentication.dart +++ b/lib/core/models/authentication.dart @@ -23,12 +23,7 @@ class AuthenticationModel extends HiveObject { @HiveField(4) int? expiration; - AuthenticationModel({ - this.accessToken, - this.pid, - this.ucsdaffiliation, - this.expiration, - }); + AuthenticationModel({this.accessToken, this.pid, this.ucsdaffiliation, this.expiration}); factory AuthenticationModel.fromJson(Map json) { return AuthenticationModel( @@ -40,11 +35,11 @@ class AuthenticationModel extends HiveObject { } Map toJson() => { - "access_token": accessToken == null ? null : accessToken, - "pid": pid == null ? null : pid, - "ucsdaffiliation": ucsdaffiliation == null ? "" : ucsdaffiliation, - "expiration": expiration == null ? null : expiration, - }; + "access_token": accessToken == null ? null : accessToken, + "pid": pid == null ? null : pid, + "ucsdaffiliation": ucsdaffiliation == null ? "" : ucsdaffiliation, + "expiration": expiration == null ? null : expiration, + }; /// Checks if the token we got back is expired bool isLoggedIn(DateTime? lastUpdated) { diff --git a/lib/core/models/authentication.g.dart b/lib/core/models/authentication.g.dart index 49577454a..563f32f13 100644 --- a/lib/core/models/authentication.g.dart +++ b/lib/core/models/authentication.g.dart @@ -12,9 +12,7 @@ class AuthenticationModelAdapter extends TypeAdapter { @override AuthenticationModel read(BinaryReader reader) { final numOfFields = reader.readByte(); - final fields = { - for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), - }; + final fields = {for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read()}; return AuthenticationModel( accessToken: fields[0] as String?, pid: fields[2] as String?, diff --git a/lib/core/models/availability.dart b/lib/core/models/availability.dart index 4d84b6628..f65865a1c 100644 --- a/lib/core/models/availability.dart +++ b/lib/core/models/availability.dart @@ -8,85 +8,85 @@ AvailabilityStatus availabilityStatusFromJson(String str) => AvailabilityStatus. String availabilityStatusToJson(AvailabilityStatus data) => json.encode(data.toJson()); class AvailabilityStatus { - AvailabilityStatus({ - required this.status, - required this.data, - required this.timestamp, - }); + AvailabilityStatus({required this.status, required this.data, required this.timestamp}); String status; List data; DateTime timestamp; factory AvailabilityStatus.fromJson(Map json) => AvailabilityStatus( - status: json["status"]!, - // TODO: rewrite this to be shorter! Functional style iterators?... - December 2025 - data: (() { - List returnList = - List.from(json["data"]!.map((x) => AvailabilityModel.fromJson(x))); - - // TODO: remove this line after the missing Markets data is fixed on the backend - December 2025 - // disable after json on cms is updated with correct endpoint name - // returnList.removeWhere((model) => model.name == "Markets"); - - for (int index = 0; index < returnList.length; index++) { - if (returnList[index].subLocations.length > 3) { - String baseName = returnList[index].name; - int baseId = returnList[index].id; - List baseSubLocations = returnList[index].subLocations; - returnList.removeAt(index); - index--; - int curPageIndex = 1; - int maxPageIndex = (baseSubLocations.length / 3).ceil(); - for (int i = 0; i < baseSubLocations.length; i += 3) { - index++; - List curSubList = - baseSubLocations.sublist(i, i + 3 > baseSubLocations.length ? baseSubLocations.length : i + 3); - String curName = baseName + " ($curPageIndex/$maxPageIndex)"; - returnList.insert(index, AvailabilityModel(id: baseId, name: curName, subLocations: curSubList)); - curPageIndex++; - } - } - } - return returnList; - })(), - timestamp: DateTime.parse(json["timestamp"]!), + status: json["status"]!, + // TODO: rewrite this to be shorter! Functional style iterators?... - December 2025 + data: (() { + List returnList = List.from( + json["data"]!.map((x) => AvailabilityModel.fromJson(x)), ); + // TODO: remove this line after the missing Markets data is fixed on the backend - December 2025 + // disable after json on cms is updated with correct endpoint name + // returnList.removeWhere((model) => model.name == "Markets"); + + for (int index = 0; index < returnList.length; index++) { + if (returnList[index].subLocations.length > 3) { + String baseName = returnList[index].name; + int baseId = returnList[index].id; + List baseSubLocations = returnList[index].subLocations; + returnList.removeAt(index); + index--; + int curPageIndex = 1; + int maxPageIndex = (baseSubLocations.length / 3).ceil(); + for (int i = 0; i < baseSubLocations.length; i += 3) { + index++; + List curSubList = baseSubLocations.sublist( + i, + i + 3 > baseSubLocations.length ? baseSubLocations.length : i + 3, + ); + String curName = baseName + " ($curPageIndex/$maxPageIndex)"; + returnList.insert(index, AvailabilityModel(id: baseId, name: curName, subLocations: curSubList)); + curPageIndex++; + } + } + } + return returnList; + })(), + timestamp: DateTime.parse(json["timestamp"]!), + ); + Map toJson() => { - "status": status, - "data": List.from(data.map((x) => x.toJson())), - "timestamp": timestamp.toIso8601String(), - }; + "status": status, + "data": List.from(data.map((x) => x.toJson())), + "timestamp": timestamp.toIso8601String(), + }; } class AvailabilityModel { - AvailabilityModel({ - required this.id, - required this.name, - required this.subLocations, - }); + AvailabilityModel({required this.id, required this.name, required this.subLocations}); int id; String name; List subLocations; factory AvailabilityModel.fromJson(Map json) => AvailabilityModel( - id: json["id"]!, - name: json["name"]!, - subLocations: List.from(json["childCounts"]!.map((x) => SubLocations.fromJson(x))), - ); + id: json["id"]!, + name: json["name"]!, + subLocations: List.from(json["childCounts"]!.map((x) => SubLocations.fromJson(x))), + ); Map toJson() => { - "id": id, - "name": name, - "childCounts": List.from(subLocations.map((x) => x.toJson())), - }; + "id": id, + "name": name, + "childCounts": List.from(subLocations.map((x) => x.toJson())), + }; } class SubLocations { - SubLocations( - {required this.id, required this.name, required this.percentage, required this.isActive, required this.floors}); + SubLocations({ + required this.id, + required this.name, + required this.percentage, + required this.isActive, + required this.floors, + }); int id; String name; @@ -95,14 +95,20 @@ class SubLocations { List floors; factory SubLocations.fromJson(Map json) => SubLocations( - id: json["id"]!, - name: json["name"]!, - percentage: json["percentage"]!.toDouble(), - isActive: json["isActive"]!, - floors: List.from(json["childCounts"]!.map((x) => Floor.fromJson(x)))); - - Map toJson() => - {"id": id, "name": name, "percentage": percentage, "isActive": isActive, "floors": floors}; + id: json["id"]!, + name: json["name"]!, + percentage: json["percentage"]!.toDouble(), + isActive: json["isActive"]!, + floors: List.from(json["childCounts"]!.map((x) => Floor.fromJson(x))), + ); + + Map toJson() => { + "id": id, + "name": name, + "percentage": percentage, + "isActive": isActive, + "floors": floors, + }; } class Floor { @@ -115,17 +121,12 @@ class Floor { bool isActive; factory Floor.fromJson(Map json) => Floor( - id: json["id"]!, - name: json["name"]!, - count: json["count"]!, - percentage: json["percentage"]!.toDouble(), - isActive: json["isActive"]!, - ); - - Map toJson() => { - "id": id, - "name": name, - "percentage": percentage, - "isActive": isActive, - }; + id: json["id"]!, + name: json["name"]!, + count: json["count"]!, + percentage: json["percentage"]!.toDouble(), + isActive: json["isActive"]!, + ); + + Map toJson() => {"id": id, "name": name, "percentage": percentage, "isActive": isActive}; } diff --git a/lib/core/models/cards.dart b/lib/core/models/cards.dart index 7dbf97d6f..560e80452 100644 --- a/lib/core/models/cards.dart +++ b/lib/core/models/cards.dart @@ -10,14 +10,15 @@ String cardsModelToJson(Map data) => json.encode(Map.from(data).map((k, v) => MapEntry(k, v.toJson()))); class CardsModel { - CardsModel( - {required this.cardActive, - required this.initialURL, - required this.isWebCard, - required this.requireAuth, - required this.titleText, - this.externalLinkURL = '', - this.externalLinkText = ''}); + CardsModel({ + required this.cardActive, + required this.initialURL, + required this.isWebCard, + required this.requireAuth, + required this.titleText, + this.externalLinkURL = '', + this.externalLinkText = '', + }); bool cardActive; String initialURL; @@ -28,22 +29,22 @@ class CardsModel { String externalLinkText; factory CardsModel.fromJson(Map json) => CardsModel( - cardActive: json["cardActive"]!, - initialURL: json["initialURL"]!, - isWebCard: json["isWebCard"]!, - requireAuth: json["requireAuth"]!, - titleText: json["titleText"]!, - externalLinkURL: json["externalLinkURL"] as String? ?? '', - externalLinkText: json["externalLinkText"] as String? ?? '', - ); + cardActive: json["cardActive"]!, + initialURL: json["initialURL"]!, + isWebCard: json["isWebCard"]!, + requireAuth: json["requireAuth"]!, + titleText: json["titleText"]!, + externalLinkURL: json["externalLinkURL"] as String? ?? '', + externalLinkText: json["externalLinkText"] as String? ?? '', + ); Map toJson() => { - "cardActive": cardActive, - "initialURL": initialURL, - "isWebCard": isWebCard, - "requireAuth": requireAuth, - "titleText": titleText, - "externalLinkURL": externalLinkURL, - "externalLinkText": externalLinkText, - }; + "cardActive": cardActive, + "initialURL": initialURL, + "isWebCard": isWebCard, + "requireAuth": requireAuth, + "titleText": titleText, + "externalLinkURL": externalLinkURL, + "externalLinkText": externalLinkText, + }; } diff --git a/lib/core/models/classes.dart b/lib/core/models/classes.dart index 87f173a63..1cb6155f6 100644 --- a/lib/core/models/classes.dart +++ b/lib/core/models/classes.dart @@ -11,19 +11,16 @@ class ClassScheduleModel { Metadata? metadata; List? data; - ClassScheduleModel({ - this.metadata, - this.data, - }); + ClassScheduleModel({this.metadata, this.data}); factory ClassScheduleModel.fromJson(Map json) => ClassScheduleModel( - metadata: json["metadata"] == null ? null : Metadata.fromJson(json["metadata"]), - data: json["data"] == null ? null : List.from(json["data"].map((x) => ClassData.fromJson(x))), - ); + metadata: json["metadata"] == null ? null : Metadata.fromJson(json["metadata"]), + data: json["data"] == null ? null : List.from(json["data"].map((x) => ClassData.fromJson(x))), + ); Map toJson() => { - "metadata": metadata == null ? null : metadata!.toJson(), - "data": data == null ? null : List.from(data!.map((x) => x.toJson())), - }; + "metadata": metadata == null ? null : metadata!.toJson(), + "data": data == null ? null : List.from(data!.map((x) => x.toJson())), + }; } class ClassData { @@ -54,34 +51,34 @@ class ClassData { }); factory ClassData.fromJson(Map json) => ClassData( - termCode: json["term_code"] == null ? null : json["term_code"], - subjectCode: json["subject_code"] == null ? null : json["subject_code"], - courseCode: json["course_code"] == null ? null : json["course_code"], - units: json["units"] == null ? null : json["units"], - courseLevel: json["course_level"] == null ? null : json["course_level"], - gradeOption: json["grade_option"] == null ? null : json["grade_option"], - grade: json["grade"] == null ? null : json["grade"], - courseTitle: json["course_title"] == null ? null : json["course_title"], - enrollmentStatus: json["enrollment_status"] == null ? null : json["enrollment_status"], - repeatCode: json["repeat_code"] == null ? null : json["repeat_code"], - sectionData: json["section_data"] == null - ? null - : List.from(json["section_data"].map((x) => SectionData.fromJson(x))), - ); + termCode: json["term_code"] == null ? null : json["term_code"], + subjectCode: json["subject_code"] == null ? null : json["subject_code"], + courseCode: json["course_code"] == null ? null : json["course_code"], + units: json["units"] == null ? null : json["units"], + courseLevel: json["course_level"] == null ? null : json["course_level"], + gradeOption: json["grade_option"] == null ? null : json["grade_option"], + grade: json["grade"] == null ? null : json["grade"], + courseTitle: json["course_title"] == null ? null : json["course_title"], + enrollmentStatus: json["enrollment_status"] == null ? null : json["enrollment_status"], + repeatCode: json["repeat_code"] == null ? null : json["repeat_code"], + sectionData: json["section_data"] == null + ? null + : List.from(json["section_data"].map((x) => SectionData.fromJson(x))), + ); Map toJson() => { - "term_code": termCode == null ? null : termCode, - "subject_code": subjectCode == null ? null : subjectCode, - "course_code": courseCode == null ? null : courseCode, - "units": units == null ? null : units, - "course_level": courseLevel == null ? null : courseLevel, - "grade_option": gradeOption == null ? null : gradeOption, - "grade": grade == null ? null : grade, - "course_title": courseTitle == null ? null : courseTitle, - "enrollment_status": enrollmentStatus == null ? null : enrollmentStatus, - "repeat_code": repeatCode == null ? null : repeatCode, - "section_data": sectionData == null ? null : List.from(sectionData!.map((x) => x.toJson())), - }; + "term_code": termCode == null ? null : termCode, + "subject_code": subjectCode == null ? null : subjectCode, + "course_code": courseCode == null ? null : courseCode, + "units": units == null ? null : units, + "course_level": courseLevel == null ? null : courseLevel, + "grade_option": gradeOption == null ? null : gradeOption, + "grade": grade == null ? null : grade, + "course_title": courseTitle == null ? null : courseTitle, + "enrollment_status": enrollmentStatus == null ? null : enrollmentStatus, + "repeat_code": repeatCode == null ? null : repeatCode, + "section_data": sectionData == null ? null : List.from(sectionData!.map((x) => x.toJson())), + }; } class SectionData { @@ -114,30 +111,30 @@ class SectionData { }); factory SectionData.fromJson(Map json) => SectionData( - section: json["section"], - meetingType: json["meeting_type"], - time: json["time"], - days: json["days"], - date: json["date"], - building: json["building"], - room: json["room"], - instructorName: json["instructor_name"], - specialMtgCode: json["special_mtg_code"], - enrollStatus: json["enrollStatus"], - ); + section: json["section"], + meetingType: json["meeting_type"], + time: json["time"], + days: json["days"], + date: json["date"], + building: json["building"], + room: json["room"], + instructorName: json["instructor_name"], + specialMtgCode: json["special_mtg_code"], + enrollStatus: json["enrollStatus"], + ); Map toJson() => { - "section": section, - "meeting_type": meetingType, - "time": time, - "days": days, - "date": date, - "building": building, - "room": room, - "instructor_name": instructorName, - "special_mtg_code": specialMtgCode, - "enrollStatus": enrollStatus, - }; + "section": section, + "meeting_type": meetingType, + "time": time, + "days": days, + "date": date, + "building": building, + "room": room, + "instructor_name": instructorName, + "special_mtg_code": specialMtgCode, + "enrollStatus": enrollStatus, + }; } class Metadata { diff --git a/lib/core/models/dining.dart b/lib/core/models/dining.dart index 8676b7c42..e9373afd3 100644 --- a/lib/core/models/dining.dart +++ b/lib/core/models/dining.dart @@ -54,49 +54,50 @@ class DiningModel { }); DiningModel.fromJson(Map json) - : id = json["id"], - name = json["name"] ?? "", - description = json["description"] ?? "", - location = json["location"] ?? "", - address = json["address"] ?? "", - tel = json["tel"] ?? "", - meals = json["meals"] == null ? null : mealsValues.map[json["meals"]], - persistentMenu = json["persistentMenu"], - paymentOptions = - json["paymentOptions"] == null ? [] : List.from(json["paymentOptions"].map((x) => x ?? "")), - paymentFilterTypes = json["paymentFilterTypes"] ?? "", - images = json["images"] == null ? null : List.from(json["images"].map((x) => Image.fromJson(x))), - coordinates = json["coords"] == null ? null : Coordinates.fromJson(json["coords"]), - regularHours = RegularHours.fromJson(json["regularHours"]), - specialHours = (json["specialHours"] == null || json["specialHours"].isEmpty) - ? null - : SpecialHour.fromJson(json["specialHours"]), - vendorLogo = json["vendorLogo"], - url = json["url"], - menuWebsite = json["menuWebsite"], - specials = json["specials"] == null ? null : Specials.fromJson(json["specials"]); + : id = json["id"], + name = json["name"] ?? "", + description = json["description"] ?? "", + location = json["location"] ?? "", + address = json["address"] ?? "", + tel = json["tel"] ?? "", + meals = json["meals"] == null ? null : mealsValues.map[json["meals"]], + persistentMenu = json["persistentMenu"], + paymentOptions = json["paymentOptions"] == null + ? [] + : List.from(json["paymentOptions"].map((x) => x ?? "")), + paymentFilterTypes = json["paymentFilterTypes"] ?? "", + images = json["images"] == null ? null : List.from(json["images"].map((x) => Image.fromJson(x))), + coordinates = json["coords"] == null ? null : Coordinates.fromJson(json["coords"]), + regularHours = RegularHours.fromJson(json["regularHours"]), + specialHours = (json["specialHours"] == null || json["specialHours"].isEmpty) + ? null + : SpecialHour.fromJson(json["specialHours"]), + vendorLogo = json["vendorLogo"], + url = json["url"], + menuWebsite = json["menuWebsite"], + specials = json["specials"] == null ? null : Specials.fromJson(json["specials"]); Map toJson() => { - "id": id, - "name": name, - "description": description, - "location": location, - "address": address, - "tel": tel, - "meals": meals == null ? null : mealsValues.reverse[meals!], - "persistentMenu": persistentMenu, - "paymentOptions": List.from(paymentOptions.map((x) => x)), - "paymentFilterTypes": paymentFilterTypes, - "images": images == null ? null : List.from(images!.map((x) => x.toJson())), - "coords": coordinates == null ? null : coordinates!.toJson(), - "regularHours": regularHours.toJson(), - "specialHours": specialHours?.toJson(), - "url": url, - "vendorLogo": vendorLogo, - "menuWebsite": menuWebsite, - "distance": distance, - "specials": specials?.toJson(), - }; + "id": id, + "name": name, + "description": description, + "location": location, + "address": address, + "tel": tel, + "meals": meals == null ? null : mealsValues.reverse[meals!], + "persistentMenu": persistentMenu, + "paymentOptions": List.from(paymentOptions.map((x) => x)), + "paymentFilterTypes": paymentFilterTypes, + "images": images == null ? null : List.from(images!.map((x) => x.toJson())), + "coords": coordinates == null ? null : coordinates!.toJson(), + "regularHours": regularHours.toJson(), + "specialHours": specialHours?.toJson(), + "url": url, + "vendorLogo": vendorLogo, + "menuWebsite": menuWebsite, + "distance": distance, + "specials": specials?.toJson(), + }; } class Image { @@ -107,28 +108,19 @@ class Image { // TODO: no caption is valid JSON response. Should this be empty str rather than null? - December 2025 String? caption; - Image({ - this.small, - this.large, - this.caption, - }); + Image({this.small, this.large, this.caption}); - Image.fromJson(Map json) - : small = json["small"], - large = json["large"], - caption = json["caption"]; + Image.fromJson(Map json) : small = json["small"], large = json["large"], caption = json["caption"]; - Map toJson() => { - "small": small, - "large": large, - "caption": caption, - }; + Map toJson() => {"small": small, "large": large, "caption": caption}; } enum Meals { BREAKFAST_LUNCH_DINNER, LUNCH_DINNER } -final mealsValues = - EnumValues({"breakfast, lunch, dinner": Meals.BREAKFAST_LUNCH_DINNER, "lunch, dinner": Meals.LUNCH_DINNER}); +final mealsValues = EnumValues({ + "breakfast, lunch, dinner": Meals.BREAKFAST_LUNCH_DINNER, + "lunch, dinner": Meals.LUNCH_DINNER, +}); class RegularHours { // ALL CONFIRMED OPTIONAL @@ -140,34 +132,18 @@ class RegularHours { String? sat; String? sun; - RegularHours({ - this.mon, - this.tue, - this.wed, - this.thu, - this.fri, - this.sat, - this.sun, - }); + RegularHours({this.mon, this.tue, this.wed, this.thu, this.fri, this.sat, this.sun}); RegularHours.fromJson(Map json) - : mon = json["mon"], - tue = json["tue"], - wed = json["wed"], - thu = json["thu"], - fri = json["fri"], - sat = json["sat"], - sun = json["sun"]; - - Map toJson() => { - "mon": mon, - "tue": tue, - "wed": wed, - "thu": thu, - "fri": fri, - "sat": sat, - "sun": sun, - }; + : mon = json["mon"], + tue = json["tue"], + wed = json["wed"], + thu = json["thu"], + fri = json["fri"], + sat = json["sat"], + sun = json["sun"]; + + Map toJson() => {"mon": mon, "tue": tue, "wed": wed, "thu": thu, "fri": fri, "sat": sat, "sun": sun}; } class SpecialHour { @@ -178,24 +154,25 @@ class SpecialHour { String? specialHoursValidFrom; String? specialHoursValidTo; - SpecialHour( - {required this.specialHoursEvent, - required this.specialHoursEventDetails, - this.specialHoursValidFrom, - this.specialHoursValidTo}); + SpecialHour({ + required this.specialHoursEvent, + required this.specialHoursEventDetails, + this.specialHoursValidFrom, + this.specialHoursValidTo, + }); SpecialHour.fromJson(Map json) - : specialHoursEvent = json["specialHoursEvent"], - specialHoursEventDetails = json["specialHoursEventDetails"], - specialHoursValidFrom = json["specialHoursValidFrom"], - specialHoursValidTo = json["specialHoursValidTo"]; + : specialHoursEvent = json["specialHoursEvent"], + specialHoursEventDetails = json["specialHoursEventDetails"], + specialHoursValidFrom = json["specialHoursValidFrom"], + specialHoursValidTo = json["specialHoursValidTo"]; Map toJson() => { - "specialHoursEvent": specialHoursEvent, - "specialHoursEventDetails": specialHoursEventDetails, - "specialHoursValidFrom": specialHoursValidFrom, - "specialHoursValidTo": specialHoursValidTo - }; + "specialHoursEvent": specialHoursEvent, + "specialHoursEventDetails": specialHoursEventDetails, + "specialHoursValidFrom": specialHoursValidFrom, + "specialHoursValidTo": specialHoursValidTo, + }; } class Specials { @@ -203,41 +180,31 @@ class Specials { String? specialTitle; PromoDates? promoDates; - Specials({ - this.specialDescription, - this.specialTitle, - this.promoDates, - }); + Specials({this.specialDescription, this.specialTitle, this.promoDates}); Specials.fromJson(Map json) - : specialDescription = json["specialDescription"], - specialTitle = json["specialTitle"], - promoDates = json["promoDates"] == null ? null : PromoDates.fromJson(json["promoDates"]); + : specialDescription = json["specialDescription"], + specialTitle = json["specialTitle"], + promoDates = json["promoDates"] == null ? null : PromoDates.fromJson(json["promoDates"]); Map toJson() => { - "specialDescription": specialDescription, - "specialTitle": specialTitle, - "promoDates": promoDates?.toJson(), - }; + "specialDescription": specialDescription, + "specialTitle": specialTitle, + "promoDates": promoDates?.toJson(), + }; } class PromoDates { int? startDate; int? endDate; - PromoDates({ - this.startDate, - this.endDate, - }); + PromoDates({this.startDate, this.endDate}); PromoDates.fromJson(Map json) - : startDate = json["startDate"] is String ? int.tryParse(json["startDate"]) : json["startDate"], - endDate = json["endDate"] is String ? int.tryParse(json["endDate"]) : json["endDate"]; + : startDate = json["startDate"] is String ? int.tryParse(json["startDate"]) : json["startDate"], + endDate = json["endDate"] is String ? int.tryParse(json["endDate"]) : json["endDate"]; - Map toJson() => { - "startDate": startDate, - "endDate": endDate, - }; + Map toJson() => {"startDate": startDate, "endDate": endDate}; } class EnumValues { diff --git a/lib/core/models/dining_menu.dart b/lib/core/models/dining_menu.dart index dce643fdb..83f2f477c 100644 --- a/lib/core/models/dining_menu.dart +++ b/lib/core/models/dining_menu.dart @@ -12,24 +12,20 @@ class DiningMenuItemsModel { String? disclaimer; String? disclaimerEmail; - DiningMenuItemsModel({ - this.menuItems, - this.disclaimer, - this.disclaimerEmail, - }); + DiningMenuItemsModel({this.menuItems, this.disclaimer, this.disclaimerEmail}); DiningMenuItemsModel.fromJson(Map json) - : menuItems = json["menuitems"] != null - ? List.from(json["menuitems"].map((x) => DiningMenuItem.fromJson(x))) - : [], - disclaimer = json["disclaimer"], - disclaimerEmail = json["disclaimerEmail"]; + : menuItems = json["menuitems"] != null + ? List.from(json["menuitems"].map((x) => DiningMenuItem.fromJson(x))) + : [], + disclaimer = json["disclaimer"], + disclaimerEmail = json["disclaimerEmail"]; Map toJson() => { - "menuitems": menuItems!.isNotEmpty ? List.from(menuItems!.map((x) => x.toJson())) : null, - "disclaimer": disclaimer, - "disclaimerEmail": disclaimerEmail, - }; + "menuitems": menuItems!.isNotEmpty ? List.from(menuItems!.map((x) => x.toJson())) : null, + "disclaimer": disclaimer, + "disclaimerEmail": disclaimerEmail, + }; } class DiningMenuItem { @@ -53,23 +49,23 @@ class DiningMenuItem { }); DiningMenuItem.fromJson(Map json) - : name = json["name"] ?? "", - itemId = json["itemID"], - station = json["station"], - price = json["price"] ?? "", - images = json["images"], - tags = json["tags"] ?? "", - nutrition = json["nutrition"] != null ? Nutrition.fromJson(json["nutrition"]) : Nutrition(); + : name = json["name"] ?? "", + itemId = json["itemID"], + station = json["station"], + price = json["price"] ?? "", + images = json["images"], + tags = json["tags"] ?? "", + nutrition = json["nutrition"] != null ? Nutrition.fromJson(json["nutrition"]) : Nutrition(); Map toJson() => { - "name": name, - "itemID": itemId, - "station": station, - "price": price, - "images": images, - "tags": tags, - "nutrition": nutrition.toJson(), - }; + "name": name, + "itemID": itemId, + "station": station, + "price": price, + "images": images, + "tags": tags, + "nutrition": nutrition.toJson(), + }; } class Nutrition { @@ -122,51 +118,51 @@ class Nutrition { }); Nutrition.fromJson(Map json) - : servingSize = json["servingSize"], - calories = json["calories"], - totalFat = json["totalFat"], - totalFatDv = json["totalFat_DV"], - saturatedFat = json["saturatedFat"], - saturatedFatDv = json["saturatedFat_DV"], - transFat = json["transFat"], - transFatDv = json["transFat_DV"], - cholesterol = json["cholesterol"], - cholesterolDv = json["cholesterol_DV"], - sodium = json["sodium"], - sodiumDv = json["sodium_DV"], - totalCarbohydrate = json["totalCarbohydrate"], - totalCarbohydrateDv = json["totalCarbohhdrate_DV"], - dietaryFiber = json["dietaryFiber"], - dietaryFiberDv = json["dietaryFiber_DV"], - sugar = json["sugars"], - sugarDv = json["sugars_DV"], - protein = json["protein"], - proteinDv = json["protein_DV"], - ingredients = json["ingredients"], - allergens = json["allergens"]; + : servingSize = json["servingSize"], + calories = json["calories"], + totalFat = json["totalFat"], + totalFatDv = json["totalFat_DV"], + saturatedFat = json["saturatedFat"], + saturatedFatDv = json["saturatedFat_DV"], + transFat = json["transFat"], + transFatDv = json["transFat_DV"], + cholesterol = json["cholesterol"], + cholesterolDv = json["cholesterol_DV"], + sodium = json["sodium"], + sodiumDv = json["sodium_DV"], + totalCarbohydrate = json["totalCarbohydrate"], + totalCarbohydrateDv = json["totalCarbohhdrate_DV"], + dietaryFiber = json["dietaryFiber"], + dietaryFiberDv = json["dietaryFiber_DV"], + sugar = json["sugars"], + sugarDv = json["sugars_DV"], + protein = json["protein"], + proteinDv = json["protein_DV"], + ingredients = json["ingredients"], + allergens = json["allergens"]; Map toJson() => { - "servingSize": servingSize, - "calories": calories, - "totalFat": totalFat, - "totalFat_DV": totalFatDv, - "saturatedFat": saturatedFat, - "saturatedFat_DV": saturatedFatDv, - "transFat": transFat, - "transFat_DV": transFatDv, - "cholesterol": cholesterol, - "cholesterol_DV": cholesterolDv, - "sodium": sodium, - "sodium_DV": sodiumDv, - "totalCarbohydrate": totalCarbohydrate, - "totalCarbohhdrate_DV": totalCarbohydrateDv, - "dietaryFiber": dietaryFiber, - "dietaryFiber_DV": dietaryFiberDv, - "sugar": sugar, - "sugar_DV": sugarDv, - "protein": protein, - "protein_DV": proteinDv, - "ingredients": ingredients, - "allergens": allergens, - }; + "servingSize": servingSize, + "calories": calories, + "totalFat": totalFat, + "totalFat_DV": totalFatDv, + "saturatedFat": saturatedFat, + "saturatedFat_DV": saturatedFatDv, + "transFat": transFat, + "transFat_DV": transFatDv, + "cholesterol": cholesterol, + "cholesterol_DV": cholesterolDv, + "sodium": sodium, + "sodium_DV": sodiumDv, + "totalCarbohydrate": totalCarbohydrate, + "totalCarbohhdrate_DV": totalCarbohydrateDv, + "dietaryFiber": dietaryFiber, + "dietaryFiber_DV": dietaryFiberDv, + "sugar": sugar, + "sugar_DV": sugarDv, + "protein": protein, + "protein_DV": proteinDv, + "ingredients": ingredients, + "allergens": allergens, + }; } diff --git a/lib/core/models/employee_id.dart b/lib/core/models/employee_id.dart index a6a923e45..357bbf47b 100644 --- a/lib/core/models/employee_id.dart +++ b/lib/core/models/employee_id.dart @@ -25,21 +25,22 @@ class EmployeeIdModel { dynamic classificationType; factory EmployeeIdModel.fromJson(Map json) => EmployeeIdModel( - employeePreferredDisplayName: - json["Employee Preferred Display Name"] == null ? "" : json["Employee Preferred Display Name"], - employeeId: json["Employee ID"] == null ? "" : json["Employee ID"], - department: json["Department"] == null ? "" : json["Department"], - barcode: json["Barcode"] == null ? "" : json["Barcode"], - photo: json["Photo"], // Keep null as null for proper base64 handling - classificationType: json["Classification Type"] == null ? "Employee" : json["Classification Type"], - ); + employeePreferredDisplayName: json["Employee Preferred Display Name"] == null + ? "" + : json["Employee Preferred Display Name"], + employeeId: json["Employee ID"] == null ? "" : json["Employee ID"], + department: json["Department"] == null ? "" : json["Department"], + barcode: json["Barcode"] == null ? "" : json["Barcode"], + photo: json["Photo"], // Keep null as null for proper base64 handling + classificationType: json["Classification Type"] == null ? "Employee" : json["Classification Type"], + ); Map toJson() => { - "Employee Preferred Display Name": employeePreferredDisplayName == null ? "" : employeePreferredDisplayName, - "Employee ID": employeeId == null ? "" : employeeId, - "Department": department == null ? "" : department, - "Barcode": barcode == null ? "" : barcode, - "Photo": photo == null ? "" : photo, - "Classification Type": classificationType == null ? "Employee" : classificationType, - }; + "Employee Preferred Display Name": employeePreferredDisplayName == null ? "" : employeePreferredDisplayName, + "Employee ID": employeeId == null ? "" : employeeId, + "Department": department == null ? "" : department, + "Barcode": barcode == null ? "" : barcode, + "Photo": photo == null ? "" : photo, + "Classification Type": classificationType == null ? "Employee" : classificationType, + }; } diff --git a/lib/core/models/events.dart b/lib/core/models/events.dart index 2f8223f21..12f059a81 100644 --- a/lib/core/models/events.dart +++ b/lib/core/models/events.dart @@ -36,29 +36,29 @@ class EventModel { String? imageAltText; EventModel.fromJson(Map json) - : title = json["title"], - description = json["description"], - startDate = DateTime.parse(json["startDate"]), - endDate = DateTime.parse(json["endDate"]), - imageHQ = json["imageHQ"], - imageThumb = json["imageThumb"], - link = json["link"], - id = json["id"], - tags = json["tags"] == null ? null : List.from(json["tags"].map((x) => x)), - location = json["location"], - imageAltText = json["imageAltText"]; + : title = json["title"], + description = json["description"], + startDate = DateTime.parse(json["startDate"]), + endDate = DateTime.parse(json["endDate"]), + imageHQ = json["imageHQ"], + imageThumb = json["imageThumb"], + link = json["link"], + id = json["id"], + tags = json["tags"] == null ? null : List.from(json["tags"].map((x) => x)), + location = json["location"], + imageAltText = json["imageAltText"]; Map toJson() => { - "title": title, - "description": description, - "startDate": startDate, - "endDate": endDate, - "imageHQ": imageHQ, - "imageThumb": imageThumb, - "link": link, - "id": id, - "tags": tags == null ? null : List.from(tags!.map((x) => x)), - "location": location, - "imageAltText": imageAltText, - }; + "title": title, + "description": description, + "startDate": startDate, + "endDate": endDate, + "imageHQ": imageHQ, + "imageThumb": imageThumb, + "link": link, + "id": id, + "tags": tags == null ? null : List.from(tags!.map((x) => x)), + "location": location, + "imageAltText": imageAltText, + }; } diff --git a/lib/core/models/location.dart b/lib/core/models/location.dart index e6e9a3138..4fe2f1427 100644 --- a/lib/core/models/location.dart +++ b/lib/core/models/location.dart @@ -3,18 +3,12 @@ class Coordinates { double? lat; double? lon; - Coordinates({ - this.lat, - this.lon, - }); + Coordinates({this.lat, this.lon}); factory Coordinates.fromJson(Map json) => Coordinates( - lat: json["lat"] == null ? null : double.parse(json["lat"]), - lon: json["lon"] == null ? null : double.parse(json["lon"]), - ); + lat: json["lat"] == null ? null : double.parse(json["lat"]), + lon: json["lon"] == null ? null : double.parse(json["lon"]), + ); - Map toJson() => { - "lat": lat == null ? null : lat, - "lon": lon == null ? null : lon, - }; + Map toJson() => {"lat": lat == null ? null : lat, "lon": lon == null ? null : lon}; } diff --git a/lib/core/models/map.dart b/lib/core/models/map.dart index b5de7c9d3..8dc76d5e3 100644 --- a/lib/core/models/map.dart +++ b/lib/core/models/map.dart @@ -39,32 +39,32 @@ class MapSearchModel { }); factory MapSearchModel.fromJson(Map json) => MapSearchModel( - title: json["title"] == null ? null : json["title"], - mkrEnabled: json["mkrEnabled"] == null ? null : json["mkrEnabled"], - mkrRegion: json["mkrRegion"] == null ? null : json["mkrRegion"], - location: json["location"] == null ? null : json["location"], - description: json["description"] == null ? null : json["description"], - mkrGroupid: json["mkrGroupid"] == null ? null : json["mkrGroupid"], - score: json["score"], - mkrLong: json["mkrLong"] == null ? null : json["mkrLong"].toDouble(), - mkrLat: json["mkrLat"] == null ? null : json["mkrLat"].toDouble(), - access: json["access"] == null ? null : json["access"], - url: json["url"] == null ? null : json["url"], - mkrMarkerid: json["mkrMarkerid"] == null ? null : json["mkrMarkerid"], - ); + title: json["title"] == null ? null : json["title"], + mkrEnabled: json["mkrEnabled"] == null ? null : json["mkrEnabled"], + mkrRegion: json["mkrRegion"] == null ? null : json["mkrRegion"], + location: json["location"] == null ? null : json["location"], + description: json["description"] == null ? null : json["description"], + mkrGroupid: json["mkrGroupid"] == null ? null : json["mkrGroupid"], + score: json["score"], + mkrLong: json["mkrLong"] == null ? null : json["mkrLong"].toDouble(), + mkrLat: json["mkrLat"] == null ? null : json["mkrLat"].toDouble(), + access: json["access"] == null ? null : json["access"], + url: json["url"] == null ? null : json["url"], + mkrMarkerid: json["mkrMarkerid"] == null ? null : json["mkrMarkerid"], + ); Map toJson() => { - "title": title == null ? null : title, - "mkrEnabled": mkrEnabled == null ? null : mkrEnabled, - "mkrRegion": mkrRegion == null ? null : mkrRegion, - "location": location == null ? null : location, - "description": description == null ? null : description, - "mkrGroupid": mkrGroupid == null ? null : mkrGroupid, - "score": score, - "mkrLong": mkrLong == null ? null : mkrLong, - "mkrLat": mkrLat == null ? null : mkrLat, - "access": access == null ? null : access, - "url": url == null ? null : url, - "mkrMarkerid": mkrMarkerid == null ? null : mkrMarkerid, - }; + "title": title == null ? null : title, + "mkrEnabled": mkrEnabled == null ? null : mkrEnabled, + "mkrRegion": mkrRegion == null ? null : mkrRegion, + "location": location == null ? null : location, + "description": description == null ? null : description, + "mkrGroupid": mkrGroupid == null ? null : mkrGroupid, + "score": score, + "mkrLong": mkrLong == null ? null : mkrLong, + "mkrLat": mkrLat == null ? null : mkrLat, + "access": access == null ? null : access, + "url": url == null ? null : url, + "mkrMarkerid": mkrMarkerid == null ? null : mkrMarkerid, + }; } diff --git a/lib/core/models/news.dart b/lib/core/models/news.dart index 8882d7c60..94ea3160e 100644 --- a/lib/core/models/news.dart +++ b/lib/core/models/news.dart @@ -10,15 +10,11 @@ String newsModelToJson(NewsModel data) => json.encode(data.toJson()); class NewsModel { List items; - NewsModel({ - List? items, - }) : items = items ?? []; + NewsModel({List? items}) : items = items ?? []; NewsModel.fromJson(Map json) : items = List.from(json["items"].map((x) => Item.fromJson(x))); - Map toJson() => { - "items": List.from(items.map((x) => x.toJson())), - }; + Map toJson() => {"items": List.from(items.map((x) => x.toJson()))}; } class Item { @@ -28,26 +24,20 @@ class Item { String link; String image; - Item({ - required this.date, - required this.title, - required this.description, - required this.link, - required this.image, - }); + Item({required this.date, required this.title, required this.description, required this.link, required this.image}); Item.fromJson(Map json) - : date = DateTime.parse(json["date"]), - title = json["title"], - description = json["description"].trim(), - link = json["link"], - image = json["image"]; + : date = DateTime.parse(json["date"]), + title = json["title"], + description = json["description"].trim(), + link = json["link"], + image = json["image"]; Map toJson() => { - "date": date.toIso8601String(), - "title": title, - "description": description.trim(), - "link": link, - "image": image, - }; + "date": date.toIso8601String(), + "title": title, + "description": description.trim(), + "link": link, + "image": image, + }; } diff --git a/lib/core/models/notices.dart b/lib/core/models/notices.dart index 7d28feab1..9eba51b5c 100644 --- a/lib/core/models/notices.dart +++ b/lib/core/models/notices.dart @@ -14,16 +14,12 @@ class NoticesModel { String imageUrl; String link; - NoticesModel({ - required this.title, - required this.imageUrl, - required this.link, - }); + NoticesModel({required this.title, required this.imageUrl, required this.link}); NoticesModel.fromJson(Map json) - : title = json[noticeTitleKey], - imageUrl = json[noticeBannerImageKey], - link = json[noticeBannerLinkKey]; + : title = json[noticeTitleKey], + imageUrl = json[noticeBannerImageKey], + link = json[noticeBannerLinkKey]; Map toJson() => {noticeTitleKey: title, noticeBannerImageKey: imageUrl, noticeBannerLinkKey: link}; } diff --git a/lib/core/models/notifications.dart b/lib/core/models/notifications.dart index 370fb2b48..6e57f92ab 100644 --- a/lib/core/models/notifications.dart +++ b/lib/core/models/notifications.dart @@ -14,8 +14,8 @@ class Messages { Messages({required this.messages, this.next}); Messages.fromJson(Map json) - : messages = List.from(json["messages"].map((x) => MessageElement.fromJson(x))), - next = json["next"]; + : messages = List.from(json["messages"].map((x) => MessageElement.fromJson(x))), + next = json["next"]; Map toJson() => {"messages": List.from(messages.map((x) => x.toJson())), "next": next}; } @@ -36,30 +36,28 @@ class MessageElement { int timestamp; MessageElement.fromJson(Map json) - : sender = json["sender"], - message = Message.fromJson(json["message"]), - messageId = json["messageId"], - audience = Audience.fromJson(json["audience"]), - timestamp = json["timestamp"]; + : sender = json["sender"], + message = Message.fromJson(json["message"]), + messageId = json["messageId"], + audience = Audience.fromJson(json["audience"]), + timestamp = json["timestamp"]; Map toJson() => { - "sender": sender, - "message": message.toJson(), - "messageId": messageId, - "audience": audience.toJson(), - "timestamp": timestamp, - }; + "sender": sender, + "message": message.toJson(), + "messageId": messageId, + "audience": audience.toJson(), + "timestamp": timestamp, + }; } class Audience { - Audience({ - this.topics, - }); + Audience({this.topics}); List? topics; // this is a direct message if it's null Audience.fromJson(Map json) - : topics = json["topics"] != null ? List.from(json["topics"].map((x) => x)) : null; + : topics = json["topics"] != null ? List.from(json["topics"].map((x) => x)) : null; Map toJson() => {"topics": topics != null ? List.from(topics!.map((x) => x)) : null}; } @@ -69,23 +67,15 @@ class Message { String title; Data data; - Message({ - required this.message, - required this.title, - required this.data, - }); + Message({required this.message, required this.title, required this.data}); Message.fromJson(Map json) - // Defaulting to empty strings until we figure out what should or should not be null on the backend - : message = json["message"] ?? "", - title = json["title"] ?? "", - data = Data.fromJson(json["data"]); + // Defaulting to empty strings until we figure out what should or should not be null on the backend + : message = json["message"] ?? "", + title = json["title"] ?? "", + data = Data.fromJson(json["data"]); - Map toJson() => { - "message": message, - "title": title, - "data": data.toJson(), - }; + Map toJson() => {"message": message, "title": title, "data": data.toJson()}; } class Data { diff --git a/lib/core/models/notifications_freefood.dart b/lib/core/models/notifications_freefood.dart index 470f9521a..542491a35 100644 --- a/lib/core/models/notifications_freefood.dart +++ b/lib/core/models/notifications_freefood.dart @@ -8,20 +8,12 @@ class FreeFoodModel { int? statusCode; Body body; - FreeFoodModel({ - this.statusCode, - required this.body, - }); - - factory FreeFoodModel.fromJson(Map json) => FreeFoodModel( - statusCode: json["statusCode"], - body: Body.fromJson(json["body"]), - ); - - Map toJson() => { - "statusCode": statusCode, - "body": body.toJson(), - }; + FreeFoodModel({this.statusCode, required this.body}); + + factory FreeFoodModel.fromJson(Map json) => + FreeFoodModel(statusCode: json["statusCode"], body: Body.fromJson(json["body"])); + + Map toJson() => {"statusCode": statusCode, "body": body.toJson()}; } class Body { @@ -30,12 +22,7 @@ class Body { Body({required this.count, required this.maxCount}); - Body.fromJson(Map json) - : count = json["count"] ?? 0, - maxCount = json["maxCount"] ?? 0; + Body.fromJson(Map json) : count = json["count"] ?? 0, maxCount = json["maxCount"] ?? 0; - Map toJson() => { - "count": count, - "maxCount": maxCount, - }; + Map toJson() => {"count": count, "maxCount": maxCount}; } diff --git a/lib/core/models/parking.dart b/lib/core/models/parking.dart index 51032ac6c..2a484f2f6 100644 --- a/lib/core/models/parking.dart +++ b/lib/core/models/parking.dart @@ -34,25 +34,25 @@ class ParkingModel { }); ParkingModel.fromJson(Map json) - : neighborhood = json["neighborhood"], - isStructure = json["isStructure"], - locationId = json["LocationId"], - locationName = json["LocationName"], - locationContext = json["LocationContext"], - locationProvider = json["LocationProvider"], - availability = json["Availability"] as Map, - lastUpdated = json["lastUpdated"] == null ? null : DateTime.parse(json["LastUpdated"]), - availabilityType = json["AvailabilityType"] == null ? null : json["AvailabilityType"]; + : neighborhood = json["neighborhood"], + isStructure = json["isStructure"], + locationId = json["LocationId"], + locationName = json["LocationName"], + locationContext = json["LocationContext"], + locationProvider = json["LocationProvider"], + availability = json["Availability"] as Map, + lastUpdated = json["lastUpdated"] == null ? null : DateTime.parse(json["LastUpdated"]), + availabilityType = json["AvailabilityType"] == null ? null : json["AvailabilityType"]; Map toJson() => { - "Neighborhood": neighborhood, - "isStructure": isStructure, - "LocationId": locationId, - "LocationName": locationName, - "LocationContext": locationContext, - "LocationProvider": locationProvider, - "Availability": availability, - "LastUpdated": lastUpdated?.toIso8601String(), - "AvailabilityType": availabilityType - }; + "Neighborhood": neighborhood, + "isStructure": isStructure, + "LocationId": locationId, + "LocationName": locationName, + "LocationContext": locationContext, + "LocationProvider": locationProvider, + "Availability": availability, + "LastUpdated": lastUpdated?.toIso8601String(), + "AvailabilityType": availabilityType, + }; } diff --git a/lib/core/models/shuttle.dart b/lib/core/models/shuttle.dart index 6e300240f..bdb25629b 100644 --- a/lib/core/models/shuttle.dart +++ b/lib/core/models/shuttle.dart @@ -21,20 +21,22 @@ class ShuttleModel { Color? color; List? stops = []; - ShuttleModel( - {this.displayOrder, - this.url, - this.customerRouteId, - this.id, - this.name, - this.shortName, - this.description, - this.routeType, - this.color, - this.stops}); + ShuttleModel({ + this.displayOrder, + this.url, + this.customerRouteId, + this.id, + this.name, + this.shortName, + this.description, + this.routeType, + this.color, + this.stops, + }); ShuttleModel.fromJson(Map json) { - json.forEach((key, value) => ShuttleModel( + json.forEach( + (key, value) => ShuttleModel( displayOrder: value["displayOrder"] == null ? null : value["displayOrder"], url: value["url"] == null ? null : value["lon"], customerRouteId: value["customerRouteId"] == null ? null : value["customerRouteId"], @@ -46,20 +48,22 @@ class ShuttleModel { color: value["color"] == null ? null : HexColor(value["color"]), stops: value["stops"] == null ? null - : value["stops"] - .entries - .map((entry) { - return (ShuttleStopModel.fromJson(entry.value)); - }) - .toList() - .cast())); + : value["stops"].entries + .map((entry) { + return (ShuttleStopModel.fromJson(entry.value)); + }) + .toList() + .cast(), + ), + ); } List getListOfShuttles(String str) { Map list = json.decode(str); List ret = []; list.forEach((key, value) { - ret.add(ShuttleModel( + ret.add( + ShuttleModel( displayOrder: value["displayOrder"] == null ? null : value["displayOrder"], url: value["url"] == null ? null : value["lon"], customerRouteId: value["customerRouteId"] == null ? null : value["customerRouteId"], @@ -71,29 +75,30 @@ class ShuttleModel { color: value["color"] == null ? null : HexColor(value["color"]), stops: value["stops"] == null ? null - : value["stops"] - .entries - .map((entry) { - return (ShuttleStopModel.fromJson(entry.value)); - }) - .toList() - .cast())); + : value["stops"].entries + .map((entry) { + return (ShuttleStopModel.fromJson(entry.value)); + }) + .toList() + .cast(), + ), + ); }); return ret; } Map toJson() => { - "displayOrder": displayOrder == null ? null : displayOrder, - "url": url == null ? null : url, - "customerRouteId": customerRouteId == null ? null : customerRouteId, - "id": id == null ? null : id, - "name": name == null ? null : name, - "shortName": shortName == null ? null : shortName, - "description": description == null ? null : description, - "routeType": routeType == null ? null : routeType, - "color": color == null ? null : '#${color!.toARGB32().toRadixString(16)}', - "stops": stops == null ? null : List.from(stops!.map((x) => x.toJson())) - }; + "displayOrder": displayOrder == null ? null : displayOrder, + "url": url == null ? null : url, + "customerRouteId": customerRouteId == null ? null : customerRouteId, + "id": id == null ? null : id, + "name": name == null ? null : name, + "shortName": shortName == null ? null : shortName, + "description": description == null ? null : description, + "routeType": routeType == null ? null : routeType, + "color": color == null ? null : '#${color!.toARGB32().toRadixString(16)}', + "stops": stops == null ? null : List.from(stops!.map((x) => x.toJson())), + }; } class HexColor extends Color { diff --git a/lib/core/models/shuttle_arrival.dart b/lib/core/models/shuttle_arrival.dart index 239fae01f..5ab0b9692 100644 --- a/lib/core/models/shuttle_arrival.dart +++ b/lib/core/models/shuttle_arrival.dart @@ -35,10 +35,10 @@ class ArrivingShuttle { } Map toJson() => { - "routeId": routeId, - "routeName": routeName, - "routeStopId": routeStopId, - "routeColor": routeColor, - "secondsToArrival": secondsToArrival - }; + "routeId": routeId, + "routeName": routeName, + "routeStopId": routeStopId, + "routeColor": routeColor, + "secondsToArrival": secondsToArrival, + }; } diff --git a/lib/core/models/shuttle_stop.dart b/lib/core/models/shuttle_stop.dart index bb926dc8c..064cedff6 100644 --- a/lib/core/models/shuttle_stop.dart +++ b/lib/core/models/shuttle_stop.dart @@ -19,23 +19,13 @@ class ShuttleStopModel { int id; String name; - ShuttleStopModel({ - required this.lat, - required this.lon, - required this.id, - required this.name, - }); + ShuttleStopModel({required this.lat, required this.lon, required this.id, required this.name}); ShuttleStopModel.fromJson(Map json) - : lat = json["lat"].toDouble(), - lon = json["lon"].toDouble(), - id = json["id"], - name = json["name"]; + : lat = json["lat"].toDouble(), + lon = json["lon"].toDouble(), + id = json["id"], + name = json["name"]; - Map toJson() => { - "lat": lat, - "lon": lon, - "id": id, - "name": name, - }; + Map toJson() => {"lat": lat, "lon": lon, "id": id, "name": name}; } diff --git a/lib/core/models/speed_test.dart b/lib/core/models/speed_test.dart index 0367a0556..dd4f0d2c4 100644 --- a/lib/core/models/speed_test.dart +++ b/lib/core/models/speed_test.dart @@ -24,52 +24,58 @@ class SpeedTestModel { double? downloadSpeed; double? uploadSpeed; - SpeedTestModel( - {this.isUCSDWifi, - this.uploadUrl, - this.downloadUrl, - this.platform, - this.ssid, - this.bssid, - this.ipAddress, - this.macAddress, - this.linkSpeed, - this.signalStrength, - this.frequency, - this.networkID, - this.isHiddenSSID, - this.routerIP, - this.channel, - this.latitude, - this.longitude, - this.timeStamp, - this.downloadSpeed, - this.uploadSpeed}); + SpeedTestModel({ + this.isUCSDWifi, + this.uploadUrl, + this.downloadUrl, + this.platform, + this.ssid, + this.bssid, + this.ipAddress, + this.macAddress, + this.linkSpeed, + this.signalStrength, + this.frequency, + this.networkID, + this.isHiddenSSID, + this.routerIP, + this.channel, + this.latitude, + this.longitude, + this.timeStamp, + this.downloadSpeed, + this.uploadSpeed, + }); factory SpeedTestModel.fromJson( - WifiInfo? wifiInfo, Map? downloadJson, Map? uploadJson, bool isUCSDWifi) { + WifiInfo? wifiInfo, + Map? downloadJson, + Map? uploadJson, + bool isUCSDWifi, + ) { if (wifiInfo == null) return SpeedTestModel(isUCSDWifi: false); return SpeedTestModel( - isUCSDWifi: isUCSDWifi, - uploadUrl: uploadJson!["signed_url"], - downloadUrl: downloadJson!["signed_url"], - platform: Platform.isAndroid ? "Android" : "iOS", - ssid: wifiInfo.ssid == null ? "" : wifiInfo.ssid, - bssid: wifiInfo.bssid == null ? "" : wifiInfo.bssid, - ipAddress: wifiInfo.ipAddress == null ? "" : wifiInfo.ipAddress, - macAddress: wifiInfo.macAddress == null ? "" : wifiInfo.macAddress, - linkSpeed: wifiInfo.linkSpeed == null ? "" : wifiInfo.linkSpeed, - signalStrength: wifiInfo.signalStrength == null ? "" : wifiInfo.signalStrength, - frequency: wifiInfo.frequency == null ? "" : wifiInfo.frequency, - networkID: wifiInfo.networkId == null ? "" : wifiInfo.networkId, - isHiddenSSID: wifiInfo.isHiddenSSID == null ? "" : wifiInfo.isHiddenSSID, - routerIP: wifiInfo.routerIp == null ? "" : wifiInfo.routerIp, - channel: wifiInfo.channel == null ? "" : wifiInfo.channel, - latitude: 0.0, - longitude: 0.0, - timeStamp: DateTime.fromMillisecondsSinceEpoch(DateTime.now().millisecondsSinceEpoch).toString(), - downloadSpeed: 0.0, - uploadSpeed: 0.0); + isUCSDWifi: isUCSDWifi, + uploadUrl: uploadJson!["signed_url"], + downloadUrl: downloadJson!["signed_url"], + platform: Platform.isAndroid ? "Android" : "iOS", + ssid: wifiInfo.ssid == null ? "" : wifiInfo.ssid, + bssid: wifiInfo.bssid == null ? "" : wifiInfo.bssid, + ipAddress: wifiInfo.ipAddress == null ? "" : wifiInfo.ipAddress, + macAddress: wifiInfo.macAddress == null ? "" : wifiInfo.macAddress, + linkSpeed: wifiInfo.linkSpeed == null ? "" : wifiInfo.linkSpeed, + signalStrength: wifiInfo.signalStrength == null ? "" : wifiInfo.signalStrength, + frequency: wifiInfo.frequency == null ? "" : wifiInfo.frequency, + networkID: wifiInfo.networkId == null ? "" : wifiInfo.networkId, + isHiddenSSID: wifiInfo.isHiddenSSID == null ? "" : wifiInfo.isHiddenSSID, + routerIP: wifiInfo.routerIp == null ? "" : wifiInfo.routerIp, + channel: wifiInfo.channel == null ? "" : wifiInfo.channel, + latitude: 0.0, + longitude: 0.0, + timeStamp: DateTime.fromMillisecondsSinceEpoch(DateTime.now().millisecondsSinceEpoch).toString(), + downloadSpeed: 0.0, + uploadSpeed: 0.0, + ); } } diff --git a/lib/core/models/spot_types.dart b/lib/core/models/spot_types.dart index 41f9ee63b..cc8410208 100644 --- a/lib/core/models/spot_types.dart +++ b/lib/core/models/spot_types.dart @@ -7,17 +7,12 @@ String spotTypeModelToJson(SpotTypeModel data) => json.encode(data.toJson()); class SpotTypeModel { List? spots; - SpotTypeModel({ - this.spots, - }); + SpotTypeModel({this.spots}); - factory SpotTypeModel.fromJson(Map json) => SpotTypeModel( - spots: json["spots"] == null ? null : List.from(json["spots"].map((x) => Spot.fromJson(x))), - ); + factory SpotTypeModel.fromJson(Map json) => + SpotTypeModel(spots: json["spots"] == null ? null : List.from(json["spots"].map((x) => Spot.fromJson(x)))); - Map toJson() => { - "spots": spots == null ? null : List.from(spots!.map((x) => x.toJson())), - }; + Map toJson() => {"spots": spots == null ? null : List.from(spots!.map((x) => x.toJson()))}; } class Spot { @@ -27,27 +22,21 @@ class Spot { String logoText; String logoTextColor; - Spot({ - this.spotKey = '', - this.name = '', - this.logoBackgroundColor = '', - this.logoText = '', - this.logoTextColor = '', - }); + Spot({this.spotKey = '', this.name = '', this.logoBackgroundColor = '', this.logoText = '', this.logoTextColor = ''}); factory Spot.fromJson(Map json) => Spot( - spotKey: json["key"] ?? '', - name: json["name"] ?? '', - logoBackgroundColor: json["logo_background_color"] ?? '', - logoText: json["logo_text"] == 'SR' ? 'RS' : (json["logo_text"] ?? ''), - logoTextColor: json["logo_text_color"] ?? '', - ); + spotKey: json["key"] ?? '', + name: json["name"] ?? '', + logoBackgroundColor: json["logo_background_color"] ?? '', + logoText: json["logo_text"] == 'SR' ? 'RS' : (json["logo_text"] ?? ''), + logoTextColor: json["logo_text_color"] ?? '', + ); Map toJson() => { - "key": spotKey, - "name": name, - "logo_background_color": logoBackgroundColor, - "logo_text": logoText, - "logo_text_color": logoTextColor, - }; + "key": spotKey, + "name": name, + "logo_background_color": logoBackgroundColor, + "logo_text": logoText, + "logo_text_color": logoTextColor, + }; } diff --git a/lib/core/models/student_id_name.dart b/lib/core/models/student_id_name.dart index ded7519f7..58ae60a5b 100644 --- a/lib/core/models/student_id_name.dart +++ b/lib/core/models/student_id_name.dart @@ -27,22 +27,22 @@ class StudentIdNameModel { }); factory StudentIdNameModel.fromJson(Map json) => StudentIdNameModel( - studentId: json["studentId"], - firstName: json["firstName"], - middleName: json["middleName"], - lastName: json["lastName"], - lastUpdatedBy: json["lastUpdatedBy"], - internalId: json["internalId"], - lastUpdatedDate: json["lastUpdatedDate"], - ); + studentId: json["studentId"], + firstName: json["firstName"], + middleName: json["middleName"], + lastName: json["lastName"], + lastUpdatedBy: json["lastUpdatedBy"], + internalId: json["internalId"], + lastUpdatedDate: json["lastUpdatedDate"], + ); Map toJson() => { - "studentId": studentId, - "firstName": firstName, - "middleName": middleName, - "lastName": lastName, - "lastUpdatedBy": lastUpdatedBy, - "internalId": internalId, - "lastUpdatedDate": lastUpdatedDate, - }; + "studentId": studentId, + "firstName": firstName, + "middleName": middleName, + "lastName": lastName, + "lastUpdatedBy": lastUpdatedBy, + "internalId": internalId, + "lastUpdatedDate": lastUpdatedDate, + }; } diff --git a/lib/core/models/student_id_profile.dart b/lib/core/models/student_id_profile.dart index a4ac7f007..ef1c93f3d 100644 --- a/lib/core/models/student_id_profile.dart +++ b/lib/core/models/student_id_profile.dart @@ -20,44 +20,47 @@ class StudentIdProfileModel { String classificationType; int issueNumber; - StudentIdProfileModel( - {this.studentPid = '', - this.termYear = '', - this.studentLevelCurrent = '', - this.collegeCurrent = '', - this.ugPrimaryMajorCurrent = '', - this.graduatePrimaryMajorCurrent = '', - this.athleteCurrentCount = 0, - this.cardNumber = '', - this.barcode = '', - this.classificationType = '', - this.issueNumber = 0}); + StudentIdProfileModel({ + this.studentPid = '', + this.termYear = '', + this.studentLevelCurrent = '', + this.collegeCurrent = '', + this.ugPrimaryMajorCurrent = '', + this.graduatePrimaryMajorCurrent = '', + this.athleteCurrentCount = 0, + this.cardNumber = '', + this.barcode = '', + this.classificationType = '', + this.issueNumber = 0, + }); factory StudentIdProfileModel.fromJson(Map json) => StudentIdProfileModel( - studentPid: json["Student_PID"], - termYear: json["Term_Year"], - studentLevelCurrent: json["Student_Level_Current"] == null ? "" : json["Student_Level_Current"], - collegeCurrent: json["College_Current"] == null ? "" : json["College_Current"], - ugPrimaryMajorCurrent: json["UG_Primary_Major_Current"] == null ? "" : json["UG_Primary_Major_Current"], - graduatePrimaryMajorCurrent: - json["Graduate_Primary_Major_Current"] == null ? "" : json["Graduate_Primary_Major_Current"], - athleteCurrentCount: json["Athlete_Current_Count"], - cardNumber: json["Card_Number"], - barcode: json["Barcode"], - classificationType: json["Classification_Type"], - issueNumber: json["Issue_Number"]); + studentPid: json["Student_PID"], + termYear: json["Term_Year"], + studentLevelCurrent: json["Student_Level_Current"] == null ? "" : json["Student_Level_Current"], + collegeCurrent: json["College_Current"] == null ? "" : json["College_Current"], + ugPrimaryMajorCurrent: json["UG_Primary_Major_Current"] == null ? "" : json["UG_Primary_Major_Current"], + graduatePrimaryMajorCurrent: json["Graduate_Primary_Major_Current"] == null + ? "" + : json["Graduate_Primary_Major_Current"], + athleteCurrentCount: json["Athlete_Current_Count"], + cardNumber: json["Card_Number"], + barcode: json["Barcode"], + classificationType: json["Classification_Type"], + issueNumber: json["Issue_Number"], + ); Map toJson() => { - "Student_PID": studentPid, - "Term_Year": termYear, - "Student_Level_Current": studentLevelCurrent, - "College_Current": collegeCurrent, - "UG_Primary_Major_Current": ugPrimaryMajorCurrent, - "Graduate_Primary_Major_Current": graduatePrimaryMajorCurrent, - "Athlete_Current_Count": athleteCurrentCount, - "Card_Number": cardNumber, - "Barcode": barcode, - "Classification_Type": classificationType, - "Issue_Number": issueNumber - }; + "Student_PID": studentPid, + "Term_Year": termYear, + "Student_Level_Current": studentLevelCurrent, + "College_Current": collegeCurrent, + "UG_Primary_Major_Current": ugPrimaryMajorCurrent, + "Graduate_Primary_Major_Current": graduatePrimaryMajorCurrent, + "Athlete_Current_Count": athleteCurrentCount, + "Card_Number": cardNumber, + "Barcode": barcode, + "Classification_Type": classificationType, + "Issue_Number": issueNumber, + }; } diff --git a/lib/core/models/term.dart b/lib/core/models/term.dart index 405e949f1..97fe6dff5 100644 --- a/lib/core/models/term.dart +++ b/lib/core/models/term.dart @@ -11,18 +11,10 @@ class AcademicTermModel { String? termName; String? termCode; - AcademicTermModel({ - this.termName, - this.termCode, - }); + AcademicTermModel({this.termName, this.termCode}); - factory AcademicTermModel.fromJson(Map json) => AcademicTermModel( - termName: json["term_name"], - termCode: json["term_code"], - ); + factory AcademicTermModel.fromJson(Map json) => + AcademicTermModel(termName: json["term_name"], termCode: json["term_code"]); - Map toJson() => { - "term_name": termName, - "term_code": termCode, - }; + Map toJson() => {"term_name": termName, "term_code": termCode}; } diff --git a/lib/core/models/tgpt_models/chat_history.dart b/lib/core/models/tgpt_models/chat_history.dart index b77fa4b24..c3e7b02b4 100644 --- a/lib/core/models/tgpt_models/chat_history.dart +++ b/lib/core/models/tgpt_models/chat_history.dart @@ -8,12 +8,7 @@ class ChatSessionMeta { final DateTime createdAt; final DateTime updatedAt; - ChatSessionMeta({ - required this.id, - required this.title, - required this.createdAt, - required this.updatedAt, - }); + ChatSessionMeta({required this.id, required this.title, required this.createdAt, required this.updatedAt}); ChatSessionMeta copyWith({String? title, DateTime? updatedAt}) { return ChatSessionMeta( @@ -25,16 +20,16 @@ class ChatSessionMeta { } Map toJson() => { - 'id': id, - 'title': title, - 'createdAt': createdAt.toIso8601String(), - 'updatedAt': updatedAt.toIso8601String(), - }; + 'id': id, + 'title': title, + 'createdAt': createdAt.toIso8601String(), + 'updatedAt': updatedAt.toIso8601String(), + }; static ChatSessionMeta fromJson(Map j) => ChatSessionMeta( - id: j['id'], - title: j['title'], - createdAt: DateTime.parse(j['createdAt']), - updatedAt: DateTime.parse(j['updatedAt']), - ); + id: j['id'], + title: j['title'], + createdAt: DateTime.parse(j['createdAt']), + updatedAt: DateTime.parse(j['updatedAt']), + ); } diff --git a/lib/core/models/tgpt_models/chat_message.dart b/lib/core/models/tgpt_models/chat_message.dart index 6424770d0..d6275293f 100644 --- a/lib/core/models/tgpt_models/chat_message.dart +++ b/lib/core/models/tgpt_models/chat_message.dart @@ -4,10 +4,7 @@ class ChatCitationReference { final int number; final String url; - const ChatCitationReference({ - required this.number, - required this.url, - }); + const ChatCitationReference({required this.number, required this.url}); /// Parses a citation object from legacy `citation_delta` arrays (`citation_num`) /// or new `citation_info` packets (`citation_number`). @@ -15,19 +12,13 @@ class ChatCitationReference { final Object? rawNumber = json['citation_num'] ?? json['citation_number']; final int? number = rawNumber is int ? rawNumber : int.tryParse(rawNumber?.toString() ?? ''); - return ChatCitationReference( - number: number ?? 0, - url: json['document_id']?.toString() ?? '', - ); + return ChatCitationReference(number: number ?? 0, url: json['document_id']?.toString() ?? ''); } } class AssistantMessageContent { /// Line-based `[rq] question` (mobile / legacy TGPT lines). - static final RegExp _relatedQuestionPattern = RegExp( - r'^(?:[-*]\s*)?\[rq\]\s*(.*)$', - caseSensitive: false, - ); + static final RegExp _relatedQuestionPattern = RegExp(r'^(?:[-*]\s*)?\[rq\]\s*(.*)$', caseSensitive: false); /// Markdown links `[label](#rq)` from web-style TGPT output. static final RegExp _rqMarkdownLink = RegExp(r'\[([^\]\n]+)\]\(\s*#rq\s*\)'); @@ -35,10 +26,7 @@ class AssistantMessageContent { /// Bullet line that is only `- [label](#rq)`. static final RegExp _bulletRqOnlyLine = RegExp(r'^\s*[-*+]\s*\[[^\]\n]+\]\(\s*#rq\s*\)\s*$'); - const AssistantMessageContent({ - required this.markdown, - this.relatedQuestions = const [], - }); + const AssistantMessageContent({required this.markdown, this.relatedQuestions = const []}); final String markdown; final List relatedQuestions; @@ -74,8 +62,7 @@ class AssistantMessageContent { if (hasRelatedQuestions && hasAnswerLines) { final String trailingLine = normalizedAnswerLines.last.trim().toLowerCase(); var isTrailingRelatedQuestions = trailingLine == 'related questions' || trailingLine == 'related questions:'; - if (isTrailingRelatedQuestions) - normalizedAnswerLines.removeLast(); + if (isTrailingRelatedQuestions) normalizedAnswerLines.removeLast(); } String markdown = _trimBlankLines(normalizedAnswerLines).join('\n'); @@ -83,18 +70,12 @@ class AssistantMessageContent { markdown = _collapseBlankLines(markdown).trim(); markdown = _stripTrailingRelatedQuestionsFromMarkdown(markdown, relatedQuestions); - return AssistantMessageContent( - markdown: markdown, - relatedQuestions: List.unmodifiable(relatedQuestions), - ); + return AssistantMessageContent(markdown: markdown, relatedQuestions: List.unmodifiable(relatedQuestions)); } /// TGPT web widget strips the related-questions block from the visible transcript; keep /// questions only in the dedicated UI ([...](#rq) hydrated separately from markdown). - static String _stripTrailingRelatedQuestionsFromMarkdown( - String markdown, - List relatedQuestions, - ) { + static String _stripTrailingRelatedQuestionsFromMarkdown(String markdown, List relatedQuestions) { var isInvalidInput = relatedQuestions.isEmpty || markdown.trim().isEmpty; if (isInvalidInput) return markdown; @@ -148,7 +129,10 @@ class AssistantMessageContent { static bool _isRelatedQuestionsHeadingLine(String line) { final String t = line.trim(); if (t.isEmpty) return false; - var hasAsteriskHeading = RegExp(r'^\*{0,2}\s*Related Questions\s*\*{0,2}\s*:?\s*$', caseSensitive: false).hasMatch(t); + var hasAsteriskHeading = RegExp( + r'^\*{0,2}\s*Related Questions\s*\*{0,2}\s*:?\s*$', + caseSensitive: false, + ).hasMatch(t); if (hasAsteriskHeading) return true; var hasHashHeading = RegExp(r'^#+\s*Related Questions\s*:?\s*$', caseSensitive: false).hasMatch(t); if (hasHashHeading) return true; @@ -208,11 +192,7 @@ class AssistantChatMessage { AssistantMessageContent get content => AssistantMessageContent.parse(text); - ChatMessagePersistent toPersistent({ - required String sessionId, - required String authorId, - String? parentMessageId, - }) { + ChatMessagePersistent toPersistent({required String sessionId, required String authorId, String? parentMessageId}) { return ChatMessagePersistent( id: id, text: text, diff --git a/lib/core/models/tgpt_models/chat_message_persistent.dart b/lib/core/models/tgpt_models/chat_message_persistent.dart index fc833835a..0bdfc137f 100644 --- a/lib/core/models/tgpt_models/chat_message_persistent.dart +++ b/lib/core/models/tgpt_models/chat_message_persistent.dart @@ -48,23 +48,23 @@ class ChatMessagePersistent extends HiveObject { /// Create a ChatMessagePersistent from JSON factory ChatMessagePersistent.fromJson(Map json) => ChatMessagePersistent( - id: json["id"], - text: json["text"], - authorId: json["author_id"] ?? json["authorId"], - createdAt: json["created_at"] ?? json["createdAt"], - isFromUser: json["is_from_user"] ?? json["isFromUser"], - sessionId: json["session_id"] ?? json["sessionId"], - parentMessageId: json["parent_message_id"] ?? json["parentMessageId"], - ); + id: json["id"], + text: json["text"], + authorId: json["author_id"] ?? json["authorId"], + createdAt: json["created_at"] ?? json["createdAt"], + isFromUser: json["is_from_user"] ?? json["isFromUser"], + sessionId: json["session_id"] ?? json["sessionId"], + parentMessageId: json["parent_message_id"] ?? json["parentMessageId"], + ); /// Convert to JSON map Map toJson() => { - "id": id, - "text": text, - "author_id": authorId, - "created_at": createdAt, - "is_from_user": isFromUser, - "session_id": sessionId, - "parent_message_id": parentMessageId, - }; + "id": id, + "text": text, + "author_id": authorId, + "created_at": createdAt, + "is_from_user": isFromUser, + "session_id": sessionId, + "parent_message_id": parentMessageId, + }; } diff --git a/lib/core/models/tgpt_models/chat_message_persistent.g.dart b/lib/core/models/tgpt_models/chat_message_persistent.g.dart index 94f914353..22420b69b 100644 --- a/lib/core/models/tgpt_models/chat_message_persistent.g.dart +++ b/lib/core/models/tgpt_models/chat_message_persistent.g.dart @@ -13,9 +13,7 @@ class ChatMessagePersistentAdapter extends TypeAdapter { @override ChatMessagePersistent read(BinaryReader reader) { final numOfFields = reader.readByte(); - final fields = { - for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), - }; + final fields = {for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read()}; return ChatMessagePersistent( id: fields[0] as String, text: fields[1] as String, diff --git a/lib/core/models/tgpt_models/chat_response.dart b/lib/core/models/tgpt_models/chat_response.dart index 787df22f5..2c986d5db 100644 --- a/lib/core/models/tgpt_models/chat_response.dart +++ b/lib/core/models/tgpt_models/chat_response.dart @@ -18,9 +18,9 @@ class BasicCreateChatMessageRequest { }); Map toJson() => { - 'message': message, - 'chat_session_id': chatSessionId, - 'parent_message_id': parentMessageId, - 'url': url, - }; + 'message': message, + 'chat_session_id': chatSessionId, + 'parent_message_id': parentMessageId, + 'url': url, + }; } diff --git a/lib/core/models/tgpt_models/chat_session.dart b/lib/core/models/tgpt_models/chat_session.dart index 073a5f3c8..efaa233d0 100644 --- a/lib/core/models/tgpt_models/chat_session.dart +++ b/lib/core/models/tgpt_models/chat_session.dart @@ -5,15 +5,10 @@ class ChatSessionCreationRequest { final int personaId; final String? description; - ChatSessionCreationRequest({ - required this.personaId, - this.description, - }); + ChatSessionCreationRequest({required this.personaId, this.description}); Map toJson() { - final Map json = { - 'persona_id': personaId, - }; + final Map json = {'persona_id': personaId}; if (description != null) json['description'] = description; @@ -25,14 +20,10 @@ class ChatSessionCreationRequest { class CreateChatSessionID { final String chatSessionId; - CreateChatSessionID({ - required this.chatSessionId, - }); + CreateChatSessionID({required this.chatSessionId}); factory CreateChatSessionID.fromJson(Map json) { - return CreateChatSessionID( - chatSessionId: json['chat_session_id'] as String, - ); + return CreateChatSessionID(chatSessionId: json['chat_session_id'] as String); } /// Defensive factory that handles both Map and JSON String responses. @@ -55,7 +46,5 @@ class CreateChatSessionID { return CreateChatSessionID.fromJson(json); } - Map toJson() => { - 'chat_session_id': chatSessionId, - }; + Map toJson() => {'chat_session_id': chatSessionId}; } diff --git a/lib/core/models/topics.dart b/lib/core/models/topics.dart index f6184f44f..1e7bbd4ad 100644 --- a/lib/core/models/topics.dart +++ b/lib/core/models/topics.dart @@ -12,58 +12,49 @@ class TopicsModel { String? audienceId; List? topics; - TopicsModel({ - this.audienceId, - this.topics, - }); + TopicsModel({this.audienceId, this.topics}); factory TopicsModel.fromJson(Map json) => TopicsModel( - audienceId: json["audienceId"] == null ? null : json["audienceId"], - topics: json["topics"] == null ? null : List.from(json["topics"].map((x) => Topic.fromJson(x))), - ); + audienceId: json["audienceId"] == null ? null : json["audienceId"], + topics: json["topics"] == null ? null : List.from(json["topics"].map((x) => Topic.fromJson(x))), + ); Map toJson() => { - "audienceId": audienceId == null ? null : audienceId, - "topics": topics == null ? null : List.from(topics!.map((x) => x.toJson())), - }; + "audienceId": audienceId == null ? null : audienceId, + "topics": topics == null ? null : List.from(topics!.map((x) => x.toJson())), + }; } class Topic { String? topicId; TopicMetadata? topicMetadata; - Topic({ - this.topicId, - this.topicMetadata, - }); + Topic({this.topicId, this.topicMetadata}); factory Topic.fromJson(Map json) => Topic( - topicId: json["topicId"] == null ? null : json["topicId"], - topicMetadata: json["topicMetadata"] == null ? null : TopicMetadata.fromJson(json["topicMetadata"]), - ); + topicId: json["topicId"] == null ? null : json["topicId"], + topicMetadata: json["topicMetadata"] == null ? null : TopicMetadata.fromJson(json["topicMetadata"]), + ); Map toJson() => { - "topicId": topicId == null ? null : topicId, - "topicMetadata": topicMetadata == null ? null : topicMetadata!.toJson(), - }; + "topicId": topicId == null ? null : topicId, + "topicMetadata": topicMetadata == null ? null : topicMetadata!.toJson(), + }; } class TopicMetadata { String? name; String? description; - TopicMetadata({ - this.name, - this.description, - }); + TopicMetadata({this.name, this.description}); factory TopicMetadata.fromJson(Map json) => TopicMetadata( - name: json["name"] == null ? null : json["name"], - description: json["description"] == null ? null : json["description"], - ); + name: json["name"] == null ? null : json["name"], + description: json["description"] == null ? null : json["description"], + ); Map toJson() => { - "name": name == null ? null : name, - "description": description == null ? null : description, - }; + "name": name == null ? null : name, + "description": description == null ? null : description, + }; } diff --git a/lib/core/models/user_profile.dart b/lib/core/models/user_profile.dart index 7480aaeee..5ed3f258c 100644 --- a/lib/core/models/user_profile.dart +++ b/lib/core/models/user_profile.dart @@ -34,87 +34,81 @@ class UserProfileModel extends HiveObject { @HiveField(7) List? selectedVentilationLocations; - UserProfileModel( - {this.classifications, - this.latestTimeStamp, - this.pid, - this.selectedLots, - this.selectedOccuspaceLocations, - this.subscribedTopics, - this.ucsdAffiliation, - this.username, - this.selectedParkingSpots, - this.selectedParkingLots, - this.selectedStops, - this.surveyCompletion, - this.selectedVentilationLocations}); + UserProfileModel({ + this.classifications, + this.latestTimeStamp, + this.pid, + this.selectedLots, + this.selectedOccuspaceLocations, + this.subscribedTopics, + this.ucsdAffiliation, + this.username, + this.selectedParkingSpots, + this.selectedParkingLots, + this.selectedStops, + this.surveyCompletion, + this.selectedVentilationLocations, + }); factory UserProfileModel.fromJson(Map json) => UserProfileModel( - classifications: json["classifications"] == null ? null : Classifications.fromJson(json["classifications"]), - latestTimeStamp: json["latestTimeStamp"] == null ? null : json["latestTimeStamp"], - pid: json["pid"] == null ? null : json["pid"], - selectedLots: json["selectedLots"] == null ? [] : List.from(json["selectedLots"].map((x) => x)), - selectedOccuspaceLocations: json["selectedOccuspaceLocations"] == null - ? [] - : List.from(json["selectedOccuspaceLocations"].map((x) => x)), - subscribedTopics: - json["subscribedTopics"] == null ? [] : List.from(json["subscribedTopics"].map((x) => x)), - ucsdAffiliation: json["ucsdaffiliation"] == null ? null : json["ucsdaffiliation"], - username: json["username"] == null ? null : json["username"], - selectedParkingLots: json["selectedParkingLots"] == null - ? Map() - : Map.from(json["selectedParkingLots"].map((x, y) => MapEntry(x, y))), - selectedParkingSpots: json["selectedParkingSpots"] == null - ? Map() - : Map.from(json["selectedParkingSpots"].map((x, y) => MapEntry(x, y))), - selectedStops: json["selectedStops"] == null ? [] : List.from(json["selectedStops"].map((x) => x)), - surveyCompletion: - json["surveyCompletion"] == null ? [] : List.from(json["surveyCompletion"].map((x) => x)), - selectedVentilationLocations: json['selectedVentilationLocations'] == null - ? [] - : List.from(json["selectedVentilationLocations"].map((x) => x)), - ); + classifications: json["classifications"] == null ? null : Classifications.fromJson(json["classifications"]), + latestTimeStamp: json["latestTimeStamp"] == null ? null : json["latestTimeStamp"], + pid: json["pid"] == null ? null : json["pid"], + selectedLots: json["selectedLots"] == null ? [] : List.from(json["selectedLots"].map((x) => x)), + selectedOccuspaceLocations: json["selectedOccuspaceLocations"] == null + ? [] + : List.from(json["selectedOccuspaceLocations"].map((x) => x)), + subscribedTopics: json["subscribedTopics"] == null ? [] : List.from(json["subscribedTopics"].map((x) => x)), + ucsdAffiliation: json["ucsdaffiliation"] == null ? null : json["ucsdaffiliation"], + username: json["username"] == null ? null : json["username"], + selectedParkingLots: json["selectedParkingLots"] == null + ? Map() + : Map.from(json["selectedParkingLots"].map((x, y) => MapEntry(x, y))), + selectedParkingSpots: json["selectedParkingSpots"] == null + ? Map() + : Map.from(json["selectedParkingSpots"].map((x, y) => MapEntry(x, y))), + selectedStops: json["selectedStops"] == null ? [] : List.from(json["selectedStops"].map((x) => x)), + surveyCompletion: json["surveyCompletion"] == null ? [] : List.from(json["surveyCompletion"].map((x) => x)), + selectedVentilationLocations: json['selectedVentilationLocations'] == null + ? [] + : List.from(json["selectedVentilationLocations"].map((x) => x)), + ); Map toJson() => { - "classifications": classifications == null ? null : classifications!.toJson(), - "latestTimeStamp": latestTimeStamp == null ? null : latestTimeStamp, - "pid": pid == null ? null : pid, - "selectedLots": selectedLots == null ? null : List.from(selectedLots!.map((x) => x)), - "selectedOccuspaceLocations": - selectedOccuspaceLocations == null ? null : List.from(selectedOccuspaceLocations!.map((x) => x)), - "subscribedTopics": subscribedTopics == null ? null : List.from(subscribedTopics!.map((x) => x)), - "ucsdaffiliation": ucsdAffiliation == null ? null : ucsdAffiliation, - "username": username == null ? null : username, - "selectedParkingLots": selectedParkingLots == null - ? null - : Map.from(selectedParkingLots!.map((x, y) => MapEntry(x, y))), - "selectedParkingSpots": selectedParkingSpots == null - ? null - : Map.from(selectedParkingSpots!.map((x, y) => MapEntry(x, y))), - "selectedStops": selectedStops == null ? null : List.from(selectedStops!.map((x) => x)), - "surveyCompletion": surveyCompletion == null ? null : List.from(surveyCompletion!.map((x) => x)), - "selectedVentilationLocations": selectedVentilationLocations == null - ? null - : List.from(selectedVentilationLocations!.map((x) => x)), - }; + "classifications": classifications == null ? null : classifications!.toJson(), + "latestTimeStamp": latestTimeStamp == null ? null : latestTimeStamp, + "pid": pid == null ? null : pid, + "selectedLots": selectedLots == null ? null : List.from(selectedLots!.map((x) => x)), + "selectedOccuspaceLocations": selectedOccuspaceLocations == null + ? null + : List.from(selectedOccuspaceLocations!.map((x) => x)), + "subscribedTopics": subscribedTopics == null ? null : List.from(subscribedTopics!.map((x) => x)), + "ucsdaffiliation": ucsdAffiliation == null ? null : ucsdAffiliation, + "username": username == null ? null : username, + "selectedParkingLots": selectedParkingLots == null + ? null + : Map.from(selectedParkingLots!.map((x, y) => MapEntry(x, y))), + "selectedParkingSpots": selectedParkingSpots == null + ? null + : Map.from(selectedParkingSpots!.map((x, y) => MapEntry(x, y))), + "selectedStops": selectedStops == null ? null : List.from(selectedStops!.map((x) => x)), + "surveyCompletion": surveyCompletion == null ? null : List.from(surveyCompletion!.map((x) => x)), + "selectedVentilationLocations": selectedVentilationLocations == null + ? null + : List.from(selectedVentilationLocations!.map((x) => x)), + }; } class Classifications { bool? student; bool? staff; - Classifications({ - this.student, - this.staff, - }); + Classifications({this.student, this.staff}); factory Classifications.fromJson(Map json) => Classifications( - student: json["student"] == null ? null : json["student"], - staff: json["staff"] == null ? null : json["staff"], - ); + student: json["student"] == null ? null : json["student"], + staff: json["staff"] == null ? null : json["staff"], + ); - Map toJson() => { - "student": student == null ? null : student, - "staff": staff == null ? null : staff, - }; + Map toJson() => {"student": student == null ? null : student, "staff": staff == null ? null : staff}; } diff --git a/lib/core/models/user_profile.g.dart b/lib/core/models/user_profile.g.dart index 54c012f96..b0a5886c5 100644 --- a/lib/core/models/user_profile.g.dart +++ b/lib/core/models/user_profile.g.dart @@ -12,9 +12,7 @@ class UserProfileModelAdapter extends TypeAdapter { @override UserProfileModel read(BinaryReader reader) { final numOfFields = reader.readByte(); - final fields = { - for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), - }; + final fields = {for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read()}; return UserProfileModel( selectedLots: (fields[0] as List?)?.cast(), selectedOccuspaceLocations: (fields[1] as List?)?.cast(), diff --git a/lib/core/providers/availability.dart b/lib/core/providers/availability.dart index f8f582d26..0c0cc176e 100644 --- a/lib/core/providers/availability.dart +++ b/lib/core/providers/availability.dart @@ -44,7 +44,6 @@ class AvailabilityDataProvider extends ChangeNotifier { if (hasNoSelectedLocations) newLocationViewState[curName] = _locationViewState[curName] ?? true; - /// otherwise, LocationViewState should be true for all selectedOccuspaceLocations else { newLocationViewState[curName] = _locationViewState[curName] ?? selectedLocations.contains(curName); diff --git a/lib/core/providers/cards.dart b/lib/core/providers/cards.dart index b40832821..4cabadd35 100644 --- a/lib/core/providers/cards.dart +++ b/lib/core/providers/cards.dart @@ -59,18 +59,11 @@ class CardsDataProvider extends ChangeNotifier { ]; // Native student cards - static const List _STUDENT_CARDS = [ - 'finals', - 'schedule', - 'student_id', - ]; + static const List _STUDENT_CARDS = ['finals', 'schedule', 'student_id']; // Native staff cards // TODO: removed 'staff_info', if needed re-add later - December 2025 - static const List _STAFF_CARDS = [ - 'my_ucsd_chart', - 'employee_id', - ]; + static const List _STAFF_CARDS = ['my_ucsd_chart', 'employee_id']; void updateAvailableCards(String? ucsdAffiliation) async { _isLoading = true; @@ -231,7 +224,9 @@ class CardsDataProvider extends ChangeNotifier { // by default all cards will be on if (_cardStateBox.get(DataPersistence.CARD_STATES) == null) { await _cardStateBox.put( - DataPersistence.CARD_STATES, _cardStates.keys.where((card) => _cardStates[card]!).toList()); + DataPersistence.CARD_STATES, + _cardStates.keys.where((card) => _cardStates[card]!).toList(), + ); } else { _deactivateAllCards(); } @@ -464,7 +459,8 @@ class CardsDataProvider extends ChangeNotifier { // User has explicitly set this card's state - restore their preference _cardStates[card] = _userToggledCards[card]!; print( - "DEBUG: activateStaffCardsForSilentLogin() - $card restored to user preference: ${_userToggledCards[card]}"); + "DEBUG: activateStaffCardsForSilentLogin() - $card restored to user preference: ${_userToggledCards[card]}", + ); } } diff --git a/lib/core/providers/chat_provider.dart b/lib/core/providers/chat_provider.dart index 95d442994..912ebd965 100644 --- a/lib/core/providers/chat_provider.dart +++ b/lib/core/providers/chat_provider.dart @@ -36,9 +36,8 @@ class ChatProvider extends ChangeNotifier { List get messages => List.unmodifiable(_messages); - List get sessions => List.unmodifiable( - _userDataProvider.isLoggedIn ? _persistedSessions : _guestSessions, - ); + List get sessions => + List.unmodifiable(_userDataProvider.isLoggedIn ? _persistedSessions : _guestSessions); bool get hasMessages => _messages.isNotEmpty; bool get isInitializing => _isInitializing; @@ -65,10 +64,7 @@ class ChatProvider extends ChangeNotifier { final String? savedSessionId = await _chatPersistenceService.loadSessionId(); final String? sessionToOpen = _resolveSessionToOpen(savedSessionId); if (sessionToOpen != null) { - await _loadPersistedSession( - sessionToOpen, - saveAsActive: savedSessionId != sessionToOpen, - ); + await _loadPersistedSession(sessionToOpen, saveAsActive: savedSessionId != sessionToOpen); } else { _messages.clear(); _activeSessionId = null; @@ -113,10 +109,7 @@ class ChatProvider extends ChangeNotifier { var isPreviousSessionNotEmpty = previousSessionId?.isNotEmpty ?? false; if (hasPreviousSession && isPreviousSessionNotEmpty) { _setSessionMessages(previousSessionId, _messages); - await _persistSessionState( - previousSessionId, - saveAsActive: false, - ); + await _persistSessionState(previousSessionId, saveAsActive: false); } _messages.clear(); @@ -172,8 +165,9 @@ class ChatProvider extends ChangeNotifier { return; } - final List sessionMessages = - List.from(_sessionMessagesById[sessionId] ?? _messages); + final List sessionMessages = List.from( + _sessionMessagesById[sessionId] ?? _messages, + ); final DateTime now = DateTime.now(); final AssistantChatMessage userMessage = AssistantChatMessage( @@ -195,15 +189,8 @@ class ChatProvider extends ChangeNotifier { ..add(placeholderMessage); _setSessionMessages(sessionId, sessionMessages); _streamingSessionIds.add(sessionId); - _upsertSessionMeta( - sessionId, - title: _sessionTitleForMessage(message), - updatedAt: now, - ); - await _persistSessionState( - sessionId, - saveAsActive: _activeSessionId == sessionId, - ); + _upsertSessionMeta(sessionId, title: _sessionTitleForMessage(message), updatedAt: now); + await _persistSessionState(sessionId, saveAsActive: _activeSessionId == sessionId); notifyListeners(); int? reservedAssistantMessageId; @@ -218,8 +205,9 @@ class ChatProvider extends ChangeNotifier { var hasMessageId = chunk.messageId != null; if (hasMessageId) reservedAssistantMessageId = chunk.messageId; - final int placeholderIndex = - sessionMessages.indexWhere((AssistantChatMessage item) => item.id == placeholderMessage.id); + final int placeholderIndex = sessionMessages.indexWhere( + (AssistantChatMessage item) => item.id == placeholderMessage.id, + ); if (placeholderIndex == -1) continue; final AssistantChatMessage currentMessage = sessionMessages[placeholderIndex]; @@ -238,8 +226,9 @@ class ChatProvider extends ChangeNotifier { } catch (e) { final String userMessage = e is DioException ? await tgptErrorMessageForDio(e) : tgptErrorMessageFor(e); _errorMessage = userMessage; - final int placeholderIndex = - sessionMessages.indexWhere((AssistantChatMessage item) => item.id == placeholderMessage.id); + final int placeholderIndex = sessionMessages.indexWhere( + (AssistantChatMessage item) => item.id == placeholderMessage.id, + ); if (placeholderIndex != -1) { sessionMessages[placeholderIndex] = sessionMessages[placeholderIndex].copyWith( text: userMessage, @@ -251,10 +240,7 @@ class ChatProvider extends ChangeNotifier { _parentMessageIdsBySession[sessionId] = reservedAssistantMessageId ?? _deriveParentMessageId(sessionMessages); _streamingSessionIds.remove(sessionId); _setSessionMessages(sessionId, sessionMessages); - await _persistSessionState( - sessionId, - saveAsActive: _activeSessionId == sessionId, - ); + await _persistSessionState(sessionId, saveAsActive: _activeSessionId == sessionId); notifyListeners(); } } @@ -279,15 +265,10 @@ class ChatProvider extends ChangeNotifier { return _activeSessionId; } - Future _loadPersistedSession( - String sessionId, { - required bool saveAsActive, - }) async { - final List persistedMessages = (await _chatPersistenceService - .loadMessagesForSession(sessionId)) - .map(AssistantChatMessage.fromPersistent) - .toList() - ..sort((a, b) => a.createdAt.compareTo(b.createdAt)); + Future _loadPersistedSession(String sessionId, {required bool saveAsActive}) async { + final List persistedMessages = (await _chatPersistenceService.loadMessagesForSession( + sessionId, + )).map(AssistantChatMessage.fromPersistent).toList()..sort((a, b) => a.createdAt.compareTo(b.createdAt)); _setSessionMessages(sessionId, persistedMessages, updateActiveSession: false); _messages @@ -301,10 +282,7 @@ class ChatProvider extends ChangeNotifier { notifyListeners(); } - Future _persistSessionState( - String sessionId, { - required bool saveAsActive, - }) async { + Future _persistSessionState(String sessionId, {required bool saveAsActive}) async { final List sessionMessages = _sessionMessagesById[sessionId] ?? const []; if (sessionId.isEmpty) return; @@ -330,11 +308,7 @@ class ChatProvider extends ChangeNotifier { _setSessionMessages(sessionId, sessionMessages, updateActiveSession: false); } - void _upsertSessionMeta( - String sessionId, { - required String title, - required DateTime updatedAt, - }) { + void _upsertSessionMeta(String sessionId, {required String title, required DateTime updatedAt}) { final List target = _userDataProvider.isLoggedIn ? _persistedSessions : _guestSessions; final int existingIndex = target.indexWhere((session) => session.id == sessionId); final DateTime createdAt = existingIndex == -1 ? updatedAt : target[existingIndex].createdAt; @@ -379,9 +353,7 @@ class ChatProvider extends ChangeNotifier { var hasSavedSessionId = savedSessionId != null; var isSavedSessionIdNotEmpty = savedSessionId?.isNotEmpty ?? false; if (hasSavedSessionId && isSavedSessionIdNotEmpty) { - final bool hasSavedSession = _persistedSessions.any( - (ChatSessionMeta session) => session.id == savedSessionId, - ); + final bool hasSavedSession = _persistedSessions.any((ChatSessionMeta session) => session.id == savedSessionId); if (hasSavedSession) return savedSessionId; } @@ -401,11 +373,7 @@ class ChatProvider extends ChangeNotifier { return uniqueSessions.values.toList(); } - void _setSessionMessages( - String sessionId, - List messages, { - bool updateActiveSession = true, - }) { + void _setSessionMessages(String sessionId, List messages, {bool updateActiveSession = true}) { final List copiedMessages = List.from(messages); _sessionMessagesById[sessionId] = copiedMessages; diff --git a/lib/core/providers/classes.dart b/lib/core/providers/classes.dart index 73997a10d..3399cc820 100644 --- a/lib/core/providers/classes.dart +++ b/lib/core/providers/classes.dart @@ -32,10 +32,7 @@ class ClassScheduleDataProvider extends ChangeNotifier { 'SU': [], 'OTHER': [], }; - Map> _midterms = { - 'MI': [], - 'OTHER': [], - }; + Map> _midterms = {'MI': [], 'OTHER': []}; /// MODELS late ClassScheduleModel _classScheduleModel; @@ -57,7 +54,7 @@ class ClassScheduleDataProvider extends ChangeNotifier { if (termFetched && isLoggedIn) { _academicTermModel = _classScheduleService.academicTermModel!; final Map headers = { - 'Authorization': 'Bearer ${_userDataProvider.authenticationModel.accessToken}' + 'Authorization': 'Bearer ${_userDataProvider.authenticationModel.accessToken}', }; /// erase old model @@ -90,32 +87,11 @@ class ClassScheduleDataProvider extends ChangeNotifier { } /// remove all old classes - _enrolledClasses = { - 'MO': [], - 'TU': [], - 'WE': [], - 'TH': [], - 'FR': [], - 'SA': [], - 'SU': [], - 'OTHER': [], - }; + _enrolledClasses = {'MO': [], 'TU': [], 'WE': [], 'TH': [], 'FR': [], 'SA': [], 'SU': [], 'OTHER': []}; - _finals = { - 'MO': [], - 'TU': [], - 'WE': [], - 'TH': [], - 'FR': [], - 'SA': [], - 'SU': [], - 'OTHER': [], - }; + _finals = {'MO': [], 'TU': [], 'WE': [], 'TH': [], 'FR': [], 'SA': [], 'SU': [], 'OTHER': []}; - _midterms = { - 'MI': [], - 'OTHER': [], - }; + _midterms = {'MI': [], 'OTHER': []}; try { _createMapOfClasses(); @@ -240,11 +216,9 @@ class ClassScheduleDataProvider extends ChangeNotifier { /// if no classes are scheduled for today then find the next day with classes var daysToAdd = 1; while (_enrolledClasses[today]!.isEmpty && daysToAdd <= 7) { - today = DateFormat('EEEE') - .format(DateTime.now().add(Duration(days: daysToAdd))) - .toString() - .toUpperCase() - .substring(0, 2); + today = DateFormat( + 'EEEE', + ).format(DateTime.now().add(Duration(days: daysToAdd))).toString().toUpperCase().substring(0, 2); nextDayWithClass = DateFormat('EEEE').format(DateTime.now().add(Duration(days: daysToAdd))); daysToAdd += 1; } diff --git a/lib/core/providers/connectivity.dart b/lib/core/providers/connectivity.dart index 9f91bfe8b..03b02e1ef 100644 --- a/lib/core/providers/connectivity.dart +++ b/lib/core/providers/connectivity.dart @@ -57,15 +57,16 @@ class InternetConnectivityProvider extends ChangeNotifier { ); Future.delayed( - Duration.zero, - () => { - showDialog( - context: context, - builder: (BuildContext ctx) { - return alert; - }, - ) - }); + Duration.zero, + () => { + showDialog( + context: context, + builder: (BuildContext ctx) { + return alert; + }, + ), + }, + ); } /// SIMPLE GETTERS diff --git a/lib/core/providers/dining.dart b/lib/core/providers/dining.dart index 9dbeaa398..e0e9864e9 100644 --- a/lib/core/providers/dining.dart +++ b/lib/core/providers/dining.dart @@ -69,7 +69,7 @@ class DiningDataProvider extends ChangeNotifier { .any((type) => _diningFilterTypeStates[type] == true)) // Add it to _filteredDiningModels as a key-value pair // Key: diningModel.name, Value: the whole diningModel - diningModel.name: diningModel + diningModel.name: diningModel, }; } @@ -111,7 +111,11 @@ class DiningDataProvider extends ChangeNotifier { for (DiningModel model in _diningModels.values.toList()) { if (model.coordinates != null) { var distance = calculateDistance( - _coordinates!.lat!, _coordinates!.lon!, model.coordinates!.lat!, model.coordinates!.lon!); + _coordinates!.lat!, + _coordinates!.lon!, + model.coordinates!.lat!, + model.coordinates!.lon!, + ); model.distance = distance.toDouble(); } else { model.distance = null; diff --git a/lib/core/providers/location.dart b/lib/core/providers/location.dart index b5a081972..947f523a5 100644 --- a/lib/core/providers/location.dart +++ b/lib/core/providers/location.dart @@ -11,10 +11,7 @@ class LocationDataProvider extends ChangeNotifier { late LocationPermission permission = LocationPermission.denied; /// SERVICES - final locationSettings = LocationSettings( - accuracy: LocationAccuracy.high, - distanceFilter: 100, - ); + final locationSettings = LocationSettings(accuracy: LocationAccuracy.high, distanceFilter: 100); var _locationController = StreamController.broadcast(); LocationDataProvider() { diff --git a/lib/core/providers/map.dart b/lib/core/providers/map.dart index 52d633cc1..79bc2d579 100644 --- a/lib/core/providers/map.dart +++ b/lib/core/providers/map.dart @@ -42,8 +42,10 @@ class MapsDataProvider extends ChangeNotifier { final Marker marker = Marker( markerId: MarkerId(_mapSearchModels[listIndex].mkrMarkerid.toString()), position: LatLng(_mapSearchModels[listIndex].mkrLat!, _mapSearchModels[listIndex].mkrLong!), - infoWindow: - InfoWindow(title: _mapSearchModels[listIndex].title, snippet: _mapSearchModels[listIndex].description), + infoWindow: InfoWindow( + title: _mapSearchModels[listIndex].title, + snippet: _mapSearchModels[listIndex].description, + ), ); _markers.clear(); _markers[marker.markerId] = marker; diff --git a/lib/core/providers/notifications.dart b/lib/core/providers/notifications.dart index c51f0d375..e5ac28f0d 100644 --- a/lib/core/providers/notifications.dart +++ b/lib/core/providers/notifications.dart @@ -58,11 +58,9 @@ class PushNotificationDataProvider extends ChangeNotifier { } /// listen for token changes and register user - _fcm.onTokenRefresh.listen( - (token) { - registerDevice(token); - }, - ); + _fcm.onTokenRefresh.listen((token) { + registerDevice(token); + }); } var flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); @@ -98,10 +96,14 @@ class PushNotificationDataProvider extends ChangeNotifier { const initializationSettingsAndroid = AndroidInitializationSettings("@drawable/ic_notif_round"); final initializationSettingsIOS = DarwinInitializationSettings(); - final initializationSettings = - InitializationSettings(android: initializationSettingsAndroid, iOS: initializationSettingsIOS); - await flutterLocalNotificationsPlugin.initialize(initializationSettings, - onDidReceiveNotificationResponse: selectNotification); + final initializationSettings = InitializationSettings( + android: initializationSettingsAndroid, + iOS: initializationSettingsIOS, + ); + await flutterLocalNotificationsPlugin.initialize( + initializationSettings, + onDidReceiveNotificationResponse: selectNotification, + ); if (Platform.isAndroid) await _createAndroidNotificationChannel(); RemoteMessage? initialMessage = await FirebaseMessaging.instance.getInitialMessage(); @@ -130,22 +132,21 @@ class PushNotificationDataProvider extends ChangeNotifier { Provider.of(context, listen: false).fetchMessages(true); }); - FirebaseMessaging.onMessageOpenedApp.listen( - (RemoteMessage message) { - _logRemoteMessage('onMessageOpenedApp', message); + FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) { + _logRemoteMessage('onMessageOpenedApp', message); - /// Fetch in-app messages - Provider.of(context, listen: false).fetchMessages(true); + /// Fetch in-app messages + Provider.of(context, listen: false).fetchMessages(true); - /// Set tab bar index to the Notifications tab - Provider.of(context, listen: false).currentIndex = - NavigatorConstants.NOTIFICATIONS_TAB; + /// Set tab bar index to the Notifications tab + Provider.of(context, listen: false).currentIndex = + NavigatorConstants.NOTIFICATIONS_TAB; - /// Navigate to Notifications tab - Navigator.of(context) - .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); - }, - ); + /// Navigate to Notifications tab + Navigator.of( + context, + ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + }); } on PlatformException { _error = 'Failed to get platform info.'; _platformStateInitialized = false; @@ -158,8 +159,9 @@ class PushNotificationDataProvider extends ChangeNotifier { Provider.of(this.context, listen: false).fetchMessages(true); /// Navigate to Notifications tab - Navigator.of(this.context) - .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of( + this.context, + ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); /// Set tab bar index to the Notifications tab Provider.of(this.context, listen: false).currentIndex = @@ -184,8 +186,10 @@ class PushNotificationDataProvider extends ChangeNotifier { showWhen: false, ); const DarwinNotificationDetails(); - const platformChannelSpecifics = - NotificationDetails(android: androidPlatformChannelSpecifics, iOS: DarwinNotificationDetails()); + const platformChannelSpecifics = NotificationDetails( + android: androidPlatformChannelSpecifics, + iOS: DarwinNotificationDetails(), + ); // This is where you put info from firebase try { await flutterLocalNotificationsPlugin.show( diff --git a/lib/core/providers/parking.dart b/lib/core/providers/parking.dart index e559c52b0..531e8b12f 100644 --- a/lib/core/providers/parking.dart +++ b/lib/core/providers/parking.dart @@ -53,8 +53,9 @@ class ParkingDataProvider extends ChangeNotifier { for (ParkingModel model in _parkingService.data!) { newMapOfLots[model.locationName] = model; - newMapOfLotStates[model.locationName] = - (_parkingViewState[model.locationName] == null ? false : _parkingViewState[model.locationName])!; + newMapOfLotStates[model.locationName] = (_parkingViewState[model.locationName] == null + ? false + : _parkingViewState[model.locationName])!; } /// replace old list of lots with new one @@ -79,9 +80,7 @@ class ParkingDataProvider extends ChangeNotifier { var hasSelectedParkingSpots = _userDataProvider.userProfileModel.selectedParkingSpots!.isNotEmpty; if (hasSelectedParkingSpots) { // Load selected spots types from user Profile - _selectedSpotTypesState = Map.from( - _userDataProvider.userProfileModel.selectedParkingSpots!, - ); + _selectedSpotTypesState = Map.from(_userDataProvider.userProfileModel.selectedParkingSpots!); } else { // Load default spot types for (Spot spot in _spotTypeModel.spots!) { @@ -112,7 +111,7 @@ class ParkingDataProvider extends ChangeNotifier { notifyListeners(); } -// add or remove location availability display from card based on user selection, Limit to MAX_SELECTED + // add or remove location availability display from card based on user selection, Limit to MAX_SELECTED void toggleLot(String location, int numSelected) { try { selectedLots = numSelected; @@ -186,7 +185,8 @@ class ParkingDataProvider extends ChangeNotifier { final bool hasOpenData = _parkingModels[locationId]!.availability[spot]['Open'] != null; final bool openDataNotEmpty = _parkingModels[locationId]!.availability[spot]['Open'] != ""; if (hasOpenData && openDataNotEmpty) { - totalAndOpenSpots["Open"] = totalAndOpenSpots["Open"]! + + totalAndOpenSpots["Open"] = + totalAndOpenSpots["Open"]! + (_parkingModels[locationId]!.availability[spot]['Open'] is String ? int.parse(_parkingModels[locationId]!.availability[spot]['Open']) : _parkingModels[locationId]!.availability[spot]['Open']); @@ -195,7 +195,8 @@ class ParkingDataProvider extends ChangeNotifier { final bool hasTotalData = _parkingModels[locationId]!.availability[spot]['Total'] != null; final bool totalDataNotEmpty = _parkingModels[locationId]!.availability[spot]['Total'] != ""; if (hasTotalData && totalDataNotEmpty) { - totalAndOpenSpots["Total"] = totalAndOpenSpots["Total"]! + + totalAndOpenSpots["Total"] = + totalAndOpenSpots["Total"]! + (_parkingModels[locationId]!.availability[spot]['Total'] is String ? int.parse(_parkingModels[locationId]!.availability[spot]['Total']) : _parkingModels[locationId]!.availability[spot]['Total']); diff --git a/lib/core/providers/shuttle.dart b/lib/core/providers/shuttle.dart index 7e35e87f6..aae9b5365 100644 --- a/lib/core/providers/shuttle.dart +++ b/lib/core/providers/shuttle.dart @@ -118,7 +118,8 @@ class ShuttleDataProvider extends ChangeNotifier { var r = 6371; // Radius of the earth in km var dLat = deg2rad(lat2 - lat1)!; // deg2rad below var dLon = deg2rad(lon2 - lon1)!; - var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + + var a = + Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(deg2rad(lat1)!) * Math.cos(deg2rad(lat2)!) * Math.sin(dLon / 2) * Math.sin(dLon / 2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); var d = r * c; // Distance in km diff --git a/lib/core/providers/speed_test.dart b/lib/core/providers/speed_test.dart index 1c05d477f..cff411651 100644 --- a/lib/core/providers/speed_test.dart +++ b/lib/core/providers/speed_test.dart @@ -34,9 +34,7 @@ class SpeedTestProvider extends ChangeNotifier { Map? wiFiLog; Map? offloadDataHeader; late Coordinates _coordinates; - final Map headers = { - "accept": "application/json", - }; + final Map headers = {"accept": "application/json"}; /// MODELS SpeedTestModel? _speedTestModel; @@ -113,8 +111,12 @@ class SpeedTestProvider extends ChangeNotifier { try { _cancelTokenUpload = new CancelToken(); _timer.start(); - await dio.put(_speedTestModel!.uploadUrl!, - data: formData, onSendProgress: _progressCallbackUpload, cancelToken: _cancelTokenUpload); + await dio.put( + _speedTestModel!.uploadUrl!, + data: formData, + onSendProgress: _progressCallbackUpload, + cancelToken: _cancelTokenUpload, + ); } catch (e) { print(e); } finally { @@ -130,8 +132,12 @@ class SpeedTestProvider extends ChangeNotifier { try { _cancelTokenDownload = new CancelToken(); _timer.start(); - await dio.download(_speedTestModel!.downloadUrl!, (tempDownload.path), - onReceiveProgress: _progressCallbackDownload, cancelToken: _cancelTokenDownload); + await dio.download( + _speedTestModel!.downloadUrl!, + (tempDownload.path), + onReceiveProgress: _progressCallbackDownload, + cancelToken: _cancelTokenDownload, + ); } catch (e) { print(e); } finally { @@ -249,8 +255,9 @@ class SpeedTestProvider extends ChangeNotifier { offloadDataHeader = {'Authorization': 'Bearer ${_userDataProvider.authenticationModel.accessToken}'}; wiFiLog = { "userId": (_userDataProvider.userProfileModel.pid) == null ? "" : _userDataProvider.userProfileModel.pid, - "userLogin": - (_userDataProvider.userProfileModel.username) == null ? "" : _userDataProvider.userProfileModel.username!, + "userLogin": (_userDataProvider.userProfileModel.username) == null + ? "" + : _userDataProvider.userProfileModel.username!, "Platform": _speedTestModel!.platform, "SSID": _speedTestModel!.ssid, "BSSID": _speedTestModel!.bssid, diff --git a/lib/core/providers/student_id.dart b/lib/core/providers/student_id.dart index 63fdfe828..65281999a 100644 --- a/lib/core/providers/student_id.dart +++ b/lib/core/providers/student_id.dart @@ -33,7 +33,7 @@ class StudentIdDataProvider extends ChangeNotifier { if (_userDataProvider.isLoggedIn) { /// Initialize header final Map header = { - 'Authorization': 'Bearer ${_userDataProvider.authenticationModel.accessToken}' + 'Authorization': 'Bearer ${_userDataProvider.authenticationModel.accessToken}', }; /// Fetch Name diff --git a/lib/core/providers/user.dart b/lib/core/providers/user.dart index 7e0d054cb..367b4f97e 100644 --- a/lib/core/providers/user.dart +++ b/lib/core/providers/user.dart @@ -41,9 +41,7 @@ class UserDataProvider extends ChangeNotifier { late final ChatPersistenceService _chatPersistenceService = ChatPersistenceService(this); // var storage = FlutterSecureStorage(); final storage = const FlutterSecureStorage( - iOptions: IOSOptions( - accessibility: KeychainAccessibility.first_unlock_this_device, - ), + iOptions: IOSOptions(accessibility: KeychainAccessibility.first_unlock_this_device), ); /// Update the [AuthenticationModel] stored in state diff --git a/lib/core/services/authentication.dart b/lib/core/services/authentication.dart index 2e5890786..2618fc5f7 100644 --- a/lib/core/services/authentication.dart +++ b/lib/core/services/authentication.dart @@ -23,8 +23,11 @@ class AuthenticationService { /// fetch data /// MODIFIED TO USE EXPONENTIAL RETRY - var response = - await NetworkHelper.authorizedPublicPost(dotenv.get('AUTH_SERVICE_API_ENDPOINT'), authServiceHeaders, null); + var response = await NetworkHelper.authorizedPublicPost( + dotenv.get('AUTH_SERVICE_API_ENDPOINT'), + authServiceHeaders, + null, + ); /// check to see if response has an error if (response['errorMessage'] != null) throw (response['errorMessage']); @@ -51,8 +54,11 @@ class AuthenticationService { /// fetch data /// MODIFIED TO USE EXPONENTIAL RETRY - var response = - await NetworkHelper.authorizedPost(dotenv.get('AUTH_SERVICE_API_ENDPOINT'), authServiceHeaders, null); + var response = await NetworkHelper.authorizedPost( + dotenv.get('AUTH_SERVICE_API_ENDPOINT'), + authServiceHeaders, + null, + ); /// check to see if response has an error if (response['errorMessage'] != null) throw (response['errorMessage']); diff --git a/lib/core/services/availability.dart b/lib/core/services/availability.dart index 42fb2e03b..e14899b1f 100644 --- a/lib/core/services/availability.dart +++ b/lib/core/services/availability.dart @@ -10,9 +10,7 @@ class AvailabilityService { bool _isLoading = false; DateTime? _lastUpdated; String? _error; - final Map headers = { - "accept": "application/json", - }; + final Map headers = {"accept": "application/json"}; /// MODELS late List _data; diff --git a/lib/core/services/cards.dart b/lib/core/services/cards.dart index 47af94057..8823d31b2 100644 --- a/lib/core/services/cards.dart +++ b/lib/core/services/cards.dart @@ -8,9 +8,7 @@ class CardsService { bool _isLoading = false; DateTime? _lastUpdated; String? _error; - final Map headers = { - "accept": "application/json", - }; + final Map headers = {"accept": "application/json"}; /// MODELS late Map _cardsModel; @@ -27,8 +25,8 @@ class CardsService { _cardsModel = cardsModelFromJson(_response); return true; } catch (e) { - if (e.toString().contains("401")) if (await NetworkHelper.getNewToken(headers)) - return await fetchCards(ucsdAffiliation); + if (e.toString().contains("401")) + if (await NetworkHelper.getNewToken(headers)) return await fetchCards(ucsdAffiliation); _error = e.toString(); return false; } finally { diff --git a/lib/core/services/classes.dart b/lib/core/services/classes.dart index a4fa5b3e9..568cb7d59 100644 --- a/lib/core/services/classes.dart +++ b/lib/core/services/classes.dart @@ -21,7 +21,9 @@ class ClassScheduleService { try { /// fetch data String _response = await NetworkHelper.authorizedFetch( - dotenv.get('MY_ACADEMIC_HISTORY_API_ENDPOINT') + '?academic_level=UN&term_code=' + term, headers); + dotenv.get('MY_ACADEMIC_HISTORY_API_ENDPOINT') + '?academic_level=UN&term_code=' + term, + headers, + ); /// parse data _unData = classScheduleModelFromJson(_response); @@ -40,7 +42,9 @@ class ClassScheduleService { try { /// fetch data String _response = await NetworkHelper.authorizedFetch( - dotenv.get('MY_ACADEMIC_HISTORY_API_ENDPOINT') + '?academic_level=GR&term_code=' + term, headers); + dotenv.get('MY_ACADEMIC_HISTORY_API_ENDPOINT') + '?academic_level=GR&term_code=' + term, + headers, + ); /// parse data _grData = classScheduleModelFromJson(_response); diff --git a/lib/core/services/dining.dart b/lib/core/services/dining.dart index 52b89dc61..309173241 100644 --- a/lib/core/services/dining.dart +++ b/lib/core/services/dining.dart @@ -13,9 +13,7 @@ class DiningService { bool _isLoading = false; DateTime? _lastUpdated; String? _error; - final Map headers = { - "accept": "application/json", - }; + final Map headers = {"accept": "application/json"}; /// MODELS List? _data = []; @@ -26,8 +24,10 @@ class DiningService { _isLoading = true; try { /// fetch data - String _response = - await NetworkHelper.authorizedFetch(dotenv.get('DINING_BASE_ENDPOINT') + '/locations', headers); + String _response = await NetworkHelper.authorizedFetch( + dotenv.get('DINING_BASE_ENDPOINT') + '/locations', + headers, + ); /// parse data final data = diningModelFromJson(_response); diff --git a/lib/core/services/events.dart b/lib/core/services/events.dart index 86a012957..4c51e6320 100644 --- a/lib/core/services/events.dart +++ b/lib/core/services/events.dart @@ -12,9 +12,7 @@ class EventsService { bool _isLoading = false; DateTime? _lastUpdated; String? _error; - final Map headers = { - "accept": "application/json", - }; + final Map headers = {"accept": "application/json"}; /// MODELS late List _data; diff --git a/lib/core/services/map.dart b/lib/core/services/map.dart index 17d001974..27f8965d0 100644 --- a/lib/core/services/map.dart +++ b/lib/core/services/map.dart @@ -14,8 +14,9 @@ class MapSearchService { _isLoading = true; try { /// fetch data - String? _response = - await NetworkHelper.fetchData(dotenv.get('MAP_BASE_ENDPOINT') + '?query=' + location + '®ion=0'); + String? _response = await NetworkHelper.fetchData( + dotenv.get('MAP_BASE_ENDPOINT') + '?query=' + location + '®ion=0', + ); if (_response != 'null') { /// parse data final data = mapSearchModelFromJson(_response!); diff --git a/lib/core/services/messages.dart b/lib/core/services/messages.dart index 9083e95f4..b3cf1717a 100644 --- a/lib/core/services/messages.dart +++ b/lib/core/services/messages.dart @@ -17,7 +17,9 @@ class MessageService { try { /// fetch data String _response = await NetworkHelper.authorizedFetch( - dotenv.get('MY_MESSAGES_API_ENDPOINT') + timestamp.toString(), authHeaders); + dotenv.get('MY_MESSAGES_API_ENDPOINT') + timestamp.toString(), + authHeaders, + ); /// parse data final data = messagesFromJson(_response); @@ -38,8 +40,9 @@ class MessageService { var timestampEndpoint = '&start=' + timestamp.toString(); try { /// fetch data - String _response = - await NetworkHelper.fetchData(dotenv.get('TOPICS_API_ENDPOINT') + topicsEndpoint + timestampEndpoint); + String _response = await NetworkHelper.fetchData( + dotenv.get('TOPICS_API_ENDPOINT') + topicsEndpoint + timestampEndpoint, + ); /// parse data final data = messagesFromJson(_response); diff --git a/lib/core/services/news.dart b/lib/core/services/news.dart index f4515d625..b1134cca1 100644 --- a/lib/core/services/news.dart +++ b/lib/core/services/news.dart @@ -10,9 +10,7 @@ class NewsService { bool _isLoading = false; DateTime? _lastUpdated; String? _error; - final Map headers = { - "accept": "application/json", - }; + final Map headers = {"accept": "application/json"}; /// MODELS NewsModel _newsModels = NewsModel(); diff --git a/lib/core/services/notifications.dart b/lib/core/services/notifications.dart index 8107f4033..b104f9bb9 100644 --- a/lib/core/services/notifications.dart +++ b/lib/core/services/notifications.dart @@ -34,8 +34,11 @@ class NotificationService { Future postPushToken(Map headers, body) async { try { - String? response = - await NetworkHelper.authorizedPost(dotenv.get('NOTIFICATIONS_ENDPOINT') + '/register', headers, body); + String? response = await NetworkHelper.authorizedPost( + dotenv.get('NOTIFICATIONS_ENDPOINT') + '/register', + headers, + body, + ); if (response == 'Success') { return true; } else { @@ -51,8 +54,10 @@ class NotificationService { Future deletePushToken(Map headers, String token) async { token = Uri.encodeComponent(token); try { - String? response = - await NetworkHelper.authorizedDelete(dotenv.get('NOTIFICATIONS_ENDPOINT') + '/token/' + token, headers); + String? response = await NetworkHelper.authorizedDelete( + dotenv.get('NOTIFICATIONS_ENDPOINT') + '/token/' + token, + headers, + ); if (response == 'Success') { return true; } else { diff --git a/lib/core/services/notifications_freefood.dart b/lib/core/services/notifications_freefood.dart index 11ae71039..7c46630f7 100644 --- a/lib/core/services/notifications_freefood.dart +++ b/lib/core/services/notifications_freefood.dart @@ -9,9 +9,7 @@ class FreeFoodService { bool _isLoading = false; DateTime? _lastUpdated; String? _error; - final Map headers = { - "accept": "application/json", - }; + final Map headers = {"accept": "application/json"}; /// MODELS late FreeFoodModel _data; @@ -22,7 +20,9 @@ class FreeFoodService { try { /// fetch data var _response = await NetworkHelper.authorizedFetch( - dotenv.get('NOTIFICATIONS_GOING_ENDPOINT') + 'events/' + id + '/rsvpCount', headers); + dotenv.get('NOTIFICATIONS_GOING_ENDPOINT') + 'events/' + id + '/rsvpCount', + headers, + ); /// parse data final data = freeFoodModelFromJson(_response); @@ -75,8 +75,8 @@ class FreeFoodService { } catch (e) { /// if the authorized fetch failed we know we have to refresh the /// token for this service - if (e.toString().contains("401")) if (await NetworkHelper.getNewToken(headers)) - return await updateCount(id, body); + if (e.toString().contains("401")) + if (await NetworkHelper.getNewToken(headers)) return await updateCount(id, body); _error = e.toString(); return false; } finally { diff --git a/lib/core/services/parking.dart b/lib/core/services/parking.dart index 9065df2a4..6845cfc3b 100644 --- a/lib/core/services/parking.dart +++ b/lib/core/services/parking.dart @@ -12,9 +12,7 @@ class ParkingService { bool _isLoading = false; DateTime? _lastUpdated; String? _error; - final Map headers = { - "accept": "application/json", - }; + final Map headers = {"accept": "application/json"}; /// MODELS List? _data; @@ -24,8 +22,10 @@ class ParkingService { _isLoading = true; try { /// fetch data - String _response = - await (NetworkHelper.authorizedFetch(dotenv.get('PARKING_SERVICE_API_ENDPOINT') + "/status", headers)); + String _response = await (NetworkHelper.authorizedFetch( + dotenv.get('PARKING_SERVICE_API_ENDPOINT') + "/status", + headers, + )); /// parse data _data = parkingModelFromJson(_response); @@ -33,8 +33,8 @@ class ParkingService { } catch (e) { /// if the authorized fetch failed we know we have to refresh the /// token for this service - if (e.toString().contains("401")) if (await NetworkHelper.getNewToken(headers)) - return await fetchParkingLotData(); + if (e.toString().contains("401")) + if (await NetworkHelper.getNewToken(headers)) return await fetchParkingLotData(); _error = e.toString(); return false; } finally { diff --git a/lib/core/services/shuttle.dart b/lib/core/services/shuttle.dart index ca9213e39..511eb4f2e 100644 --- a/lib/core/services/shuttle.dart +++ b/lib/core/services/shuttle.dart @@ -11,9 +11,7 @@ class ShuttleService { bool _isLoading = false; DateTime? _lastUpdated; String? _error; - final Map headers = { - "accept": "application/json", - }; + final Map headers = {"accept": "application/json"}; /// add state related things for view model here /// add any type of data manipulation here so it can be accessed via provider @@ -52,8 +50,10 @@ class ShuttleService { _isLoading = true; try { /// fetch data - String _response = - await (NetworkHelper.authorizedFetch(dotenv.get('SHUTTLE_API_ENDPOINT') + "/$stopId/arrivals", headers)); + String _response = await (NetworkHelper.authorizedFetch( + dotenv.get('SHUTTLE_API_ENDPOINT') + "/$stopId/arrivals", + headers, + )); /// parse data final arrivingData = getArrivingShuttles(_response); @@ -66,8 +66,8 @@ class ShuttleService { } catch (e) { /// if the authorized fetch failed we know we have to refresh the /// token for this service - if (e.toString().contains("401")) if (await NetworkHelper.getNewToken(headers)) - return await getArrivingInformation(stopId); + if (e.toString().contains("401")) + if (await NetworkHelper.getNewToken(headers)) return await getArrivingInformation(stopId); _error = e.toString(); return []; } finally { diff --git a/lib/core/services/speed_test.dart b/lib/core/services/speed_test.dart index e521897a9..51c2e1772 100644 --- a/lib/core/services/speed_test.dart +++ b/lib/core/services/speed_test.dart @@ -14,9 +14,7 @@ class SpeedTestService { /// STATES bool _isLoading = false; String? _error; - final Map headers = { - "accept": "application/json", - }; + final Map headers = {"accept": "application/json"}; /// MODELS SpeedTestModel? _speedTestModel; @@ -46,8 +44,10 @@ class SpeedTestService { try { await NetworkHelper.getNewToken(headers); // Get download & upload urls - String? _downloadResponse = - await NetworkHelper.authorizedFetch(dotenv.get('SPEED_TEST_DOWNLOAD_ENDPOINT'), headers); + String? _downloadResponse = await NetworkHelper.authorizedFetch( + dotenv.get('SPEED_TEST_DOWNLOAD_ENDPOINT'), + headers, + ); String? _uploadResponse = await NetworkHelper.authorizedFetch(dotenv.get('SPEED_TEST_UPLOAD_ENDPOINT'), headers); /// parse data diff --git a/lib/core/services/spot_types.dart b/lib/core/services/spot_types.dart index 316ceb140..d05329ee8 100644 --- a/lib/core/services/spot_types.dart +++ b/lib/core/services/spot_types.dart @@ -12,9 +12,7 @@ class SpotTypesService { bool _isLoading = false; DateTime? _lastUpdated; String? _error; - final Map headers = { - "accept": "application/json", - }; + final Map headers = {"accept": "application/json"}; /// MODELS SpotTypeModel _spotTypeModel = SpotTypeModel(); diff --git a/lib/core/services/tgpt_services/chat_session_creation.dart b/lib/core/services/tgpt_services/chat_session_creation.dart index 55e1946c5..17371094e 100644 --- a/lib/core/services/tgpt_services/chat_session_creation.dart +++ b/lib/core/services/tgpt_services/chat_session_creation.dart @@ -27,10 +27,7 @@ class ChatSessionService { /// Build fresh headers for each request to avoid race conditions. Map _buildHeaders() { - return { - "accept": "application/json", - "content-type": "application/json", - }; + return {"accept": "application/json", "content-type": "application/json"}; } /// Create a new chat session. @@ -62,11 +59,7 @@ class ChatSessionService { final String requestBody = json.encode(request.toJson()); // Send POST - final response = await NetworkHelper.authorizedPost( - createChatSessionEndpoint, - headers, - requestBody, - ); + final response = await NetworkHelper.authorizedPost(createChatSessionEndpoint, headers, requestBody); // Defensive parsing: handle both Map and String responses final CreateChatSessionID chatSessionId = CreateChatSessionID.fromJsonSafe(response); diff --git a/lib/core/services/tgpt_services/chat_stream.dart b/lib/core/services/tgpt_services/chat_stream.dart index 73be930d1..5c24a5c35 100644 --- a/lib/core/services/tgpt_services/chat_stream.dart +++ b/lib/core/services/tgpt_services/chat_stream.dart @@ -26,12 +26,7 @@ class StreamingChatChunk { final int? messageId; // reserved_assistant_message_id for threading final List? citations; // citation references (at end of stream) - const StreamingChatChunk({ - required this.delta, - this.done = false, - this.messageId, - this.citations, - }); + const StreamingChatChunk({required this.delta, this.done = false, this.messageId, this.citations}); } /// Merges search/retrieval documents into [documentIdToUrl] so [citation_info] can resolve URLs. @@ -84,10 +79,7 @@ class ChatMessageStreamService { int? parentMessageId, }) async* { // Build fresh headers per request to avoid race conditions - final headers = { - "accept": "application/json", - "content-type": "application/json", - }; + final headers = {"accept": "application/json", "content-type": "application/json"}; if (_userDataProvider.isLoggedIn) { headers['Authorization'] = 'Bearer ${_userDataProvider.authenticationModel.accessToken}'; } else { @@ -101,8 +93,9 @@ class ChatMessageStreamService { } final String? rawContextUrl = dotenv.env['TGPT_CHAT_SEND_CONTEXT_URL']; - final String sendContextUrl = - (rawContextUrl != null && rawContextUrl.trim().isNotEmpty) ? rawContextUrl.trim() : 'https://mobile.ucsd.edu/'; + final String sendContextUrl = (rawContextUrl != null && rawContextUrl.trim().isNotEmpty) + ? rawContextUrl.trim() + : 'https://mobile.ucsd.edu/'; // Build request body using shared helper (includes `url` per TGPT web widget contract) final body = ChatMessageService.buildRequestBody( @@ -230,11 +223,7 @@ class ChatMessageStreamService { final bool refreshed = await NetworkHelper.getNewToken(headers); if (refreshed) { // Restart stream with refreshed token - yield* streamMessage( - message: message, - chatSessionId: chatSessionId, - parentMessageId: parentMessageId, - ); + yield* streamMessage(message: message, chatSessionId: chatSessionId, parentMessageId: parentMessageId); _hasRetried = false; return; } diff --git a/lib/core/services/tgpt_services/tgpt_error_message.dart b/lib/core/services/tgpt_services/tgpt_error_message.dart index 4a0cd7776..3e462f0a1 100644 --- a/lib/core/services/tgpt_services/tgpt_error_message.dart +++ b/lib/core/services/tgpt_services/tgpt_error_message.dart @@ -87,18 +87,19 @@ String tgptErrorMessageFor(Object error) { final String s = error.toString(); var isNotFound = s.contains('[404]') || s.contains('status code of 404'); if (isNotFound) return ErrorConstants.TRITONGPT_NOT_FOUND; - - var isServerError = s.contains('[500]') || + + var isServerError = + s.contains('[500]') || s.contains('[502]') || s.contains('[503]') || s.contains('status code of 500') || s.contains('status code of 502') || s.contains('status code of 503'); if (isServerError) return ErrorConstants.TRITONGPT_SERVER_ERROR; - + var isUnprocessableEntity = s.contains('[422]') || s.contains('status code of 422'); if (isUnprocessableEntity) return ErrorConstants.TRITONGPT_BAD_REQUEST; - + var isBadRequest = s.contains('[400]') || s.contains('status code of 400'); if (isBadRequest) return ErrorConstants.TRITONGPT_BAD_REQUEST; return ErrorConstants.TRITONGPT_UNAVAILABLE; diff --git a/lib/core/services/user.dart b/lib/core/services/user.dart index a46f3e3ff..44264d534 100644 --- a/lib/core/services/user.dart +++ b/lib/core/services/user.dart @@ -18,8 +18,9 @@ class UserProfileService { _error = null; _isLoading = true; try { - _userProfileModel = - userProfileModelFromJson(await NetworkHelper.authorizedFetch(_endpoint + '/profile', headers)); + _userProfileModel = userProfileModelFromJson( + await NetworkHelper.authorizedFetch(_endpoint + '/profile', headers), + ); return true; } catch (e) { _error = e.toString(); @@ -33,8 +34,11 @@ class UserProfileService { _error = null; _isLoading = true; try { - final response = - await NetworkHelper.authorizedPost(_endpoint + '/profile', headers, createAttributeValueJson(body)); + final response = await NetworkHelper.authorizedPost( + _endpoint + '/profile', + headers, + createAttributeValueJson(body), + ); return response.toString() == 'Success' ? true : throw response.toString(); } catch (e) { _error = e.toString(); diff --git a/lib/core/utils/maps.dart b/lib/core/utils/maps.dart index db9b95ab4..9f1bc7a1f 100644 --- a/lib/core/utils/maps.dart +++ b/lib/core/utils/maps.dart @@ -4,7 +4,8 @@ double getHaversineDistance(lat1, lon1, lat2, lon2) { var r = 6371; // Radius of the earth in km var dLat = deg2rad(lat2 - lat1); // deg2rad below var dLon = deg2rad(lon2 - lon1); - var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + + var a = + Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.sin(dLon / 2) * Math.sin(dLon / 2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); var d = r * c; // Distance in km diff --git a/lib/main.dart b/lib/main.dart index 6255348d6..760730553 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -105,14 +105,14 @@ class CampusMobile extends StatelessWidget { iconTheme: lightIconTheme, appBarTheme: lightAppBarTheme, listTileTheme: lightListTileTheme, - colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary).copyWith( - surface: lightButtonColor, - brightness: Brightness.light, - ), + colorScheme: ColorScheme.fromSwatch( + primarySwatch: ColorPrimary, + ).copyWith(surface: lightButtonColor, brightness: Brightness.light), bottomNavigationBarTheme: BottomNavigationBarThemeData( - unselectedItemColor: unselectedIconLightColor, - selectedItemColor: Colors.white, - backgroundColor: bottomTabBarColorLight), + unselectedItemColor: unselectedIconLightColor, + selectedItemColor: Colors.white, + backgroundColor: bottomTabBarColorLight, + ), ); final darkTheme = ThemeData( @@ -133,14 +133,14 @@ class CampusMobile extends StatelessWidget { appBarTheme: darkAppBarTheme, unselectedWidgetColor: darkAccentColor, listTileTheme: darkListTileTheme, - colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary).copyWith( - surface: darkButtonColor, - brightness: Brightness.dark, - ), + colorScheme: ColorScheme.fromSwatch( + primarySwatch: ColorPrimary, + ).copyWith(surface: darkButtonColor, brightness: Brightness.dark), bottomNavigationBarTheme: BottomNavigationBarThemeData( - unselectedItemColor: unselectedIconDarkColor, - selectedItemColor: Colors.white, - backgroundColor: bottomTabBarColorDark), + unselectedItemColor: unselectedIconDarkColor, + selectedItemColor: Colors.white, + backgroundColor: bottomTabBarColorDark, + ), ); return MultiProvider( @@ -148,22 +148,14 @@ class CampusMobile extends StatelessWidget { child: GetMaterialApp( debugShowCheckedModeBanner: true, title: 'UC San Diego', - theme: lightTheme.copyWith( - colorScheme: lightTheme.colorScheme.copyWith(secondary: darkAccentColor), - ), - darkTheme: darkTheme.copyWith( - colorScheme: darkTheme.colorScheme.copyWith(secondary: lightAccentColor), - ), + theme: lightTheme.copyWith(colorScheme: lightTheme.colorScheme.copyWith(secondary: darkAccentColor)), + darkTheme: darkTheme.copyWith(colorScheme: darkTheme.colorScheme.copyWith(secondary: lightAccentColor)), themeMode: ThemeMode.system, initialRoute: showOnboardingScreen ? RoutePaths.ONBOARDING_LOGIN : RoutePaths.BOTTOM_NAVIGATION_BAR, onGenerateRoute: campusMobileRouter.Router.generateRoute, navigatorObservers: [observer], builder: (context, child) { - return SafeArea( - top: false, - bottom: Platform.isAndroid, - child: child!, - ); + return SafeArea(top: false, bottom: Platform.isAndroid, child: child!); }, ), ); diff --git a/lib/ui/ai_assistant/ai_assistant_view.dart b/lib/ui/ai_assistant/ai_assistant_view.dart index ed300b765..478f4908d 100644 --- a/lib/ui/ai_assistant/ai_assistant_view.dart +++ b/lib/ui/ai_assistant/ai_assistant_view.dart @@ -98,20 +98,13 @@ class _AIAssistantViewState extends State { AbsorbPointer( absorbing: _isSidebarOpen, child: ImageFiltered( - imageFilter: ImageFilter.blur( - sigmaX: _isSidebarOpen ? 8 : 0, - sigmaY: _isSidebarOpen ? 8 : 0, - ), + imageFilter: ImageFilter.blur(sigmaX: _isSidebarOpen ? 8 : 0, sigmaY: _isSidebarOpen ? 8 : 0), child: _buildMainContent(chatProvider), ), ), if (_isSidebarOpen) Positioned.fill( - child: IgnorePointer( - child: Container( - color: const Color(0xFF182B49).withValues(alpha: 0.10), - ), - ), + child: IgnorePointer(child: Container(color: const Color(0xFF182B49).withValues(alpha: 0.10))), ), ], ), @@ -160,8 +153,9 @@ class _AIAssistantViewState extends State { ), ), Expanded( - child: - chatProvider.hasMessages ? ChatMessageList(messages: chatProvider.messages) : const AssistantEmptyState(), + child: chatProvider.hasMessages + ? ChatMessageList(messages: chatProvider.messages) + : const AssistantEmptyState(), ), ], ); @@ -179,9 +173,7 @@ class _AIAssistantViewState extends State { _lastShownError = errorMessage; WidgetsBinding.instance.addPostFrameCallback((_) { if (!mounted) return; - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text(errorMessage)), - ); + ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(errorMessage))); }); } diff --git a/lib/ui/ai_assistant/assistant_empty_state.dart b/lib/ui/ai_assistant/assistant_empty_state.dart index bab7a78bb..38b6c6e4c 100644 --- a/lib/ui/ai_assistant/assistant_empty_state.dart +++ b/lib/ui/ai_assistant/assistant_empty_state.dart @@ -12,10 +12,7 @@ class AssistantEmptyState extends StatelessWidget { child: Column( mainAxisSize: MainAxisSize.min, children: [ - SvgPicture.asset( - 'assets/images/tgpt/uc-san-diego-assistant.svg', - width: 286, - ), + SvgPicture.asset('assets/images/tgpt/uc-san-diego-assistant.svg', width: 286), const SizedBox(height: 10), const Text( 'This assistant has access to campus information.', diff --git a/lib/ui/ai_assistant/assistant_header.dart b/lib/ui/ai_assistant/assistant_header.dart index 302266e80..80b578ca0 100644 --- a/lib/ui/ai_assistant/assistant_header.dart +++ b/lib/ui/ai_assistant/assistant_header.dart @@ -13,12 +13,7 @@ class AssistantHeader extends StatelessWidget { width: double.infinity, color: lightPrimaryColor, padding: EdgeInsets.fromLTRB(24, safeAreaInsets.top + 14, 24, 16), - child: Center( - child: SvgPicture.asset( - 'assets/images/tgpt/tritongpt-header.svg', - height: 27, - ), - ), + child: Center(child: SvgPicture.asset('assets/images/tgpt/tritongpt-header.svg', height: 27)), ); } } diff --git a/lib/ui/ai_assistant/assistant_sidebar.dart b/lib/ui/ai_assistant/assistant_sidebar.dart index 38b3f7c1a..f89a7c0db 100644 --- a/lib/ui/ai_assistant/assistant_sidebar.dart +++ b/lib/ui/ai_assistant/assistant_sidebar.dart @@ -71,10 +71,12 @@ class _AssistantSidebarState extends State { Widget build(BuildContext context) { final double drawerWidth = MediaQuery.sizeOf(context).width * 0.78; final DateTime cutoff = DateTime.now().subtract(const Duration(days: 7)); - final List recentSessions = - widget.sessions.where((ChatSessionMeta session) => session.updatedAt.isAfter(cutoff)).toList(); - final List olderSessions = - widget.sessions.where((ChatSessionMeta session) => !session.updatedAt.isAfter(cutoff)).toList(); + final List recentSessions = widget.sessions + .where((ChatSessionMeta session) => session.updatedAt.isAfter(cutoff)) + .toList(); + final List olderSessions = widget.sessions + .where((ChatSessionMeta session) => !session.updatedAt.isAfter(cutoff)) + .toList(); return Drawer( width: drawerWidth, @@ -93,11 +95,7 @@ class _AssistantSidebarState extends State { IconButton( onPressed: widget.onClose, splashRadius: 20, - icon: SvgPicture.asset( - 'assets/images/tgpt/pin-sidebar.svg', - width: 22, - height: 22, - ), + icon: SvgPicture.asset('assets/images/tgpt/pin-sidebar.svg', width: 22, height: 22), ), ], ), @@ -112,17 +110,11 @@ class _AssistantSidebarState extends State { decoration: BoxDecoration( color: const Color(0xFFF6F8FB), borderRadius: BorderRadius.circular(14), - border: Border.all( - color: const Color(0xFFE1E6EE), - ), + border: Border.all(color: const Color(0xFFE1E6EE)), ), child: Row( children: [ - SvgPicture.asset( - 'assets/images/tgpt/new_chat_icon.svg', - width: 20, - height: 20, - ), + SvgPicture.asset('assets/images/tgpt/new_chat_icon.svg', width: 20, height: 20), const SizedBox(width: 12), const Text( 'New Chat', @@ -215,11 +207,7 @@ class _AssistantSidebarState extends State { } class _SidebarSectionTitle extends StatelessWidget { - const _SidebarSectionTitle({ - required this.title, - required this.isExpanded, - required this.onTap, - }); + const _SidebarSectionTitle({required this.title, required this.isExpanded, required this.onTap}); final String title; final bool isExpanded; @@ -236,11 +224,7 @@ class _SidebarSectionTitle extends StatelessWidget { padding: const EdgeInsets.fromLTRB(4, 8, 0, 8), child: Row( children: [ - Icon( - isExpanded ? Icons.arrow_drop_down : Icons.arrow_right, - size: 26, - color: lightPrimaryColor, - ), + Icon(isExpanded ? Icons.arrow_drop_down : Icons.arrow_right, size: 26, color: lightPrimaryColor), Text( title, style: const TextStyle( diff --git a/lib/ui/ai_assistant/chat_citation.dart b/lib/ui/ai_assistant/chat_citation.dart index b585541bc..023b36dc8 100644 --- a/lib/ui/ai_assistant/chat_citation.dart +++ b/lib/ui/ai_assistant/chat_citation.dart @@ -4,10 +4,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; class ChatCitation extends StatelessWidget { - const ChatCitation({ - super.key, - required this.citation, - }); + const ChatCitation({super.key, required this.citation}); final ChatCitationReference citation; @@ -21,18 +18,12 @@ class ChatCitation extends StatelessWidget { decoration: BoxDecoration( color: const Color(0xFFF5F7FA), borderRadius: BorderRadius.circular(16), - border: Border.all( - color: const Color(0xFFD7DDE5), - ), + border: Border.all(color: const Color(0xFFD7DDE5)), ), child: Row( mainAxisSize: MainAxisSize.min, children: [ - SvgPicture.asset( - 'assets/images/tgpt/document_icon.svg', - width: 16, - height: 14, - ), + SvgPicture.asset('assets/images/tgpt/document_icon.svg', width: 16, height: 14), const SizedBox(width: 6), Text( '[${citation.number}]', @@ -77,9 +68,6 @@ class ChatCitation extends StatelessWidget { var isNotHttps = uri?.scheme != 'https'; if (isNotHttp && isNotHttps) return; - await Navigator.of(context).pushNamed( - RoutePaths.TGPT_CITATION_WEB, - arguments: resolved, - ); + await Navigator.of(context).pushNamed(RoutePaths.TGPT_CITATION_WEB, arguments: resolved); } } diff --git a/lib/ui/ai_assistant/chat_composer.dart b/lib/ui/ai_assistant/chat_composer.dart index c6af396ea..78cecf656 100644 --- a/lib/ui/ai_assistant/chat_composer.dart +++ b/lib/ui/ai_assistant/chat_composer.dart @@ -2,12 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; class ChatComposer extends StatefulWidget { - const ChatComposer({ - super.key, - required this.onSubmitted, - required this.enabled, - required this.isSending, - }); + const ChatComposer({super.key, required this.onSubmitted, required this.enabled, required this.isSending}); final Future Function(String message) onSubmitted; final bool enabled; @@ -59,21 +54,14 @@ class _ChatComposerState extends State { contentPadding: const EdgeInsets.fromLTRB(16, 14, 16, 14), filled: true, fillColor: Colors.white, - suffixIconConstraints: const BoxConstraints( - minWidth: 48, - minHeight: 48, - ), + suffixIconConstraints: const BoxConstraints(minWidth: 48, minHeight: 48), suffixIcon: Padding( padding: const EdgeInsets.only(right: 8), child: IconButton( onPressed: canSend ? _submit : null, icon: Opacity( opacity: canSend ? 1 : 0.45, - child: SvgPicture.asset( - 'assets/images/tgpt/send-message.svg', - width: 22, - height: 22, - ), + child: SvgPicture.asset('assets/images/tgpt/send-message.svg', width: 22, height: 22), ), ), ), @@ -96,9 +84,6 @@ class _ChatComposerState extends State { static const OutlineInputBorder _BORDER = OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide( - color: Color(0xFFB1B5BB), - width: 1.25, - ), + borderSide: BorderSide(color: Color(0xFFB1B5BB), width: 1.25), ); } diff --git a/lib/ui/ai_assistant/chat_message_bubble.dart b/lib/ui/ai_assistant/chat_message_bubble.dart index b30bfd51c..270c3c2d8 100644 --- a/lib/ui/ai_assistant/chat_message_bubble.dart +++ b/lib/ui/ai_assistant/chat_message_bubble.dart @@ -7,10 +7,7 @@ import 'package:flutter_markdown/flutter_markdown.dart'; import 'package:provider/provider.dart'; class ChatMessageBubble extends StatelessWidget { - const ChatMessageBubble({ - super.key, - required this.message, - }); + const ChatMessageBubble({super.key, required this.message}); final AssistantChatMessage message; @@ -26,10 +23,7 @@ class ChatMessageBubble extends StatelessWidget { constraints: BoxConstraints(maxWidth: maxBubbleWidth), child: Container( padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12), - decoration: BoxDecoration( - color: const Color(0xFFF3F5F8), - borderRadius: BorderRadius.circular(21), - ), + decoration: BoxDecoration(color: const Color(0xFFF3F5F8), borderRadius: BorderRadius.circular(21)), child: Text( message.text, style: const TextStyle( @@ -60,10 +54,7 @@ class ChatMessageBubble extends StatelessWidget { child: SizedBox( width: 20, height: 20, - child: Image.asset( - 'assets/images/tgpt/tgpt-icon.png', - fit: BoxFit.contain, - ), + child: Image.asset('assets/images/tgpt/tgpt-icon.png', fit: BoxFit.contain), ), ), const SizedBox(width: 10), @@ -120,19 +111,14 @@ class ChatMessageBubble extends StatelessWidget { spacing: 8, runSpacing: 8, children: message.citations - .map( - (ChatCitationReference citation) => ChatCitation(citation: citation), - ) + .map((ChatCitationReference citation) => ChatCitation(citation: citation)) .toList(), ), ), if (content.relatedQuestions.isNotEmpty) Padding( padding: const EdgeInsets.only(top: 12), - child: _RelatedQuestionsSection( - questions: content.relatedQuestions, - enabled: !isMessageStreaming, - ), + child: _RelatedQuestionsSection(questions: content.relatedQuestions, enabled: !isMessageStreaming), ), if (isTypingIndicator) const _TypingIndicator(), ], @@ -144,10 +130,7 @@ class ChatMessageBubble extends StatelessWidget { } class _RelatedQuestionsSection extends StatelessWidget { - const _RelatedQuestionsSection({ - required this.questions, - required this.enabled, - }); + const _RelatedQuestionsSection({required this.questions, required this.enabled}); final List questions; final bool enabled; @@ -160,9 +143,7 @@ class _RelatedQuestionsSection extends StatelessWidget { decoration: BoxDecoration( color: const Color(0xFFF6F8FB), borderRadius: BorderRadius.circular(16), - border: Border.all( - color: const Color(0xFFE1E6EE), - ), + border: Border.all(color: const Color(0xFFE1E6EE)), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -243,10 +224,7 @@ class _TypingIndicatorState extends State<_TypingIndicator> with SingleTickerPro @override void initState() { super.initState(); - _controller = AnimationController( - vsync: this, - duration: const Duration(milliseconds: 900), - )..repeat(); + _controller = AnimationController(vsync: this, duration: const Duration(milliseconds: 900))..repeat(); } @override @@ -267,19 +245,13 @@ class _TypingIndicatorState extends State<_TypingIndicator> with SingleTickerPro builder: (BuildContext context, Widget? child) { final double phase = (_controller.value - i * 0.18).clamp(0.0, 1.0); final double offset = phase < 0.5 ? -4.0 * (phase / 0.5) : -4.0 * (1.0 - (phase - 0.5) / 0.5); - return Transform.translate( - offset: Offset(0, offset), - child: child, - ); + return Transform.translate(offset: Offset(0, offset), child: child); }, child: Container( margin: EdgeInsets.only(left: i == 0 ? 0 : 5), width: 7, height: 7, - decoration: const BoxDecoration( - color: Color(0xFFB0B5BE), - shape: BoxShape.circle, - ), + decoration: const BoxDecoration(color: Color(0xFFB0B5BE), shape: BoxShape.circle), ), ); }), diff --git a/lib/ui/ai_assistant/chat_message_list.dart b/lib/ui/ai_assistant/chat_message_list.dart index 6edbdd017..ab4a9c2b5 100644 --- a/lib/ui/ai_assistant/chat_message_list.dart +++ b/lib/ui/ai_assistant/chat_message_list.dart @@ -3,10 +3,7 @@ import 'package:campus_mobile_experimental/ui/ai_assistant/chat_message_bubble.d import 'package:flutter/material.dart'; class ChatMessageList extends StatefulWidget { - const ChatMessageList({ - super.key, - required this.messages, - }); + const ChatMessageList({super.key, required this.messages}); final List messages; @@ -27,7 +24,8 @@ class _ChatMessageListState extends State { void didUpdateWidget(covariant ChatMessageList oldWidget) { super.didUpdateWidget(oldWidget); final bool didChangeLength = oldWidget.messages.length != widget.messages.length; - final bool didChangeLastMessage = !didChangeLength && + final bool didChangeLastMessage = + !didChangeLength && widget.messages.isNotEmpty && oldWidget.messages.isNotEmpty && oldWidget.messages.last.text != widget.messages.last.text; @@ -49,9 +47,7 @@ class _ChatMessageListState extends State { itemCount: widget.messages.length, separatorBuilder: (_, __) => const SizedBox(height: 14), itemBuilder: (BuildContext context, int index) { - return ChatMessageBubble( - message: widget.messages[index], - ); + return ChatMessageBubble(message: widget.messages[index]); }, ); } diff --git a/lib/ui/ai_assistant/citation_web_view.dart b/lib/ui/ai_assistant/citation_web_view.dart index bb9d1c861..1a9b87d12 100644 --- a/lib/ui/ai_assistant/citation_web_view.dart +++ b/lib/ui/ai_assistant/citation_web_view.dart @@ -7,10 +7,7 @@ import 'package:webview_flutter/webview_flutter.dart'; /// Pushed from [ChatCitation.openCitation] so the app bar shows **CITATION** /// (see [RouteTitles]) instead of reusing another feature title such as News. class CitationWebView extends StatefulWidget { - const CitationWebView({ - super.key, - required this.initialUrl, - }); + const CitationWebView({super.key, required this.initialUrl}); final String initialUrl; @@ -29,9 +26,7 @@ class _CitationWebViewState extends State { if (!ok) { WidgetsBinding.instance.addPostFrameCallback((_) { if (!mounted) return; - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar(content: Text('Could not open link.')), - ); + ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('Could not open link.'))); Navigator.of(context).pop(); }); return; @@ -44,8 +39,6 @@ class _CitationWebViewState extends State { @override Widget build(BuildContext context) { final WebViewController? c = _controller; - return ContainerView( - child: c == null ? const SizedBox.shrink() : WebViewWidget(controller: c), - ); + return ContainerView(child: c == null ? const SizedBox.shrink() : WebViewWidget(controller: c)); } } diff --git a/lib/ui/availability/availability_card.dart b/lib/ui/availability/availability_card.dart index f58544d6b..df3b69b20 100644 --- a/lib/ui/availability/availability_card.dart +++ b/lib/ui/availability/availability_card.dart @@ -54,11 +54,12 @@ class _AvailabilityCardState extends State { child: () => buildAvailabilityCard(_availabilityDataProvider.availabilityModels), actionButtons: [ ActionLink( - buttonText: 'MANAGE LOCATIONS', - onPressed: () { - analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'manage'}); - Navigator.pushNamed(context, RoutePaths.MANAGE_AVAILABILITY_VIEW); - }) + buttonText: 'MANAGE LOCATIONS', + onPressed: () { + analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'manage'}); + Navigator.pushNamed(context, RoutePaths.MANAGE_AVAILABILITY_VIEW); + }, + ), ], ); } @@ -88,14 +89,9 @@ class _AvailabilityCardState extends State { Container( child: Text( "No Location to Display", - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: LOCATION_FONT_SIZE, - ), - ), - padding: EdgeInsets.only( - bottom: TITLE_BOTTOM_PADDING, + style: TextStyle(fontWeight: FontWeight.bold, fontSize: LOCATION_FONT_SIZE), ), + padding: EdgeInsets.only(bottom: TITLE_BOTTOM_PADDING), ), Text("Add Locations via 'Manage Locations'"), ], @@ -129,14 +125,15 @@ class _AvailabilityCardState extends State { dotsCount: locationsList.length, decorator: DotsDecorator( color: dotsUnselectedColor, - activeColor: - Theme.of(context).brightness == Brightness.dark ? dotsSelectedColorDark : dotsSelectedColorLight, + activeColor: Theme.of(context).brightness == Brightness.dark + ? dotsSelectedColorDark + : dotsSelectedColorLight, activeSize: const Size(22.0, 22.0), size: const Size(10.0, 10.0), ), ), ), - ) + ), ], ), ); diff --git a/lib/ui/availability/availability_detail_view.dart b/lib/ui/availability/availability_detail_view.dart index 5be2071db..9d984b0a5 100644 --- a/lib/ui/availability/availability_detail_view.dart +++ b/lib/ui/availability/availability_detail_view.dart @@ -10,19 +10,19 @@ class AvailabilityDetailedView extends StatelessWidget { @override Widget build(BuildContext context) { - return ContainerView( - child: buildLocationsList(context, subLocation), - ); + return ContainerView(child: buildLocationsList(context, subLocation)); } Widget buildLocationsList(BuildContext context, SubLocations subLocation) { List list = []; - list.add(ListTile( - title: Text( - "${subLocation.name}", - style: TextStyle(color: Theme.of(context).colorScheme.secondary, fontSize: 24, fontWeight: FontWeight.bold), + list.add( + ListTile( + title: Text( + "${subLocation.name}", + style: TextStyle(color: Theme.of(context).colorScheme.secondary, fontSize: 24, fontWeight: FontWeight.bold), + ), ), - )); + ); List floorTiles = []; for (int i = 0; i < subLocation.floors.length; i++) { @@ -39,13 +39,12 @@ class AvailabilityDetailedView extends StatelessWidget { subtitle: Column( children: [ Align( - alignment: Alignment.centerLeft, - child: Semantics( - container: true, - child: Text( - (100 * percentAvailability(floor)).toInt().toString() + '% Busy', - ), - )), + alignment: Alignment.centerLeft, + child: Semantics( + container: true, + child: Text((100 * percentAvailability(floor)).toInt().toString() + '% Busy'), + ), + ), Align( alignment: Alignment.centerLeft, child: SizedBox( @@ -57,11 +56,7 @@ class AvailabilityDetailedView extends StatelessWidget { child: LinearProgressIndicator( value: percentAvailability(floor) as double?, backgroundColor: Colors.grey[BACKGROUND_GREY_SHADE], - valueColor: AlwaysStoppedAnimation( - setIndicatorColor( - percentAvailability(floor), - ), - ), + valueColor: AlwaysStoppedAnimation(setIndicatorColor(percentAvailability(floor))), ), ), ), @@ -83,10 +78,7 @@ class AvailabilityDetailedView extends StatelessWidget { return Padding( padding: const EdgeInsets.symmetric(horizontal: 8.0), - child: ListView( - physics: BouncingScrollPhysics(), - children: list, - ), + child: ListView(physics: BouncingScrollPhysics(), children: list), ); } diff --git a/lib/ui/availability/availability_display.dart b/lib/ui/availability/availability_display.dart index 6f0b9faaf..9f709c553 100644 --- a/lib/ui/availability/availability_display.dart +++ b/lib/ui/availability/availability_display.dart @@ -5,21 +5,13 @@ import 'package:campus_mobile_experimental/ui/availability/availability_constant import 'package:flutter/material.dart'; class AvailabilityDisplay extends StatelessWidget { - const AvailabilityDisplay({ - Key? key, - required this.model, - }) : super(key: key); + const AvailabilityDisplay({Key? key, required this.model}) : super(key: key); final AvailabilityModel model; @override Widget build(BuildContext context) { - return Column( - children: [ - buildLocationTitle(context), - buildAvailabilityBars(context), - ], - ); + return Column(children: [buildLocationTitle(context), buildAvailabilityBars(context)]); } Widget buildLocationTitle(BuildContext context) { @@ -31,9 +23,7 @@ class AvailabilityDisplay extends StatelessWidget { excludeSemantics: true, child: Text( model.name.toUpperCase(), - style: Theme.of(context).textTheme.titleMedium?.copyWith( - fontWeight: FontWeight.normal, - ), + style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.normal), ), ), ); @@ -44,10 +34,7 @@ class AvailabilityDisplay extends StatelessWidget { return Container( alignment: Alignment.center, padding: EdgeInsets.only(top: DATA_UNAVAILABLE_TOP_PADDING), - child: Text( - "Data Unavailable", - style: TextStyle(fontSize: LOCATION_FONT_SIZE), - ), + child: Text("Data Unavailable", style: TextStyle(fontSize: LOCATION_FONT_SIZE)), ); } @@ -63,11 +50,7 @@ class AvailabilityDisplay extends StatelessWidget { child: GestureDetector( onTap: () { if (subLocation.floors.isNotEmpty) { - Navigator.pushNamed( - context, - RoutePaths.AVAILABILITY_DETAILED_VIEW, - arguments: subLocation, - ); + Navigator.pushNamed(context, RoutePaths.AVAILABILITY_DETAILED_VIEW, arguments: subLocation); } }, child: Column( @@ -84,11 +67,11 @@ class AvailabilityDisplay extends StatelessWidget { subLocation.name, style: subLocation.floors.isNotEmpty ? (Theme.of(context).brightness == Brightness.dark - ? textButtonSmallDark - : textButtonSmallLight) + ? textButtonSmallDark + : textButtonSmallLight) : (Theme.of(context).brightness == Brightness.dark - ? descriptiveTextSmallDark.copyWith(fontSize: 22.0) - : descriptiveTextSmallLight.copyWith(fontSize: 22.0)), + ? descriptiveTextSmallDark.copyWith(fontSize: 22.0) + : descriptiveTextSmallLight.copyWith(fontSize: 22.0)), ), SizedBox(height: 4), Text( @@ -123,9 +106,7 @@ class AvailabilityDisplay extends StatelessWidget { ? 0.01 : percentAvailability(subLocation).toDouble(), backgroundColor: Colors.grey[BACKGROUND_GREY_SHADE], - valueColor: AlwaysStoppedAnimation( - setIndicatorColor(percentAvailability(subLocation)), - ), + valueColor: AlwaysStoppedAnimation(setIndicatorColor(percentAvailability(subLocation))), ), ), ), @@ -143,8 +124,9 @@ class AvailabilityDisplay extends StatelessWidget { children: ListTile.divideTiles( tiles: locations, context: context, - color: - Theme.of(context).brightness == Brightness.dark ? listTileDividerColorDark : listTileDividerColorLight, + color: Theme.of(context).brightness == Brightness.dark + ? listTileDividerColorDark + : listTileDividerColorLight, ).toList(), ), ), diff --git a/lib/ui/availability/manage_availability_view.dart b/lib/ui/availability/manage_availability_view.dart index a81a8056b..53f27480b 100644 --- a/lib/ui/availability/manage_availability_view.dart +++ b/lib/ui/availability/manage_availability_view.dart @@ -15,17 +15,18 @@ class _ManageAvailabilityViewState extends State { @override Widget build(BuildContext context) { _availabilityDataProvider = Provider.of(context); - return ContainerView( - child: buildLocationsList(context), - ); + return ContainerView(child: buildLocationsList(context)); } Widget buildLocationsList(BuildContext context) { return ReorderableListView( header: Padding( padding: const EdgeInsets.only(top: 10), - child: - Text("Hold and drag to reorder", textAlign: TextAlign.center, style: Theme.of(context).textTheme.bodySmall), + child: Text( + "Hold and drag to reorder", + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.bodySmall, + ), ), children: createList(context), onReorderItem: _onReorder, @@ -86,37 +87,36 @@ class _ManageAvailabilityViewState extends State { if (match != null) curName = curName.replaceRange(match.start, match.end, ''); if (existingKeys.contains(curName)) continue; existingKeys.add(curName); - list.add(Card( - key: Key(curName), - elevation: 2.0, - margin: EdgeInsets.fromLTRB(cardMargin, 5, cardMargin, 5), - child: ListTile( - title: Text( - curName, - style: Theme.of(context).textTheme.bodyMedium, - ), - leading: Icon( - Icons.drag_handle, - color: Theme.of(context).brightness == Brightness.dark ? linkTextColorDark : linkTextColorLight, - ), - trailing: Transform.scale( - scale: 0.9, // Adjust the scale as needed - child: Switch.adaptive( - value: Provider.of(context).locationViewState[curName]!, - // activeColor: Theme.of(context).buttonColor, - activeTrackColor: toggleActiveColor, - thumbColor: WidgetStateProperty.resolveWith((states) { - final bool isSelected = states.contains(WidgetState.selected); - if (isSelected) return Colors.white; - return null; - }), - onChanged: (_) { - _availabilityDataProvider.toggleLocation(curName); - }, + list.add( + Card( + key: Key(curName), + elevation: 2.0, + margin: EdgeInsets.fromLTRB(cardMargin, 5, cardMargin, 5), + child: ListTile( + title: Text(curName, style: Theme.of(context).textTheme.bodyMedium), + leading: Icon( + Icons.drag_handle, + color: Theme.of(context).brightness == Brightness.dark ? linkTextColorDark : linkTextColorLight, + ), + trailing: Transform.scale( + scale: 0.9, // Adjust the scale as needed + child: Switch.adaptive( + value: Provider.of(context).locationViewState[curName]!, + // activeColor: Theme.of(context).buttonColor, + activeTrackColor: toggleActiveColor, + thumbColor: WidgetStateProperty.resolveWith((states) { + final bool isSelected = states.contains(WidgetState.selected); + if (isSelected) return Colors.white; + return null; + }), + onChanged: (_) { + _availabilityDataProvider.toggleLocation(curName); + }, + ), ), ), ), - )); + ); } } return list; diff --git a/lib/ui/classes/classes_card.dart b/lib/ui/classes/classes_card.dart index a22d8460a..26db91c5f 100644 --- a/lib/ui/classes/classes_card.dart +++ b/lib/ui/classes/classes_card.dart @@ -50,8 +50,13 @@ class ClassScheduleCard extends StatelessWidget { ); } - Widget buildClassScheduleCard(BuildContext context, List courseData, int selectedCourse, - DateTime lastUpdated, String nextDayWithClasses) { + Widget buildClassScheduleCard( + BuildContext context, + List courseData, + int selectedCourse, + DateTime lastUpdated, + String nextDayWithClasses, + ) { try { final section = courseData[selectedCourse]; return Padding( @@ -71,8 +76,9 @@ class ClassScheduleCard extends StatelessWidget { 'Next Class', style: TextStyle( fontSize: 22.0, - color: - Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + color: Theme.of(context).brightness == Brightness.light + ? lightPrimaryColor + : darkPrimaryColor2, fontWeight: FontWeight.w500, ), ), @@ -102,22 +108,14 @@ class ClassScheduleCard extends StatelessWidget { ), ), // Vertical Divider - SizedBox( - height: 276, - child: VerticalDivider( - color: listTileDividerColorDark, - thickness: 0.7, - ), - ), + SizedBox(height: 276, child: VerticalDivider(color: listTileDividerColorDark, thickness: 0.7)), // Right-hand side of the card // Flexible( flex: 4, // Adjusts width of Right Hand Side child: Column( mainAxisAlignment: MainAxisAlignment.start, // Aligns content to the top crossAxisAlignment: CrossAxisAlignment.start, // Align text to the left - children: [ - UpcomingCoursesList(), - ], + children: [UpcomingCoursesList()], ), ), ], @@ -145,13 +143,16 @@ class ClassScheduleCard extends StatelessWidget { // Heading 3 i.e. "CSE 141L" Widget buildClassCode(BuildContext context, String className) { - return Text(className, - style: TextStyle( - fontSize: 17.0, - fontFamily: 'Refrigerator Deluxe', - letterSpacing: 1.2, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, - fontWeight: FontWeight.w900)); + return Text( + className, + style: TextStyle( + fontSize: 17.0, + fontFamily: 'Refrigerator Deluxe', + letterSpacing: 1.2, + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + fontWeight: FontWeight.w900, + ), + ); } // Small body text i.e. "Laboratory" @@ -162,8 +163,9 @@ class ClassScheduleCard extends StatelessWidget { classType, style: TextStyle( fontSize: 17, - color: - Theme.of(context).brightness == Brightness.light ? descriptiveTextColorLight : descriptiveTextColorDark, + color: Theme.of(context).brightness == Brightness.light + ? descriptiveTextColorLight + : descriptiveTextColorDark, fontWeight: FontWeight.w400, ), ), @@ -196,11 +198,14 @@ class ClassScheduleCard extends StatelessWidget { ), ), SizedBox(height: 5), - Text((day ?? 'TBA') + ' @ ' + (time ?? 'TBA'), - style: TextStyle( - fontSize: 15, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, - fontWeight: FontWeight.w700)) + Text( + (day ?? 'TBA') + ' @ ' + (time ?? 'TBA'), + style: TextStyle( + fontSize: 15, + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + fontWeight: FontWeight.w700, + ), + ), ], ), ], @@ -236,10 +241,11 @@ class ClassScheduleCard extends StatelessWidget { Text( location, style: TextStyle( - fontSize: 15, - letterSpacing: 0.8, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, - fontWeight: FontWeight.w700), + fontSize: 15, + letterSpacing: 0.8, + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + fontWeight: FontWeight.w700, + ), ), ], ), @@ -253,9 +259,11 @@ class ClassScheduleCard extends StatelessWidget { padding: const EdgeInsets.only(left: 4.0), child: Row( children: [ - Icon(Icons.check_box_outlined, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, - size: 34), + Icon( + Icons.check_box_outlined, + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + size: 34, + ), SizedBox(width: 10), Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -274,9 +282,10 @@ class ClassScheduleCard extends StatelessWidget { Text( gradeEvaluation, style: TextStyle( - fontSize: 16, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, - fontWeight: FontWeight.w700), + fontSize: 16, + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + fontWeight: FontWeight.w700, + ), ), ], ), diff --git a/lib/ui/classes/classes_list.dart b/lib/ui/classes/classes_list.dart index b1f63d798..819a87083 100644 --- a/lib/ui/classes/classes_list.dart +++ b/lib/ui/classes/classes_list.dart @@ -10,59 +10,59 @@ import 'package:campus_mobile_experimental/app_styles.dart'; class ClassList extends StatelessWidget { @override Widget build(BuildContext context) { - return ContainerView( - child: buildSchedule(context), - ); + return ContainerView(child: buildSchedule(context)); } Widget buildSchedule(BuildContext context) { List list = []; - Provider.of(context) - .enrolledClasses - .addAll(Provider.of(context).midterms); - Provider.of(context).enrolledClasses.keys.forEach( - (key) { - final bool hasClasses = Provider.of(context).enrolledClasses[key]!.isNotEmpty; - if (hasClasses) { - list.add(SliverStickyHeader( + Provider.of( + context, + ).enrolledClasses.addAll(Provider.of(context).midterms); + Provider.of(context).enrolledClasses.keys.forEach((key) { + final bool hasClasses = Provider.of(context).enrolledClasses[key]!.isNotEmpty; + if (hasClasses) { + list.add( + SliverStickyHeader( header: buildWeekDayHeader(context, key), sliver: SliverList( delegate: SliverChildBuilderDelegate((context, index) { if (key == 'MI') { return buildMidterm( - Provider.of(context).enrolledClasses[key]!.elementAt(index)); + Provider.of(context).enrolledClasses[key]!.elementAt(index), + ); } return buildClass( - Provider.of(context).enrolledClasses[key]!.elementAt(index)); + Provider.of(context).enrolledClasses[key]!.elementAt(index), + ); }, childCount: Provider.of(context).enrolledClasses[key]!.length), ), - )); - } - }, - ); + ), + ); + } + }); return CustomScrollView(slivers: list); } -// Widget buildHeader( -// BuildContext context, String weekday, String specialMtgCode) { -// if (specialMtgCode == null) { -// buildWeekDayHeader(context, weekday); -// } else { -// return Container( -// color: Theme.of(context).secondaryHeaderColor, -// child: Padding( -// padding: const EdgeInsets.all(12.0), -// child: Text( -// "Midterm", -// style: TextStyle( -// fontSize: 20.0, -// color: Colors.white, -// ), -// ), -// ), -// ); -// } -// } + // Widget buildHeader( + // BuildContext context, String weekday, String specialMtgCode) { + // if (specialMtgCode == null) { + // buildWeekDayHeader(context, weekday); + // } else { + // return Container( + // color: Theme.of(context).secondaryHeaderColor, + // child: Padding( + // padding: const EdgeInsets.all(12.0), + // child: Text( + // "Midterm", + // style: TextStyle( + // fontSize: 20.0, + // color: Colors.white, + // ), + // ), + // ), + // ); + // } + // } Widget buildWeekDayHeader(BuildContext context, String weekday) { weekday = abbrevToFullWeekday(weekday); @@ -70,12 +70,7 @@ class ClassList extends StatelessWidget { color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : descriptiveTextColorLight, child: Padding( padding: const EdgeInsets.all(12.0), - child: Text( - weekday, - style: Theme.of(context).textTheme.bodySmall?.copyWith( - color: Colors.white, - ), - ), + child: Text(weekday, style: Theme.of(context).textTheme.bodySmall?.copyWith(color: Colors.white)), ), ); } @@ -92,22 +87,19 @@ class ClassList extends StatelessWidget { sectionData.subjectCode! + ' ' + sectionData.courseCode!, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17.0), ), - Text( - sectionData.courseTitle!, - style: TextStyle(fontSize: 17.0), - ), + Text(sectionData.courseTitle!, style: TextStyle(fontSize: 17.0)), Text(sectionData.instructorName!, style: TextStyle(fontSize: 17.0)), Padding( padding: const EdgeInsets.only(top: 5.0), - child: Row(children: [ - Text(sectionData.meetingType! + ' '), - TimeRangeWidget( - time: sectionData.time!, - ) - ]), + child: Row( + children: [ + Text(sectionData.meetingType! + ' '), + TimeRangeWidget(time: sectionData.time!), + ], + ), ), Text(sectionData.building! + ' ' + sectionData.room!), - Text(sectionData.gradeOption) + Text(sectionData.gradeOption), ], ), ), @@ -150,20 +142,17 @@ class ClassList extends StatelessWidget { sectionData.subjectCode! + ' ' + sectionData.courseCode!, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17.0), ), - Text( - sectionData.courseTitle!, - style: TextStyle(fontSize: 17.0), - ), + Text(sectionData.courseTitle!, style: TextStyle(fontSize: 17.0)), Text(sectionData.instructorName!), Text(sectionData.building! + ' ' + sectionData.room!), Padding( padding: const EdgeInsets.only(top: 5.0), - child: Row(children: [ - Text(abbrevToFullWeekday(sectionData.days) + ", " + formatDate(sectionData.date)! + ' from '), - TimeRangeWidget( - time: sectionData.time!, - ) - ]), + child: Row( + children: [ + Text(abbrevToFullWeekday(sectionData.days) + ", " + formatDate(sectionData.date)! + ' from '), + TimeRangeWidget(time: sectionData.time!), + ], + ), ), ], ), diff --git a/lib/ui/classes/upcoming_classes.dart b/lib/ui/classes/upcoming_classes.dart index e5bd68bab..3dd82c53e 100644 --- a/lib/ui/classes/upcoming_classes.dart +++ b/lib/ui/classes/upcoming_classes.dart @@ -46,10 +46,7 @@ class UpcomingCoursesList extends StatelessWidget { ), ), ), - ListView( - children: listOfCourses, - shrinkWrap: true, - ), + ListView(children: listOfCourses, shrinkWrap: true), ], ); } @@ -74,8 +71,8 @@ class UpcomingCoursesList extends StatelessWidget { color: isSelected ? toggleActiveColor : Theme.of(context).brightness == Brightness.light - ? lightPrimaryColor - : darkPrimaryColor2, + ? lightPrimaryColor + : darkPrimaryColor2, ), ), SizedBox(height: 5), @@ -87,8 +84,8 @@ class UpcomingCoursesList extends StatelessWidget { color: isSelected ? toggleActiveColor : Theme.of(context).brightness == Brightness.light - ? descriptiveTextColorLight - : descriptiveTextColorDark, + ? descriptiveTextColorLight + : descriptiveTextColorDark, fontWeight: FontWeight.w400, ), ), diff --git a/lib/ui/common/action_button.dart b/lib/ui/common/action_button.dart index 60cd9b271..a0895a548 100644 --- a/lib/ui/common/action_button.dart +++ b/lib/ui/common/action_button.dart @@ -6,12 +6,8 @@ class ActionButton extends StatelessWidget { final VoidCallback onPressed; final IconData? trailingIcon; - const ActionButton({ - Key? key, - required this.buttonText, - required this.onPressed, - this.trailingIcon, - }) : super(key: key); + const ActionButton({Key? key, required this.buttonText, required this.onPressed, this.trailingIcon}) + : super(key: key); @override Widget build(BuildContext context) { @@ -25,11 +21,7 @@ class ActionButton extends StatelessWidget { return TextButton( style: ButtonStyle( backgroundColor: WidgetStatePropertyAll(actionButtonBackgroundColor), - shape: WidgetStatePropertyAll( - RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(8)), - ), - ), + shape: WidgetStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(8)))), alignment: Alignment.centerLeft, padding: WidgetStatePropertyAll(EdgeInsets.zero), minimumSize: WidgetStatePropertyAll(Size.zero), diff --git a/lib/ui/common/action_link.dart b/lib/ui/common/action_link.dart index 5c0d5cc16..bf98e1431 100644 --- a/lib/ui/common/action_link.dart +++ b/lib/ui/common/action_link.dart @@ -5,11 +5,7 @@ class ActionLink extends StatelessWidget { final String buttonText; final VoidCallback onPressed; - const ActionLink({ - Key? key, - required this.buttonText, - required this.onPressed, - }) : super(key: key); + const ActionLink({Key? key, required this.buttonText, required this.onPressed}) : super(key: key); @override Widget build(BuildContext context) { @@ -26,9 +22,7 @@ class ActionLink extends StatelessWidget { child: Text( buttonText, textAlign: TextAlign.start, - style: Theme.of(context).textTheme.labelLarge?.copyWith( - decoration: TextDecoration.underline, - ), + style: Theme.of(context).textTheme.labelLarge?.copyWith(decoration: TextDecoration.underline), ), ), onPressed: onPressed, diff --git a/lib/ui/common/alert_dialog_widget.dart b/lib/ui/common/alert_dialog_widget.dart index ab61b2b3f..a664752ed 100644 --- a/lib/ui/common/alert_dialog_widget.dart +++ b/lib/ui/common/alert_dialog_widget.dart @@ -71,13 +71,7 @@ class AlertDialogWidget extends StatelessWidget { title: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Expanded( - child: Icon( - icon, - color: errorAlertDialogLightTheme.colorScheme.primary, - ), - flex: 1, - ), + Expanded(child: Icon(icon, color: errorAlertDialogLightTheme.colorScheme.primary), flex: 1), Expanded( child: Text( title, @@ -93,10 +87,7 @@ class AlertDialogWidget extends StatelessWidget { ), Expanded( child: IconButton( - icon: Icon( - Icons.close, - color: errorAlertDialogLightTheme.colorScheme.primary, - ), + icon: Icon(Icons.close, color: errorAlertDialogLightTheme.colorScheme.primary), alignment: Alignment.topRight, onPressed: onClose, ), @@ -105,17 +96,12 @@ class AlertDialogWidget extends StatelessWidget { ], ), content: Container( - constraints: BoxConstraints( - maxHeight: MediaQuery.of(context).size.height * 0.6, - ), + constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.6), child: SingleChildScrollView( child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded( - flex: 1, - child: Container(), - ), + Expanded(flex: 1, child: Container()), Expanded( flex: 6, child: Column( @@ -134,10 +120,7 @@ class AlertDialogWidget extends StatelessWidget { ], ), ), - Expanded( - flex: 1, - child: Container(), - ), + Expanded(flex: 1, child: Container()), ], ), ), diff --git a/lib/ui/common/base64_image_widget.dart b/lib/ui/common/base64_image_widget.dart index 90ce46b7f..1cd5bcdee 100644 --- a/lib/ui/common/base64_image_widget.dart +++ b/lib/ui/common/base64_image_widget.dart @@ -53,11 +53,6 @@ class Base64ImageWidget extends StatelessWidget { } Widget _buildPlaceholder() { - return Image.asset( - placeholderAssetPath, - fit: fit, - width: width, - height: height, - ); + return Image.asset(placeholderAssetPath, fit: fit, width: width, height: height); } } diff --git a/lib/ui/common/card_container.dart b/lib/ui/common/card_container.dart index f8f9436f6..d6ff84406 100644 --- a/lib/ui/common/card_container.dart +++ b/lib/ui/common/card_container.dart @@ -19,8 +19,8 @@ class CardContainer extends StatelessWidget { this.footer, this.hideMenu = false, this.cardId, - }) : active = active ?? false, - super(key: key); + }) : active = active ?? false, + super(key: key); /// required parameters final String titleText; @@ -47,19 +47,13 @@ class CardContainer extends StatelessWidget { semanticContainer: false, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12.0), - side: BorderSide( - color: dotsUnselectedColor, - width: 0.5, - ), + side: BorderSide(color: dotsUnselectedColor, width: 0.5), ), color: Theme.of(context).brightness == Brightness.dark ? darkPrimaryBgColor : lightAccentColor, child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - CardHeader( - titleText: titleText, - trailing: buildMenu(), - ), + CardHeader(titleText: titleText, trailing: buildMenu()), buildBody(context), Padding( padding: const EdgeInsets.only(top: 16, right: 0, bottom: 16, left: 8), @@ -93,10 +87,7 @@ class CardContainer extends StatelessWidget { } else { customErrorText = 'No finals found.'; } - return Padding( - padding: const EdgeInsets.only(bottom: 42.0), - child: Text(customErrorText), - ); + return Padding(padding: const EdgeInsets.only(bottom: 42.0), child: Text(customErrorText)); } else if (titleText == 'CLASSES') { var customErrorText = ''; if (errorText!.contains('Exception')) { @@ -115,11 +106,10 @@ class CardContainer extends StatelessWidget { constraints: BoxConstraints(minHeight: cardContentMinHeight), child: Center( child: Container( - height: 32, - width: 32, - child: CircularProgressIndicator( - color: Theme.of(context).colorScheme.secondary, - )), + height: 32, + width: 32, + child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary), + ), ), ); } else if (titleText == "BUSYNESS") { @@ -145,10 +135,7 @@ class CardContainer extends StatelessWidget { child: child(), ); } else { - return Container( - width: double.infinity, - child: child(), - ); + return Container(width: double.infinity, child: child()); } } @@ -157,12 +144,7 @@ class CardContainer extends StatelessWidget { return OverflowBar( children: [ - buildMenuOptions( - { - CardMenuOptionConstants.RELOAD_CARD: reload, - CardMenuOptionConstants.HIDE_CARD: hide, - }, - ), + buildMenuOptions({CardMenuOptionConstants.RELOAD_CARD: reload, CardMenuOptionConstants.HIDE_CARD: hide}), ], ); } @@ -192,11 +174,7 @@ class CardContainer extends StatelessWidget { underline: Container(), icon: Transform.translate( offset: Offset(6, -3), - child: Icon( - Icons.more_vert, - color: dotsUnselectedColor, - semanticLabel: '$titleText Card Menu', - ), + child: Icon(Icons.more_vert, color: dotsUnselectedColor, semanticLabel: '$titleText Card Menu'), ), onChanged: (String? selectedMenuItem) => onMenuItemPressed(selectedMenuItem), ), diff --git a/lib/ui/common/container_view.dart b/lib/ui/common/container_view.dart index 06d90b6dd..e9b22397c 100644 --- a/lib/ui/common/container_view.dart +++ b/lib/ui/common/container_view.dart @@ -3,10 +3,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class ContainerView extends StatelessWidget { - const ContainerView({ - Key? key, - required this.child, - }) : super(key: key); + const ContainerView({Key? key, required this.child}) : super(key: key); final Widget child; diff --git a/lib/ui/common/directions_helper.dart b/lib/ui/common/directions_helper.dart index e1b3fc7e6..f799c5c04 100644 --- a/lib/ui/common/directions_helper.dart +++ b/lib/ui/common/directions_helper.dart @@ -13,10 +13,7 @@ class DirectionsHelper { final appleUri = Uri.parse(appleMapsUrl); final canLaunchAppleMaps = await canLaunchUrl(appleUri); if (canLaunchAppleMaps) { - await launchUrl( - appleUri, - mode: LaunchMode.externalApplication, - ); + await launchUrl(appleUri, mode: LaunchMode.externalApplication); return; } } @@ -26,10 +23,7 @@ class DirectionsHelper { final googleAppUri = Uri.parse(googleMapsAppUrl); final canLaunchGoogleMapsApp = await canLaunchUrl(googleAppUri); if (canLaunchGoogleMapsApp) { - await launchUrl( - googleAppUri, - mode: LaunchMode.externalApplication, - ); + await launchUrl(googleAppUri, mode: LaunchMode.externalApplication); return; } @@ -38,10 +32,7 @@ class DirectionsHelper { final googleWebUri = Uri.parse(googleMapsWebUrl); final canLaunchGoogleMapsWeb = await canLaunchUrl(googleWebUri); if (canLaunchGoogleMapsWeb) { - await launchUrl( - googleWebUri, - mode: LaunchMode.externalApplication, - ); + await launchUrl(googleWebUri, mode: LaunchMode.externalApplication); } else { // If all else fails, show an error debugPrint('Failed to open directions: No map apps available'); diff --git a/lib/ui/common/event_time.dart b/lib/ui/common/event_time.dart index df57a63c1..fd6e9265a 100644 --- a/lib/ui/common/event_time.dart +++ b/lib/ui/common/event_time.dart @@ -65,13 +65,9 @@ class EventDateTime extends StatelessWidget { } } else { if (!unspecifiedTime) { - return Text(startMonthDay + - ', ' + - startTime + - ' - ' + - endMonthDay + - ', ' + - endTime); // ex: Jan. 1, 8:00 AM - Jan. 2, 12:00 PM + return Text( + startMonthDay + ', ' + startTime + ' - ' + endMonthDay + ', ' + endTime, + ); // ex: Jan. 1, 8:00 AM - Jan. 2, 12:00 PM } else { return Text(startMonthDay + ' - ' + endMonthDay); // ex: Jan. 1 - Jan. 2 } @@ -101,10 +97,7 @@ class EventTileDateTime extends StatelessWidget { var unspecifiedTime = (startTime == '12:00 AM' && endTime == '12:00 AM'); Widget date, time; if (sameDay) { - date = Text( - startMonthDayYear, - style: TextStyle(fontSize: 12), - ); // Ex. June 11, 2021 + date = Text(startMonthDayYear, style: TextStyle(fontSize: 12)); // Ex. June 11, 2021 } else { // if not the same date, check if the same year var startYear = startMonthDayYear.substring(startMonthDayYear.indexOf(',') + 2, startMonthDayYear.length); @@ -115,8 +108,10 @@ class EventTileDateTime extends StatelessWidget { var endMonth = endMonthDayYear.substring(0, endMonthDayYear.indexOf(' ')); if (startMonth == endMonth) { // if different date in the same month and year - var startDay = - startMonthDayYear.substring(startMonthDayYear.indexOf(' ') + 1, startMonthDayYear.indexOf(',')); + var startDay = startMonthDayYear.substring( + startMonthDayYear.indexOf(' ') + 1, + startMonthDayYear.indexOf(','), + ); var endDay = endMonthDayYear.substring(endMonthDayYear.indexOf(' ') + 1, endMonthDayYear.indexOf(',')); date = Text( startMonth + ' ' + startDay + ' - ' + endDay + ', ' + startYear, @@ -140,25 +135,17 @@ class EventTileDateTime extends StatelessWidget { } if (unspecifiedTime) { - time = Text( - '', - style: TextStyle(fontSize: 12), - ); + time = Text('', style: TextStyle(fontSize: 12)); } else { - time = Text( - startTime + ' - ' + endTime, - style: TextStyle(fontSize: 12), - ); + time = Text(startTime + ' - ' + endTime, style: TextStyle(fontSize: 12)); } return Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ date, - Padding( - padding: EdgeInsets.only(bottom: 5), - ), - time + Padding(padding: EdgeInsets.only(bottom: 5)), + time, ], ); } catch (e) { diff --git a/lib/ui/common/image_loader.dart b/lib/ui/common/image_loader.dart index 04c96f1f8..568db5645 100644 --- a/lib/ui/common/image_loader.dart +++ b/lib/ui/common/image_loader.dart @@ -18,10 +18,7 @@ class ImageLoader extends StatelessWidget { @override Widget build(BuildContext context) { return url.isEmpty - ? Container( - width: 0, - height: 0, - ) + ? Container(width: 0, height: 0) : Image.network( url, width: fullSize ? null : width, @@ -39,10 +36,7 @@ class ImageLoader extends StatelessWidget { ); }, errorBuilder: (BuildContext context, Object error, StackTrace? stackTrace) { - return Container( - width: 0, - height: 0, - ); + return Container(width: 0, height: 0); }, ); } diff --git a/lib/ui/common/last_updated_widget.dart b/lib/ui/common/last_updated_widget.dart index ac54bc013..8747da399 100644 --- a/lib/ui/common/last_updated_widget.dart +++ b/lib/ui/common/last_updated_widget.dart @@ -10,12 +10,16 @@ class LastUpdatedWidget extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - child: Text('Last updated: ' + determineText(time), - style: TextStyle( - fontSize: 16.0, - fontStyle: FontStyle.italic, - fontWeight: FontWeight.w400, - color: descriptiveTextColorLight))); + child: Text( + 'Last updated: ' + determineText(time), + style: TextStyle( + fontSize: 16.0, + fontStyle: FontStyle.italic, + fontWeight: FontWeight.w400, + color: descriptiveTextColorLight, + ), + ), + ); } static String determineText(DateTime time) { diff --git a/lib/ui/common/linkify_with_catch.dart b/lib/ui/common/linkify_with_catch.dart index 1c65cdcd5..da89a15f9 100644 --- a/lib/ui/common/linkify_with_catch.dart +++ b/lib/ui/common/linkify_with_catch.dart @@ -13,9 +13,13 @@ class LinkifyWithCatch extends StatelessWidget { final TextAlign textAlign; final bool looseUrl; - const LinkifyWithCatch( - {Key? key, required this.text, this.style, this.textAlign = TextAlign.start, this.looseUrl = false}) - : super(key: key); + const LinkifyWithCatch({ + Key? key, + required this.text, + this.style, + this.textAlign = TextAlign.start, + this.looseUrl = false, + }) : super(key: key); @override Widget build(BuildContext context) { @@ -24,9 +28,7 @@ class LinkifyWithCatch extends StatelessWidget { try { launchUrl(Uri.parse(link.url), mode: LaunchMode.inAppBrowserView); } catch (e) { - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text('Could not open.'), - )); + ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text('Could not open.'))); } }, options: LinkifyOptions(humanize: false, looseUrl: looseUrl), diff --git a/lib/ui/common/time_range_widget.dart b/lib/ui/common/time_range_widget.dart index 8f1774335..7d9efab7e 100644 --- a/lib/ui/common/time_range_widget.dart +++ b/lib/ui/common/time_range_widget.dart @@ -7,10 +7,7 @@ import 'package:campus_mobile_experimental/app_styles.dart'; /// be cautious of the spacing, it must be exactly as shown above /// The TimeRangeWidget will build a Text Widget that displays 5:01 PM - 8:20 PM class TimeRangeWidget extends StatelessWidget { - const TimeRangeWidget({ - Key? key, - required this.time, - }) : super(key: key); + const TimeRangeWidget({Key? key, required this.time}) : super(key: key); final String time; @@ -46,20 +43,8 @@ String? formattedTimeRange(String? theHours) { try { final now = DateTime.now(); - final startTime = DateTime( - now.year, - now.month, - now.day, - int.parse(match.group(1)!), - int.parse(match.group(2)!), - ); - final endTime = DateTime( - now.year, - now.month, - now.day, - int.parse(match.group(3)!), - int.parse(match.group(4)!), - ); + final startTime = DateTime(now.year, now.month, now.day, int.parse(match.group(1)!), int.parse(match.group(2)!)); + final endTime = DateTime(now.year, now.month, now.day, int.parse(match.group(3)!), int.parse(match.group(4)!)); return '${DateFormat.jm().format(startTime)} - ${DateFormat.jm().format(endTime)}'; } catch (_) { return theHours; diff --git a/lib/ui/common/top_content.dart b/lib/ui/common/top_content.dart index ed542b621..5fcffb472 100644 --- a/lib/ui/common/top_content.dart +++ b/lib/ui/common/top_content.dart @@ -3,11 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; class TopContent extends StatelessWidget { - TopContent({ - this.title, - this.action, - required this.hasAction, - }); + TopContent({this.title, this.action, required this.hasAction}); final String? title; final Widget? action; @@ -24,17 +20,11 @@ class TopContent extends StatelessWidget { primary: true, centerTitle: true, title: Padding( - padding: const EdgeInsets.only(bottom: 8.0), - child: title == null - ? Image.asset( - 'assets/images/UCSanDiegoLogo-nav.png', - fit: BoxFit.contain, - height: 28, - ) - : Text( - title!, - style: appBarTitleStyle, - )), + padding: const EdgeInsets.only(bottom: 8.0), + child: title == null + ? Image.asset('assets/images/UCSanDiegoLogo-nav.png', fit: BoxFit.contain, height: 28) + : Text(title!, style: appBarTitleStyle), + ), actions: hasAction ? [action!] : [], systemOverlayStyle: SystemUiOverlayStyle.light, ), diff --git a/lib/ui/common/webview_container.dart b/lib/ui/common/webview_container.dart index cee025495..b896fa2bc 100644 --- a/lib/ui/common/webview_container.dart +++ b/lib/ui/common/webview_container.dart @@ -164,7 +164,8 @@ class _WebViewContainerState extends State with AutomaticKeepA // check if this webCard needs an auth token if (widget.requireAuth) { _userDataProvider = Provider.of(context); - webCardUrl = widget.initialUrl + + webCardUrl = + widget.initialUrl + "?expiration=${_userDataProvider.authenticationModel.expiration}#${_userDataProvider.authenticationModel.accessToken}"; } else { webCardUrl = widget.initialUrl; @@ -180,10 +181,7 @@ class _WebViewContainerState extends State with AutomaticKeepA semanticContainer: false, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12.0), - side: BorderSide( - color: dotsUnselectedColor, - width: 0.5, - ), + side: BorderSide(color: dotsUnselectedColor, width: 0.5), ), color: Theme.of(context).brightness == Brightness.dark ? darkPrimaryBgColor : lightAccentColor, child: Column( @@ -214,15 +212,10 @@ class _WebViewContainerState extends State with AutomaticKeepA _lastLoadedUrl = webCardUrl; } return ClipRRect( - borderRadius: BorderRadius.only( - bottomLeft: Radius.circular(12.0), - bottomRight: Radius.circular(12.0), - ), + borderRadius: BorderRadius.only(bottomLeft: Radius.circular(12.0), bottomRight: Radius.circular(12.0)), child: SizedBox( height: _contentHeight, - child: WebViewWidget( - controller: _webViewController, - ), + child: WebViewWidget(controller: _webViewController), ), ); } diff --git a/lib/ui/dining/dining_busyness_bar.dart b/lib/ui/dining/dining_busyness_bar.dart index c98d9a3e9..db466b9d3 100644 --- a/lib/ui/dining/dining_busyness_bar.dart +++ b/lib/ui/dining/dining_busyness_bar.dart @@ -5,22 +5,15 @@ import 'package:flutter/material.dart'; import 'package:campus_mobile_experimental/core/models/dining.dart'; class DiningBusynessBar extends StatelessWidget { - const DiningBusynessBar({ - Key? key, - required this.diningModel, - required this.busynessDiningHallModel, - }) : super(key: key); + const DiningBusynessBar({Key? key, required this.diningModel, required this.busynessDiningHallModel}) + : super(key: key); final DiningModel diningModel; final AvailabilityModel busynessDiningHallModel; @override Widget build(BuildContext context) { - return Column( - children: [ - buildAvailabilityBars(context), - ], - ); + return Column(children: [buildAvailabilityBars(context)]); } Widget buildAvailabilityBars(BuildContext context) { @@ -28,17 +21,15 @@ class DiningBusynessBar extends StatelessWidget { return Container( alignment: Alignment.center, padding: EdgeInsets.only(top: DATA_UNAVAILABLE_TOP_PADDING), - child: Text( - "Data Unavailable", - style: TextStyle(fontSize: LOCATION_FONT_SIZE), - ), + child: Text("Data Unavailable", style: TextStyle(fontSize: LOCATION_FONT_SIZE)), ); } // Only display the subLocation where subLocation.name == diningModel.name final matchingSubLocation = busynessDiningHallModel.subLocations .where( - (subLocation) => diningModel.name.contains(subLocation.name) || subLocation.name.contains(diningModel.name)) + (subLocation) => diningModel.name.contains(subLocation.name) || subLocation.name.contains(diningModel.name), + ) .toList(); if (matchingSubLocation.isEmpty) { @@ -67,12 +58,11 @@ class DiningBusynessBar extends StatelessWidget { child: ClipRRect( borderRadius: BorderRadius.circular(BORDER_RADIUS), child: LinearProgressIndicator( - value: - (percentAvailability(subLocation) <= 0.01) ? 0.01 : percentAvailability(subLocation).toDouble(), + value: (percentAvailability(subLocation) <= 0.01) + ? 0.01 + : percentAvailability(subLocation).toDouble(), backgroundColor: Colors.grey[BACKGROUND_GREY_SHADE], - valueColor: AlwaysStoppedAnimation( - setIndicatorColor(percentAvailability(subLocation)), - ), + valueColor: AlwaysStoppedAnimation(setIndicatorColor(percentAvailability(subLocation))), ), ), ), diff --git a/lib/ui/dining/dining_card.dart b/lib/ui/dining/dining_card.dart index b369e587e..8d6e88712 100644 --- a/lib/ui/dining/dining_card.dart +++ b/lib/ui/dining/dining_card.dart @@ -25,15 +25,16 @@ class DiningCard extends StatelessWidget { child: () => buildDiningCard(Provider.of(context).diningModels), actionButtons: [ ActionButton( - buttonText: 'VIEW ALL DINING OPTIONS', - onPressed: () { - analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'view_all'}); - // Only navigate if not loading and no error - final provider = Provider.of(context, listen: false); - final bool isNotLoading = !provider.isLoading; - final bool hasNoError = provider.error == null; - if (isNotLoading && hasNoError) Navigator.pushNamed(context, RoutePaths.DINING_VIEW_ALL_DINING_OPTIONS); - }) + buttonText: 'VIEW ALL DINING OPTIONS', + onPressed: () { + analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'view_all'}); + // Only navigate if not loading and no error + final provider = Provider.of(context, listen: false); + final bool isNotLoading = !provider.isLoading; + final bool hasNoError = provider.error == null; + if (isNotLoading && hasNoError) Navigator.pushNamed(context, RoutePaths.DINING_VIEW_ALL_DINING_OPTIONS); + }, + ), ], ); } diff --git a/lib/ui/dining/dining_detail_view.dart b/lib/ui/dining/dining_detail_view.dart index bd1b4df54..8bb21f2c2 100644 --- a/lib/ui/dining/dining_detail_view.dart +++ b/lib/ui/dining/dining_detail_view.dart @@ -59,13 +59,17 @@ class _DiningDetailViewState extends State { final bool hasSpecialsTitle = specials?.specialTitle?.isNotEmpty == true; // Move variable declarations outside the list final bool hasModelOne = busynessDiningHallModelOne != null; - final bool modelOneMatches = hasModelOne && - busynessDiningHallModelOne.subLocations - .any((child) => child.name.contains(diningModel.name) || diningModel.name.contains(child.name)); + final bool modelOneMatches = + hasModelOne && + busynessDiningHallModelOne.subLocations.any( + (child) => child.name.contains(diningModel.name) || diningModel.name.contains(child.name), + ); final bool hasModelTwo = busynessDiningHallModelTwo != null; - final bool modelTwoMatches = hasModelTwo && - busynessDiningHallModelTwo.subLocations - .any((child) => child.name.contains(diningModel.name) || diningModel.name.contains(child.name)); + final bool modelTwoMatches = + hasModelTwo && + busynessDiningHallModelTwo.subLocations.any( + (child) => child.name.contains(diningModel.name) || diningModel.name.contains(child.name), + ); return [ Row( @@ -76,10 +80,7 @@ class _DiningDetailViewState extends State { child: diningModel.vendorLogo != null ? Container( decoration: Theme.of(context).brightness == Brightness.dark - ? BoxDecoration( - color: lightTextColor, - borderRadius: BorderRadius.circular(8), - ) + ? BoxDecoration(color: lightTextColor, borderRadius: BorderRadius.circular(8)) : null, child: Image.network( diningModel.vendorLogo!, @@ -88,9 +89,11 @@ class _DiningDetailViewState extends State { semanticLabel: 'Location logo', ), ) - : Icon(Icons.restaurant, + : Icon( + Icons.restaurant, size: 56, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2), + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + ), ), SizedBox(width: 8), Flexible( @@ -133,9 +136,11 @@ class _DiningDetailViewState extends State { if (modelOneMatches || modelTwoMatches) DiningBusynessBar( diningModel: diningModel, - busynessDiningHallModel: (busynessDiningHallModelOne != null && - busynessDiningHallModelOne.subLocations - .any((child) => child.name.contains(diningModel.name) || diningModel.name.contains(child.name))) + busynessDiningHallModel: + (busynessDiningHallModelOne != null && + busynessDiningHallModelOne.subLocations.any( + (child) => child.name.contains(diningModel.name) || diningModel.name.contains(child.name), + )) ? busynessDiningHallModelOne : busynessDiningHallModelTwo!, ), @@ -148,14 +153,8 @@ class _DiningDetailViewState extends State { // Vendor Payment Options buildPaymentOptions(context, diningModel), // Vendor Location - Text( - 'Location', - style: Theme.of(context).textTheme.titleMedium, - ), - Transform.translate( - offset: const Offset(0, -15), - child: buildDirectionsButton(context, diningModel), - ), + Text('Location', style: Theme.of(context).textTheme.titleMedium), + Transform.translate(offset: const Offset(0, -15), child: buildDirectionsButton(context, diningModel)), Transform.translate( offset: const Offset(0, -12), child: Row( @@ -174,22 +173,19 @@ class _DiningDetailViewState extends State { ///////////// Hours Section ///////////// Widget buildHours(BuildContext context, prefix0.DiningModel model) { - return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox(height: 14), - Text( - "Hours", - textAlign: TextAlign.start, - style: Theme.of(context).textTheme.titleMedium, - ), - SizedBox(height: 8), - ...List.generate( + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 14), + Text("Hours", textAlign: TextAlign.start, style: Theme.of(context).textTheme.titleMedium), + SizedBox(height: 8), + ...List.generate( 7, - (i) => [ - HoursOfDay(day: i + 1, model: model), - if (i < 6) buildDivider(context), - ]).expand((widgetPair) => widgetPair).toList(), - SizedBox(height: 16), - ]); + (i) => [HoursOfDay(day: i + 1, model: model), if (i < 6) buildDivider(context)], + ).expand((widgetPair) => widgetPair).toList(), + SizedBox(height: 16), + ], + ); } Widget buildDivider(BuildContext context) { @@ -209,25 +205,16 @@ class _DiningDetailViewState extends State { model.specialHours!.specialHoursValidFrom! + " to " + model.specialHours!.specialHoursValidTo! + "\n"; } return Container( - child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - "Special Hours", - style: Theme.of(context).textTheme.titleMedium, - ), - SizedBox(height: 10), - Text( - model.specialHours!.specialHoursEvent, - style: Theme.of(context).textTheme.bodySmall, - ), - Text( - model.specialHours!.specialHoursEventDetails, - style: Theme.of(context).textTheme.bodySmall, - ), - Text( - specialHoursDuration, - style: Theme.of(context).textTheme.bodySmall, - ) - ]), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text("Special Hours", style: Theme.of(context).textTheme.titleMedium), + SizedBox(height: 10), + Text(model.specialHours!.specialHoursEvent, style: Theme.of(context).textTheme.bodySmall), + Text(model.specialHours!.specialHoursEventDetails, style: Theme.of(context).textTheme.bodySmall), + Text(specialHoursDuration, style: Theme.of(context).textTheme.bodySmall), + ], + ), ); } @@ -239,25 +226,20 @@ class _DiningDetailViewState extends State { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - "Specials", - style: Theme.of(context).textTheme.titleMedium, - ), + Text("Specials", style: Theme.of(context).textTheme.titleMedium), SizedBox(height: 8), Text( model.specials?.specialTitle ?? '', style: TextStyle( - fontSize: 17, - color: Theme.of(context).brightness == Brightness.light - ? descriptiveTextColorLight - : descriptiveTextColorDark, - fontWeight: FontWeight.w700), + fontSize: 17, + color: Theme.of(context).brightness == Brightness.light + ? descriptiveTextColorLight + : descriptiveTextColorDark, + fontWeight: FontWeight.w700, + ), ), SizedBox(height: 4), - Text( - model.specials?.specialDescription ?? '', - style: Theme.of(context).textTheme.bodySmall, - ), + Text(model.specials?.specialDescription ?? '', style: Theme.of(context).textTheme.bodySmall), ], ); } @@ -270,15 +252,9 @@ class _DiningDetailViewState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - "Payment Options", - style: Theme.of(context).textTheme.titleMedium, - ), + Text("Payment Options", style: Theme.of(context).textTheme.titleMedium), SizedBox(height: 10), - Text( - options, - style: Theme.of(context).textTheme.bodySmall, - ), + Text(options, style: Theme.of(context).textTheme.bodySmall), ], ), ); @@ -316,12 +292,13 @@ Widget buildDirectionsButton(BuildContext context, prefix0.DiningModel model) { size: 32, ), model.distance != null - ? Text(num.parse(model.distance!.toStringAsFixed(1)).toString() + ' mi', + ? Text( + num.parse(model.distance!.toStringAsFixed(1)).toString() + ' mi', style: Theme.of(context).textTheme.bodyMedium?.copyWith( - fontSize: 18.0, - color: - Theme.of(context).brightness == Brightness.light ? linkColorLight : linkColorDark, - )) + fontSize: 18.0, + color: Theme.of(context).brightness == Brightness.light ? linkColorLight : linkColorDark, + ), + ) : Text('--', style: TextStyle(color: linkColorLight)), ], ), @@ -335,16 +312,15 @@ Widget buildDirectionsButton(BuildContext context, prefix0.DiningModel model) { debugPrint('Error opening directions: $e'); } }, - style: TextButton.styleFrom( - padding: EdgeInsets.all(0.0), - ), + style: TextButton.styleFrom(padding: EdgeInsets.all(0.0)), ), ), ); } else { return Padding( - padding: const EdgeInsets.only(top: 12.0), - child: Text('Directions not available.', style: Theme.of(context).textTheme.bodySmall)); + padding: const EdgeInsets.only(top: 12.0), + child: Text('Directions not available.', style: Theme.of(context).textTheme.bodySmall), + ); } } @@ -389,13 +365,7 @@ Widget buildMenuButton(BuildContext context, prefix0.DiningModel model) { button: true, child: ExcludeSemantics( child: TextButton( - child: Row( - children: [ - Text('View Menu'), - SizedBox(width: 5), - Icon(Icons.open_in_new, size: 16), - ], - ), + child: Row(children: [Text('View Menu'), SizedBox(width: 5), Icon(Icons.open_in_new, size: 16)]), onPressed: () { try { launchUrl(Uri.parse(model.menuWebsite!), mode: LaunchMode.inAppBrowserView); @@ -439,65 +409,66 @@ class HoursOfDay extends StatelessWidget { final TextStyle hoursTextStyle = day == DateTime.now().weekday ? Theme.of(context).textTheme.bodySmall!.copyWith( fontWeight: FontWeight.w700, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2) + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + ) : Theme.of(context).textTheme.bodySmall!; // Check if this is the current day final bool isToday = day == DateTime.now().weekday; - return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - flex: 3, - child: Row( - children: [ - // Show the green dot for today - if (isToday) ...[ - SizedBox( - width: 0, - height: 0, - child: OverflowBox( - maxWidth: 10, // enough width and height to hold the dot - maxHeight: 10, - alignment: Alignment.centerLeft, - child: Transform.translate( - offset: const Offset(-11.5, 0), - child: GreenDot(currHours: hoursText!), + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Flexible( + flex: 3, + child: Row( + children: [ + // Show the green dot for today + if (isToday) ...[ + SizedBox( + width: 0, + height: 0, + child: OverflowBox( + maxWidth: 10, // enough width and height to hold the dot + maxHeight: 10, + alignment: Alignment.centerLeft, + child: Transform.translate( + offset: const Offset(-11.5, 0), + child: GreenDot(currHours: hoursText!), + ), ), ), + // SizedBox(width: 2), + ], + // "Monday" - Bold if today is Monday. + Text( + '$theDay', + style: isToday + ? Theme.of(context).textTheme.bodySmall!.copyWith( + fontWeight: FontWeight.w700, + color: Theme.of(context).brightness == Brightness.light + ? lightPrimaryColor + : darkPrimaryColor2, + ) + : Theme.of(context).textTheme.bodySmall, ), - // SizedBox(width: 2), ], - // "Monday" - Bold if today is Monday. - Text( - '$theDay', - style: isToday - ? Theme.of(context).textTheme.bodySmall!.copyWith( - fontWeight: FontWeight.w700, - color: - Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2) - : Theme.of(context).textTheme.bodySmall, - ), - ], + ), ), - ), - // Display the hours text i.e. 9:30 AM - 4:30 PM (using the finals above) - Flexible( - flex: 5, - child: Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Text( - hoursText!, - style: hoursTextStyle, - ), - ], + // Display the hours text i.e. 9:30 AM - 4:30 PM (using the finals above) + Flexible( + flex: 5, + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [Text(hoursText!, style: hoursTextStyle)], + ), ), - ) - ], - ), - ]); + ], + ), + ], + ); } } @@ -554,10 +525,7 @@ class GreenDot extends StatelessWidget { return Container( width: 7, height: 7, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: _determineColor(), - ), + decoration: BoxDecoration(shape: BoxShape.circle, color: _determineColor()), ); } diff --git a/lib/ui/dining/dining_filter_view.dart b/lib/ui/dining/dining_filter_view.dart index 856f1d62b..8d84dd62f 100644 --- a/lib/ui/dining/dining_filter_view.dart +++ b/lib/ui/dining/dining_filter_view.dart @@ -22,10 +22,7 @@ class DiningFilterView extends StatelessWidget { children: [ Padding( padding: const EdgeInsets.symmetric(vertical: 16.0), - child: Text( - 'Dining Payment Filters', - style: Theme.of(context).textTheme.titleMedium, - ), + child: Text('Dining Payment Filters', style: Theme.of(context).textTheme.titleMedium), ), Expanded( child: Padding( diff --git a/lib/ui/dining/dining_list.dart b/lib/ui/dining/dining_list.dart index 6486cdce3..6b56e828b 100644 --- a/lib/ui/dining/dining_list.dart +++ b/lib/ui/dining/dining_list.dart @@ -10,10 +10,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class DiningList extends StatelessWidget { - const DiningList({ - Key? key, - this.listSize, - }) : super(key: key); + const DiningList({Key? key, this.listSize}) : super(key: key); final listSize; @@ -58,12 +55,12 @@ class DiningList extends StatelessWidget { physics: NeverScrollableScrollPhysics(), shrinkWrap: true, children: ListTile.divideTiles( - tiles: diningTiles, - context: context, - color: Theme.of(context).brightness == Brightness.dark - ? listTileDividerColorDark - : listTileDividerColorLight) - .toList(), + tiles: diningTiles, + context: context, + color: Theme.of(context).brightness == Brightness.dark + ? listTileDividerColorDark + : listTileDividerColorLight, + ).toList(), ) : Stack( children: [ @@ -80,11 +77,7 @@ class DiningList extends StatelessWidget { ).toList(), ), ), - Positioned( - bottom: 24, - right: 24, - child: PaymentFilterButton(), - ), + Positioned(bottom: 24, right: 24, child: PaymentFilterButton()), ], ); } @@ -157,10 +150,10 @@ class DiningList extends StatelessWidget { return Text( formattedTimeRange(dayHours) ?? dayHours, style: TextStyle( - fontSize: 17.0, - fontWeight: FontWeight.w400, - color: - Theme.of(context).brightness == Brightness.light ? descriptiveTextColorLight : descriptiveTextColorDark), + fontSize: 17.0, + fontWeight: FontWeight.w400, + color: Theme.of(context).brightness == Brightness.light ? descriptiveTextColorLight : descriptiveTextColorDark, + ), ); } @@ -176,20 +169,15 @@ class DiningList extends StatelessWidget { child: data.vendorLogo != null ? Container( decoration: Theme.of(context).brightness == Brightness.dark - ? BoxDecoration( - color: lightTextColor, - borderRadius: BorderRadius.circular(8), - ) + ? BoxDecoration(color: lightTextColor, borderRadius: BorderRadius.circular(8)) : null, - child: Image.network( - data.vendorLogo!, - width: 48, - height: 48, - ), + child: Image.network(data.vendorLogo!, width: 48, height: 48), ) - : Icon(Icons.restaurant, + : Icon( + Icons.restaurant, size: 32, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2), + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + ), ), ), // Vendor Name @@ -207,10 +195,7 @@ class DiningList extends StatelessWidget { label: 'Business Hours: ${getHoursForToday(data.regularHours, context) is Text ? (getHoursForToday(data.regularHours, context) as Text).data : 'See details for hours'}', excludeSemantics: true, - child: Padding( - padding: EdgeInsets.only(top: 6), - child: getHoursForToday(data.regularHours, context), - ), + child: Padding(padding: EdgeInsets.only(top: 6), child: getHoursForToday(data.regularHours, context)), ), // Vendor's Distance and Directions trailing: buildIconWithDistance(data, context), @@ -230,9 +215,7 @@ class DiningList extends StatelessWidget { label: distanceText, excludeSemantics: true, child: TextButton( - style: TextButton.styleFrom( - foregroundColor: linkColorLight, - ), + style: TextButton.styleFrom(foregroundColor: linkColorLight), onPressed: () async { try { await DirectionsHelper.openDirections(data.coordinates!.lat!, data.coordinates!.lon!); @@ -243,13 +226,17 @@ class DiningList extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Icon(Icons.directions_walk, - size: 28, color: Theme.of(context).brightness == Brightness.light ? linkColorLight : linkColorDark), + Icon( + Icons.directions_walk, + size: 28, + color: Theme.of(context).brightness == Brightness.light ? linkColorLight : linkColorDark, + ), Text( data.distance != null ? (num.parse(data.distance!.toStringAsFixed(1)).toString() + ' mi') : '--', style: TextStyle( - fontSize: 13, - color: Theme.of(context).brightness == Brightness.light ? linkColorLight : linkColorDark), + fontSize: 13, + color: Theme.of(context).brightness == Brightness.light ? linkColorLight : linkColorDark, + ), ), ], ), diff --git a/lib/ui/dining/payment_filter_button.dart b/lib/ui/dining/payment_filter_button.dart index 031239840..09d0cfd05 100644 --- a/lib/ui/dining/payment_filter_button.dart +++ b/lib/ui/dining/payment_filter_button.dart @@ -3,9 +3,7 @@ import 'package:flutter/material.dart'; import 'package:campus_mobile_experimental/app_styles.dart'; class PaymentFilterButton extends StatelessWidget { - const PaymentFilterButton({ - Key? key, - }) : super(key: key); + const PaymentFilterButton({Key? key}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/lib/ui/employee_id/employee_id_card.dart b/lib/ui/employee_id/employee_id_card.dart index e64ef07d0..915a3ac12 100644 --- a/lib/ui/employee_id/employee_id_card.dart +++ b/lib/ui/employee_id/employee_id_card.dart @@ -26,7 +26,8 @@ class _EmployeeIdCardState extends State { ScalingUtility().getCurrentMeasurements(context); EmployeeIdModel? employeeModel = Provider.of(context).employeeIdModel; - isValidId = employeeModel != null && + isValidId = + employeeModel != null && (employeeModel.barcode != null) && (employeeModel.employeePreferredDisplayName != null && employeeModel.employeeId != null); @@ -56,17 +57,21 @@ class _EmployeeIdCardState extends State { children: [ Center( child: Text.rich( - TextSpan(text: "Unable to display STAFF ID.\n\n", children: [ - TextSpan(text: "If the problem persists, contact the "), - TextSpan( + TextSpan( + text: "Unable to display STAFF ID.\n\n", + children: [ + TextSpan(text: "If the problem persists, contact the "), + TextSpan( text: "ITS Service Desk", style: TextStyle(color: Colors.blueAccent, decoration: TextDecoration.underline), recognizer: TapGestureRecognizer() ..onTap = () { openLink("https://blink.ucsd.edu/technology/help-desk/index.html"); - }), - TextSpan(text: ".") - ]), + }, + ), + TextSpan(text: "."), + ], + ), ), ), ], @@ -103,8 +108,9 @@ class _EmployeeIdCardState extends State { Text( employeeIdModel!.employeePreferredDisplayName, style: TextStyle( - color: - Theme.of(context).brightness == Brightness.dark ? darkPrimaryColor2 : lightPrimaryColor, + color: Theme.of(context).brightness == Brightness.dark + ? darkPrimaryColor2 + : lightPrimaryColor, fontFamily: 'Brix Sans', fontWeight: FontWeight.w400, fontSize: getFontSize(employeeIdModel.employeePreferredDisplayName, "name"), @@ -120,11 +126,7 @@ class _EmployeeIdCardState extends State { fontSize: ScalingUtility.horizontalSafeBlock * 4.0, ), ), - Divider( - color: listTileDividerColorLight, - thickness: 1, - height: 16, - ), + Divider(color: listTileDividerColorLight, thickness: 1, height: 16), Text( employeeIdModel.department, style: TextStyle( @@ -194,29 +196,23 @@ class _EmployeeIdCardState extends State { /// Pop up barcode createAlertDialog(BuildContext context, Column image, String? cardNumber, bool rotated) { return showDialog( - context: context, - builder: (context) { - return AlertDialog( - backgroundColor: Colors.white, - title: Text( - "STAFF ID", - style: TextStyle(color: Colors.black), - ), - content: Container( - child: checkForRotation(image, context, cardNumber, rotated), + context: context, + builder: (context) { + return AlertDialog( + backgroundColor: Colors.white, + title: Text("STAFF ID", style: TextStyle(color: Colors.black)), + content: Container(child: checkForRotation(image, context, cardNumber, rotated)), + actions: [ + TextButton( + child: Icon(Icons.close, color: Colors.black), + onPressed: () { + Navigator.of(context).pop(); + }, ), - actions: [ - TextButton( - child: Icon( - Icons.close, - color: Colors.black, - ), - onPressed: () { - Navigator.of(context).pop(); - }) - ], - ); - }); + ], + ); + }, + ); } Column checkForRotation(Column image, BuildContext context, String? cardNumber, bool rotated) { @@ -229,9 +225,7 @@ class _EmployeeIdCardState extends State { return Text( "STAFF ID", textAlign: TextAlign.left, - style: TextStyle( - fontSize: ScalingUtility.horizontalSafeBlock * 2, - ), + style: TextStyle(fontSize: ScalingUtility.horizontalSafeBlock * 2), ); } @@ -260,32 +254,33 @@ class _EmployeeIdCardState extends State { } if (rotated) { - return Column(crossAxisAlignment: CrossAxisAlignment.center, children: [ - RotatedBox( - quarterTurns: 1, - child: Row( - children: [ - Padding( - padding: EdgeInsets.all(ScalingUtility.verticalSafeBlock * 7.5), - ), - Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - child: barcodeWithText, - color: Colors.white, - ), - Text( - cardNumber, - style: TextStyle( - color: Colors.black, fontSize: fontSizeForTablet(), letterSpacing: letterSpacingForTablet()), - ) - ], - ), - ], + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + RotatedBox( + quarterTurns: 1, + child: Row( + children: [ + Padding(padding: EdgeInsets.all(ScalingUtility.verticalSafeBlock * 7.5)), + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container(child: barcodeWithText, color: Colors.white), + Text( + cardNumber, + style: TextStyle( + color: Colors.black, + fontSize: fontSizeForTablet(), + letterSpacing: letterSpacingForTablet(), + ), + ), + ], + ), + ], + ), ), - ), - ]); + ], + ); } else { return Column( crossAxisAlignment: CrossAxisAlignment.stretch, @@ -298,11 +293,7 @@ class _EmployeeIdCardState extends State { style: linkTextLight.copyWith(fontSize: 18.0), ), ), - Container( - padding: EdgeInsets.fromLTRB(0, 0, 10, 0), - color: Colors.white, - child: barcodeWithText, - ), + Container(padding: EdgeInsets.fromLTRB(0, 0, 10, 0), color: Colors.white, child: barcodeWithText), ], ); } @@ -342,58 +333,52 @@ class _EmployeeIdCardState extends State { } if (rotated) { - return Column(crossAxisAlignment: CrossAxisAlignment.center, children: [ - Padding( - padding: EdgeInsets.all(25), - ), - RotatedBox( - quarterTurns: 1, - child: Row( - children: [ - Padding( - padding: EdgeInsets.all(SizeConfig.safeBlockVertical * 7.5), - ), - Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - child: barcodeWithText, - color: Colors.white, - ), - Text( - cardNumber, - style: TextStyle( - color: Colors.black, fontSize: getRotatedPopUpFontSize(), letterSpacing: letterSpacing()), - ) - ], - ), - ], + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Padding(padding: EdgeInsets.all(25)), + RotatedBox( + quarterTurns: 1, + child: Row( + children: [ + Padding(padding: EdgeInsets.all(SizeConfig.safeBlockVertical * 7.5)), + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container(child: barcodeWithText, color: Colors.white), + Text( + cardNumber, + style: TextStyle( + color: Colors.black, + fontSize: getRotatedPopUpFontSize(), + letterSpacing: letterSpacing(), + ), + ), + ], + ), + ], + ), ), - ), - ]); + ], + ); } else { - return Column(children: [ - Text( - "(tap for easier scanning)", - textAlign: TextAlign.left, - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 16.0, - color: decideColor(Theme.of(context)), + return Column( + children: [ + Text( + "(tap for easier scanning)", + textAlign: TextAlign.left, + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16.0, color: decideColor(Theme.of(context))), ), - ), - Container( - padding: addBorder(Theme.of(context)), - color: Colors.white, - child: barcodeWithText, - ), - Text( - cardNumber, - style: TextStyle( + Container(padding: addBorder(Theme.of(context)), color: Colors.white, child: barcodeWithText), + Text( + cardNumber, + style: TextStyle( fontSize: ScalingUtility.horizontalSafeBlock * 1.25, - letterSpacing: ScalingUtility.horizontalSafeBlock * .5), - ), - ]); + letterSpacing: ScalingUtility.horizontalSafeBlock * .5, + ), + ), + ], + ); } } diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 26169abf9..45d5e30cb 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -141,9 +141,7 @@ class _SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { } @override - bool shouldRebuild(covariant _SlideOverHeaderDelegate oldDelegate) { - return child != oldDelegate.child || height != oldDelegate.height || backgroundColor != oldDelegate.backgroundColor; - } + bool shouldRebuild(covariant _SlideOverHeaderDelegate oldDelegate) => child != oldDelegate.child || height != oldDelegate.height || backgroundColor != oldDelegate.backgroundColor; } // ----------------------------------------------------------------------------- @@ -337,12 +335,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _setupAgeAuthChallengeHandler(); _mapViewController.arcGISMap = _map; _mapViewController.interactionOptions.rotateEnabled = true; - if (!_mapViewController.graphicsOverlays.contains(_graphicsOverlay)) { - _mapViewController.graphicsOverlays.add(_graphicsOverlay); - } - if (!_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay)) { - _mapViewController.graphicsOverlays.add(_routeGraphicsOverlay); - } + if (!_mapViewController.graphicsOverlays.contains(_graphicsOverlay)) _mapViewController.graphicsOverlays.add(_graphicsOverlay); + if (!_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay)) _mapViewController.graphicsOverlays.add(_routeGraphicsOverlay); // Wire up location display — blue dot, no auto-pan on start _mapViewController.locationDisplay.dataSource = _locationDataSource; @@ -484,9 +478,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } List _buildLayerInstances(LayerEntry entry) { - if (entry.hasSublayers) { - return entry.sublayers!.map(_layerFromSublayer).toList(); - } + if (entry.hasSublayers) return entry.sublayers!.map(_layerFromSublayer).toList(); return [_layerFromEntry(entry)]; } @@ -592,9 +584,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _showResults = false; } }); - if (_detailSheetController.isAttached) { - _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } + if (_detailSheetController.isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); } } @@ -607,9 +597,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _showResults = false; } }); - if (_detailSheetController.isAttached) { - _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } + if (_detailSheetController.isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); } } @@ -935,9 +923,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); _fromFocusNode.unfocus(); // Re-solve route if we already have a destination - if (_routeDestination != null) { - _solveRoute(_routeDestination!, originLatLng: _fromLatLng); - } + if (_routeDestination != null) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); } else if (_activeRouteField == 'to') { _toController.text = result.name; _routeDestination = result; @@ -1019,9 +1005,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final tappedGraphic = identifyResult.graphics.first; final index = tappedGraphic.attributes['resultIndex'] as int?; final isValidResultIndex = index != null && index >= 0 && index < _mappedResults.length; - if (isValidResultIndex) { - _selectResultFromPin(_mappedResults[index]); - } + if (isValidResultIndex) _selectResultFromPin(_mappedResults[index]); } else { // Tapped empty space — close detail if open if (_selectedResult != null) _closeDetail(); @@ -1049,9 +1033,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _activeCategory = null; }); _fromFocusNode.unfocus(); - if (_routeDestination != null) { - _solveRoute(_routeDestination!, originLatLng: _fromLatLng); - } + if (_routeDestination != null) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); } else { _toController.text = result.name; _routeDestination = result; @@ -1204,9 +1186,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Future _launchWebsite(String url) async { final uri = Uri.parse(url); - if (await canLaunchUrl(uri)) { - await launchUrl(uri, mode: LaunchMode.externalApplication); - } + if (await canLaunchUrl(uri)) await launchUrl(uri, mode: LaunchMode.externalApplication); } // --------------------------------------------------------------------------- @@ -1218,9 +1198,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { 'https://www.google.com/maps/dir/?api=1' '&destination=${result.latitude},${result.longitude}', ); - if (await canLaunchUrl(uri)) { - await launchUrl(uri, mode: LaunchMode.externalApplication); - } + if (await canLaunchUrl(uri)) await launchUrl(uri, mode: LaunchMode.externalApplication); } */ static const _ROUTE_SERVICE_URL = @@ -1251,9 +1229,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { params.returnDirections = true; final taskInfo = routeTask.getRouteTaskInfo(); final matchingMode = taskInfo.travelModes.where((m) => m.name == mode).firstOrNull; - if (matchingMode != null) { - params.travelMode = matchingMode; - } + if (matchingMode != null) params.travelMode = matchingMode; final origin = Stop(ArcGISPoint(x: userLatLng.$2, y: userLatLng.$1, spatialReference: SpatialReference.wgs84)); final dest = Stop( @@ -1450,9 +1426,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); } - IconData _iconForResult(MapSearchResult result) { - return result.source == MapSearchSource.building ? Icons.business : Icons.place; - } + IconData _iconForResult(MapSearchResult result) => result.source == MapSearchSource.building ? Icons.business : Icons.place; /// Returns the icon for a POI class — uses the hardcoded category icon if one /// exists, otherwise falls back to a generic place icon. @@ -1504,9 +1478,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _showResults = false; }); _fromFocusNode.unfocus(); - if (_routeDestination != null) { - _solveRoute(_routeDestination!, originLatLng: _fromLatLng); - } + if (_routeDestination != null) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); }, child: Padding( padding: EdgeInsets.symmetric(horizontal: 16, vertical: 20), @@ -1627,14 +1599,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } // Collapse whichever sheet is active to the minimum snap if (_showCategoryList && _selectedResult == null) { - if (_categorySheetController.isAttached) { - _categorySheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } + if (_categorySheetController.isAttached) _categorySheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); } if (_selectedResult != null) { - if (_detailSheetController.isAttached) { - _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } + if (_detailSheetController.isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); } } @@ -2385,9 +2353,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ) : null; }); - if (_routeDestination != null && _fromLatLng != null) { - _solveRoute(_routeDestination!, originLatLng: _fromLatLng); - } + if (_routeDestination != null && _fromLatLng != null) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); }, ), ), @@ -2434,9 +2400,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final isCatMatched = cat.poiClassValue.toLowerCase().contains(q) && !matched.contains(cat.poiClassValue); - if (isCatMatched) { - matched.insert(0, cat.poiClassValue); - } + if (isCatMatched) matched.insert(0, cat.poiClassValue); } setState(() { @@ -2658,15 +2622,11 @@ class _AgeAuthChallengeHandler implements ArcGISAuthenticationChallengeHandler { if (isAgo) { if (_cachedAgoToken != null && _agoTokenExpiry != null && - DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) { - return (_cachedAgoToken, _agoTokenExpiry); - } + DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) => (_cachedAgoToken, _agoTokenExpiry); } else { if (_cachedAgeToken != null && _ageTokenExpiry != null && - DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) { - return (_cachedAgeToken, _ageTokenExpiry); - } + DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) => (_cachedAgeToken, _ageTokenExpiry); } final response = await http.get(Uri.parse(tokensUrl)); diff --git a/lib/ui/esrimap/esrimap_ai_search.dart b/lib/ui/esrimap/esrimap_ai_search.dart index 81b496beb..fef4fd3f1 100644 --- a/lib/ui/esrimap/esrimap_ai_search.dart +++ b/lib/ui/esrimap/esrimap_ai_search.dart @@ -23,14 +23,14 @@ class AiSearchResult { }); factory AiSearchResult.fromJson(Map j) => AiSearchResult( - name: j['name'] as String, - subtitle: j['subtitle'] as String? ?? '', - address: j['address'] as String? ?? '', - latitude: (j['latitude'] as num).toDouble(), - longitude: (j['longitude'] as num).toDouble(), - distanceFeet: j['distanceFeet'] as int?, - distanceFormatted: j['distanceFormatted'] as String?, - ); + name: j['name'] as String, + subtitle: j['subtitle'] as String? ?? '', + address: j['address'] as String? ?? '', + latitude: (j['latitude'] as num).toDouble(), + longitude: (j['longitude'] as num).toDouble(), + distanceFeet: j['distanceFeet'] as int?, + distanceFormatted: j['distanceFormatted'] as String?, + ); } class AiSearchRouteStop { @@ -47,12 +47,7 @@ class AiSearchResponse { final List? routeStopNames; final List? routeStopCoords; - const AiSearchResponse({ - required this.message, - required this.results, - this.routeStopNames, - this.routeStopCoords, - }); + const AiSearchResponse({required this.message, required this.results, this.routeStopNames, this.routeStopCoords}); factory AiSearchResponse.fromJson(Map j) { List? stopNames; @@ -66,9 +61,7 @@ class AiSearchResponse { } return AiSearchResponse( message: j['message'] as String, - results: (j['results'] as List) - .map((r) => AiSearchResult.fromJson(r as Map)) - .toList(), + results: (j['results'] as List).map((r) => AiSearchResult.fromJson(r as Map)).toList(), routeStopNames: stopNames, routeStopCoords: stopCoords, ); @@ -101,8 +94,7 @@ class _EsriAiSearchSheetState extends State { AiSearchResponse? _response; String? _errorMessage; - static const _BASE_URL = - 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; + static const _BASE_URL = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; Future _submit() async { final query = _controller.text.trim(); @@ -197,8 +189,10 @@ class _EsriAiSearchSheetState extends State { children: [ Icon(Icons.auto_awesome, size: 18, color: accent), const SizedBox(width: 8), - Text('Ask the Map', - style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: textColor)), + Text( + 'Ask the Map', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: textColor), + ), ], ), ), @@ -220,10 +214,7 @@ class _EsriAiSearchSheetState extends State { hintStyle: TextStyle(color: subtitleColor, fontSize: 13), filled: true, fillColor: isDark ? Colors.grey[800] : Colors.grey[100], - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(12), - borderSide: BorderSide.none, - ), + border: OutlineInputBorder(borderRadius: BorderRadius.circular(12), borderSide: BorderSide.none), contentPadding: const EdgeInsets.symmetric(horizontal: 14, vertical: 12), ), ), @@ -236,8 +227,11 @@ class _EsriAiSearchSheetState extends State { shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), ), child: _state == _AiSearchState.loading - ? const SizedBox(width: 18, height: 18, - child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white)) + ? const SizedBox( + width: 18, + height: 18, + child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white), + ) : const Icon(Icons.search), ), ], @@ -249,15 +243,16 @@ class _EsriAiSearchSheetState extends State { if (_response!.message.isNotEmpty) Padding( padding: const EdgeInsets.fromLTRB(16, 0, 16, 8), - child: Text(_response!.message, - style: TextStyle(fontSize: 13, color: subtitleColor)), + child: Text(_response!.message, style: TextStyle(fontSize: 13, color: subtitleColor)), ), if (_response!.results.isEmpty) Padding( padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), - child: Text('No results found. Try a different query.', - style: TextStyle(fontSize: 13, color: subtitleColor)), + child: Text( + 'No results found. Try a different query.', + style: TextStyle(fontSize: 13, color: subtitleColor), + ), ), ConstrainedBox( @@ -274,10 +269,14 @@ class _EsriAiSearchSheetState extends State { backgroundColor: accent.withOpacity(0.12), child: Icon(_iconForSubtitle(r.subtitle), color: accent, size: 18), ), - title: Text(r.name, - style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: textColor)), - subtitle: Text(r.distanceFormatted != null ? '${r.subtitle} · ${r.distanceFormatted}' : r.subtitle, - style: TextStyle(fontSize: 12, color: subtitleColor)), + title: Text( + r.name, + style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: textColor), + ), + subtitle: Text( + r.distanceFormatted != null ? '${r.subtitle} · ${r.distanceFormatted}' : r.subtitle, + style: TextStyle(fontSize: 12, color: subtitleColor), + ), onTap: () { Navigator.pop(context); widget.onLocationSelected(r); @@ -311,11 +310,13 @@ class _EsriAiSearchSheetState extends State { if (_state == _AiSearchState.error) Padding( padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), - child: Text('Something went wrong. Please try again.', - style: TextStyle(fontSize: 13, color: Colors.redAccent)), + child: Text( + 'Something went wrong. Please try again.', + style: TextStyle(fontSize: 13, color: Colors.redAccent), + ), ), ], ), ); } -} \ No newline at end of file +} diff --git a/lib/ui/esrimap/esrimap_basemaps.dart b/lib/ui/esrimap/esrimap_basemaps.dart index e11ac4959..a046d3e0c 100644 --- a/lib/ui/esrimap/esrimap_basemaps.dart +++ b/lib/ui/esrimap/esrimap_basemaps.dart @@ -33,9 +33,7 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { final url = layer.serviceKey != null ? config.serviceUrls[layer.serviceKey!] : null; - if (url != null) { - basemap.baseLayers.add(ArcGISTiledLayer.withUri(Uri.parse(url))); - } + if (url != null) basemap.baseLayers.add(ArcGISTiledLayer.withUri(Uri.parse(url))); break; case 'arcgisVectorTiled': @@ -59,11 +57,8 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { final url = layer.serviceKey != null ? config.serviceUrls[layer.serviceKey!] : null; - if (url != null) { - basemap.baseLayers.add(ArcGISMapImageLayer.withUri(Uri.parse(url))); - } + if (url != null) basemap.baseLayers.add(ArcGISMapImageLayer.withUri(Uri.parse(url))); break; } } return basemap; -} \ No newline at end of file diff --git a/lib/ui/esrimap/esrimap_config.dart b/lib/ui/esrimap/esrimap_config.dart index 985899583..ad2a12303 100644 --- a/lib/ui/esrimap/esrimap_config.dart +++ b/lib/ui/esrimap/esrimap_config.dart @@ -4,23 +4,18 @@ import 'package:http/http.dart' as http; // Base layer spec class BaseLayerSpec { - final String type; // 'arcgisTiled' | 'arcgisVectorTiled' | 'arcgisMapImage' + final String type; // 'arcgisTiled' | 'arcgisVectorTiled' | 'arcgisMapImage' final String? serviceKey; // resolves via EsriMapConfig.serviceUrls - final String? portalKey; // resolves via EsriMapConfig.portals + final String? portalKey; // resolves via EsriMapConfig.portals final String? itemId; - const BaseLayerSpec({ - required this.type, - this.serviceKey, - this.portalKey, - this.itemId, - }); + const BaseLayerSpec({required this.type, this.serviceKey, this.portalKey, this.itemId}); factory BaseLayerSpec.fromJson(Map json) => BaseLayerSpec( - type: json['type'] as String, + type: json['type'] as String, serviceKey: json['serviceKey'] as String?, - portalKey: json['portalKey'] as String?, - itemId: json['itemId'] as String?, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, ); } @@ -31,18 +26,12 @@ class BasemapConfig { final String thumbnailAsset; final List baseLayers; - const BasemapConfig({ - required this.label, - required this.thumbnailAsset, - required this.baseLayers, - }); + const BasemapConfig({required this.label, required this.thumbnailAsset, required this.baseLayers}); factory BasemapConfig.fromJson(Map json) => BasemapConfig( - label: json['label'] as String, + label: json['label'] as String, thumbnailAsset: json['thumbnailAsset'] as String, - baseLayers: (json['baseLayers'] as List) - .map((e) => BaseLayerSpec.fromJson(e as Map)) - .toList(), + baseLayers: (json['baseLayers'] as List).map((e) => BaseLayerSpec.fromJson(e as Map)).toList(), ); } @@ -70,14 +59,14 @@ class SublayerEntry { }); factory SublayerEntry.fromJson(Map json) => SublayerEntry( - name: json['name'] as String, - source: json['source'] as String, - url: json['url'] as String?, - portalKey: json['portalKey'] as String?, - itemId: json['itemId'] as String?, - refreshInterval: (json['refreshInterval'] as num?)?.toInt() ?? 0, - popup: json['popup'] as bool? ?? false, - popupTemplate: json['popupTemplate'] as String?, + name: json['name'] as String, + source: json['source'] as String, + url: json['url'] as String?, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, + refreshInterval: (json['refreshInterval'] as num?)?.toInt() ?? 0, + popup: json['popup'] as bool? ?? false, + popupTemplate: json['popupTemplate'] as String?, ); } @@ -109,20 +98,18 @@ class LayerEntry { bool get hasSublayers => sublayers != null && sublayers!.isNotEmpty; factory LayerEntry.fromJson(Map json) => LayerEntry( - label: json['label'] as String, - thumbnailAsset: json['thumbnailAsset'] as String, - source: json['source'] as String?, - url: json['url'] as String?, - portalKey: json['portalKey'] as String?, - itemId: json['itemId'] as String?, + label: json['label'] as String, + thumbnailAsset: json['thumbnailAsset'] as String, + source: json['source'] as String?, + url: json['url'] as String?, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, refreshInterval: (json['refreshInterval'] as num?)?.toInt() ?? 0, - popup: json['popup'] as bool? ?? false, - popupTemplate: json['popupTemplate'] as String?, + popup: json['popup'] as bool? ?? false, + popupTemplate: json['popupTemplate'] as String?, sublayers: json['sublayers'] == null ? null - : (json['sublayers'] as List) - .map((e) => SublayerEntry.fromJson(e as Map)) - .toList(), + : (json['sublayers'] as List).map((e) => SublayerEntry.fromJson(e as Map)).toList(), ); } @@ -134,18 +121,13 @@ class SceneConfig { final String? portalKey; final String? itemId; - const SceneConfig({ - required this.label, - required this.type, - this.portalKey, - this.itemId, - }); + const SceneConfig({required this.label, required this.type, this.portalKey, this.itemId}); factory SceneConfig.fromJson(Map json) => SceneConfig( - label: json['label'] as String, - type: json['type'] as String, + label: json['label'] as String, + type: json['type'] as String, portalKey: json['portalKey'] as String?, - itemId: json['itemId'] as String?, + itemId: json['itemId'] as String?, ); } @@ -158,10 +140,8 @@ class FeaturesConfig { const FeaturesConfig({required this.aiSearch, required this.scenes}); - factory FeaturesConfig.fromJson(Map json) => FeaturesConfig( - aiSearch: json['aiSearch'] as bool? ?? false, - scenes: json['scenes'] as bool? ?? false, - ); + factory FeaturesConfig.fromJson(Map json) => + FeaturesConfig(aiSearch: json['aiSearch'] as bool? ?? false, scenes: json['scenes'] as bool? ?? false); } // Search categories @@ -172,20 +152,14 @@ class SearchCategoryConfig { final String icon; final String? color; - const SearchCategoryConfig({ - required this.label, - required this.poiClass, - required this.icon, - this.color, - }); + const SearchCategoryConfig({required this.label, required this.poiClass, required this.icon, this.color}); - factory SearchCategoryConfig.fromJson(Map json) => - SearchCategoryConfig( - label: json['label'] as String, - poiClass: json['poiClass'] as String, - icon: json['icon'] as String, - color: json['color'] as String?, - ); + factory SearchCategoryConfig.fromJson(Map json) => SearchCategoryConfig( + label: json['label'] as String, + poiClass: json['poiClass'] as String, + icon: json['icon'] as String, + color: json['color'] as String?, + ); } // Root config @@ -210,7 +184,7 @@ class EsriMapConfig { }); factory EsriMapConfig.fromJson(Map json) => EsriMapConfig( - portals: (json['portals'] as Map).cast(), + portals: (json['portals'] as Map).cast(), serviceUrls: (json['serviceUrls'] as Map).cast(), basemaps: (json['basemaps'] as Map).map( (k, v) => MapEntry(k, BasemapConfig.fromJson(v as Map)), @@ -221,7 +195,7 @@ class EsriMapConfig { scenes: (json['scenes'] as Map).map( (k, v) => MapEntry(k, SceneConfig.fromJson(v as Map)), ), - features: FeaturesConfig.fromJson(json['features'] as Map), + features: FeaturesConfig.fromJson(json['features'] as Map), searchCategories: (json['searchCategories'] as List) .map((e) => SearchCategoryConfig.fromJson(e as Map)) .toList(), @@ -235,8 +209,7 @@ class EsriMapConfigService { static final EsriMapConfigService instance = EsriMapConfigService._(); EsriMapConfigService._(); - static const _BASE_URL = - 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; + static const _BASE_URL = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; EsriMapConfig? _config; Future? _pending; @@ -251,9 +224,7 @@ class EsriMapConfigService { final response = await http.get(Uri.parse('$_BASE_URL/config')); final isResNotOk = response.statusCode != 200; if (isResNotOk) throw Exception('Config fetch failed: ${response.statusCode}'); - _config = EsriMapConfig.fromJson( - jsonDecode(response.body) as Map, - ); + _config = EsriMapConfig.fromJson(jsonDecode(response.body) as Map); return _config!; } -} \ No newline at end of file +} diff --git a/lib/ui/esrimap/esrimap_fab.dart b/lib/ui/esrimap/esrimap_fab.dart index 1e21e1a14..0c705adef 100644 --- a/lib/ui/esrimap/esrimap_fab.dart +++ b/lib/ui/esrimap/esrimap_fab.dart @@ -87,11 +87,7 @@ class EsriMapFabCluster extends StatelessWidget { color: isRecenterActive ? _ACTIVE_COLOR : fgColor, onTap: onRecenterOnView, ), - _pillButton( - icon: Icons.layers_outlined, - color: fgColor, - onTap: onShowLayersPanel, - ), + _pillButton(icon: Icons.layers_outlined, color: fgColor, onTap: onShowLayersPanel), ], ), ), @@ -101,19 +97,13 @@ class EsriMapFabCluster extends StatelessWidget { ); } - Widget _pillButton({ - required IconData icon, - required Color color, - required VoidCallback onTap, - }) { + Widget _pillButton({required IconData icon, required Color color, required VoidCallback onTap}) { return GestureDetector( onTap: onTap, behavior: HitTestBehavior.opaque, child: SizedBox( height: _BTN_HEIGHT, - child: Center( - child: Icon(icon, size: 22, color: color), - ), + child: Center(child: Icon(icon, size: 22, color: color)), ), ); } @@ -123,10 +113,7 @@ class _CompassNeedlePainter extends CustomPainter { final double rotationDegrees; final Color southColor; - const _CompassNeedlePainter({ - required this.rotationDegrees, - required this.southColor, - }); + const _CompassNeedlePainter({required this.rotationDegrees, required this.southColor}); @override void paint(Canvas canvas, Size size) { diff --git a/lib/ui/esrimap/esrimap_layers_panel.dart b/lib/ui/esrimap/esrimap_layers_panel.dart index 7433d531e..1407ecd49 100644 --- a/lib/ui/esrimap/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esrimap_layers_panel.dart @@ -34,22 +34,15 @@ class EsriMapLayersPanel extends StatelessWidget { final bgColor = isDark ? Colors.grey[900]! : Colors.white; final textColor = isDark ? Colors.white : Colors.grey[900]!; final subtitleColor = isDark ? Colors.grey[400]! : Colors.grey[600]!; - final accent = isDark - ? Colors.lightBlue[300]! - : Theme.of(context).colorScheme.primary; + final accent = isDark ? Colors.lightBlue[300]! : Theme.of(context).colorScheme.primary; Widget sectionLabel(String text) => Padding( - padding: const EdgeInsets.fromLTRB(16, 12, 16, 8), - child: Text( - text, - style: TextStyle( - fontSize: 11, - fontWeight: FontWeight.w700, - letterSpacing: 0.8, - color: subtitleColor, - ), - ), - ); + padding: const EdgeInsets.fromLTRB(16, 12, 16, 8), + child: Text( + text, + style: TextStyle(fontSize: 11, fontWeight: FontWeight.w700, letterSpacing: 0.8, color: subtitleColor), + ), + ); Widget imageTile({ required String label, @@ -72,25 +65,15 @@ class EsriMapLayersPanel extends StatelessWidget { borderRadius: BorderRadius.circular(8), border: selected ? Border.all(color: accent, width: 2.5) - : Border.all( - color: isDark ? Colors.grey[700]! : Colors.grey[300]!, - width: 1, - ), + : Border.all(color: isDark ? Colors.grey[700]! : Colors.grey[300]!, width: 1), ), child: ClipRRect( borderRadius: BorderRadius.circular(6.5), child: loading ? const Center( - child: SizedBox( - width: 22, - height: 22, - child: CircularProgressIndicator(strokeWidth: 2), - ), + child: SizedBox(width: 22, height: 22, child: CircularProgressIndicator(strokeWidth: 2)), ) - : (imageWidget ?? - Container( - color: isDark ? Colors.grey[700] : Colors.grey[300], - )), + : (imageWidget ?? Container(color: isDark ? Colors.grey[700] : Colors.grey[300])), ), ), const SizedBox(height: 5), @@ -112,40 +95,32 @@ class EsriMapLayersPanel extends StatelessWidget { } Widget networkImage(String url) => Image.network( - url, - fit: BoxFit.cover, - errorBuilder: (_, __, ___) => Container( - color: isDark ? Colors.grey[700] : Colors.grey[300], - ), - ); + url, + fit: BoxFit.cover, + errorBuilder: (_, __, ___) => Container(color: isDark ? Colors.grey[700] : Colors.grey[300]), + ); - Widget sceneChip(String key, String label, bool selected) => - GestureDetector( - onTap: () => onSetSceneMode(key), - child: Container( - padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 7), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(20), - border: selected - ? Border.all(color: accent, width: 2) - : Border.all( - color: isDark ? Colors.grey[700]! : Colors.grey[300]!, - width: 1, - ), - color: selected - ? accent.withOpacity(0.12) - : (isDark ? Colors.grey[850] : Colors.grey[100]), - ), - child: Text( - label, - style: TextStyle( - fontSize: 13, - fontWeight: selected ? FontWeight.w700 : FontWeight.w400, - color: selected ? accent : textColor, - ), - ), + Widget sceneChip(String key, String label, bool selected) => GestureDetector( + onTap: () => onSetSceneMode(key), + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 7), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + border: selected + ? Border.all(color: accent, width: 2) + : Border.all(color: isDark ? Colors.grey[700]! : Colors.grey[300]!, width: 1), + color: selected ? accent.withOpacity(0.12) : (isDark ? Colors.grey[850] : Colors.grey[100]), + ), + child: Text( + label, + style: TextStyle( + fontSize: 13, + fontWeight: selected ? FontWeight.w700 : FontWeight.w400, + color: selected ? accent : textColor, ), - ); + ), + ), + ); final bottomPad = MediaQuery.of(context).padding.bottom; final isDefault = currentSceneKey == 'default'; @@ -175,11 +150,7 @@ class EsriMapLayersPanel extends StatelessWidget { Expanded( child: Text( 'Map Display', - style: TextStyle( - fontSize: 15, - fontWeight: FontWeight.w600, - color: textColor, - ), + style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: textColor), ), ), IconButton( @@ -209,8 +180,7 @@ class EsriMapLayersPanel extends StatelessWidget { if (basemapTypeFromKey(entry.key) != null) ...[ imageTile( label: entry.value.label, - selected: currentBasemapType == - basemapTypeFromKey(entry.key), + selected: currentBasemapType == basemapTypeFromKey(entry.key), onTap: () { final t = basemapTypeFromKey(entry.key); if (t != null) onSwitchBasemap(t); @@ -263,11 +233,7 @@ class EsriMapLayersPanel extends StatelessWidget { spacing: 8, children: [ for (final entry in config.scenes.entries) - sceneChip( - entry.key, - entry.value.label, - currentSceneKey == entry.key, - ), + sceneChip(entry.key, entry.value.label, currentSceneKey == entry.key), ], ), ), @@ -279,4 +245,4 @@ class EsriMapLayersPanel extends StatelessWidget { ), ); } -} \ No newline at end of file +} diff --git a/lib/ui/esrimap/esrimap_scene.dart b/lib/ui/esrimap/esrimap_scene.dart index 5b4515b4c..434bd3f2f 100644 --- a/lib/ui/esrimap/esrimap_scene.dart +++ b/lib/ui/esrimap/esrimap_scene.dart @@ -7,12 +7,7 @@ class EsriSceneWidget extends StatefulWidget { final String itemId; final void Function(double heading)? onHeadingChanged; - const EsriSceneWidget({ - super.key, - required this.portalUri, - required this.itemId, - this.onHeadingChanged, - }); + const EsriSceneWidget({super.key, required this.portalUri, required this.itemId, this.onHeadingChanged}); @override State createState() => EsriSceneWidgetState(); @@ -38,10 +33,7 @@ class EsriSceneWidgetState extends State { void _onSceneViewReady() { final portal = Portal(Uri.parse(widget.portalUri)); - final portalItem = PortalItem.withPortalAndItemId( - portal: portal, - itemId: widget.itemId, - ); + final portalItem = PortalItem.withPortalAndItemId(portal: portal, itemId: widget.itemId); final scene = ArcGISScene.withItem(portalItem); _sceneViewController.arcGISScene = scene; @@ -59,23 +51,15 @@ class EsriSceneWidgetState extends State { // viewpoint stabilizes — used by snapToNorth to rotate around target. Future.delayed(const Duration(milliseconds: 500), () { if (!mounted) return; - final vp = _sceneViewController.getCurrentViewpoint( - ViewpointType.centerAndScale, - ); + final vp = _sceneViewController.getCurrentViewpoint(ViewpointType.centerAndScale); final pt = vp?.targetGeometry; - if (pt is ArcGISPoint) { - _camToTargetLatOffset = pt.y - _initialCamera!.location.y; - } + if (pt is ArcGISPoint) _camToTargetLatOffset = pt.y - _initialCamera!.location.y; }); _viewpointSubscription = _sceneViewController.onViewpointChanged.listen((_) { if (!mounted) return; - final vp = _sceneViewController.getCurrentViewpoint( - ViewpointType.centerAndScale, - ); - if (vp != null) { - widget.onHeadingChanged?.call(vp.rotation); - } + final vp = _sceneViewController.getCurrentViewpoint(ViewpointType.centerAndScale); + if (vp != null) widget.onHeadingChanged?.call(vp.rotation); }); _applyLabelScales(scene); @@ -108,9 +92,7 @@ class EsriSceneWidgetState extends State { /// look-at target so the building/point stays centered on screen. void snapToNorth() { if (_initialCamera == null) return; - final vp = _sceneViewController.getCurrentViewpoint( - ViewpointType.centerAndScale, - ); + final vp = _sceneViewController.getCurrentViewpoint(ViewpointType.centerAndScale); final target = vp?.targetGeometry; if (target is! ArcGISPoint) { resetCamera(); @@ -143,9 +125,6 @@ class EsriSceneWidgetState extends State { @override Widget build(BuildContext context) { - return ArcGISSceneView( - controllerProvider: () => _sceneViewController, - onSceneViewReady: _onSceneViewReady, - ); + return ArcGISSceneView(controllerProvider: () => _sceneViewController, onSceneViewReady: _onSceneViewReady); } } diff --git a/lib/ui/events/event_tile.dart b/lib/ui/events/event_tile.dart index b228eecd9..d42fcfd95 100644 --- a/lib/ui/events/event_tile.dart +++ b/lib/ui/events/event_tile.dart @@ -22,11 +22,7 @@ class EventTile extends StatelessWidget { Widget build(BuildContext context) { // Show loading indicator while data is loading if (Provider.of(context).isLoading) { - return Center( - child: CircularProgressIndicator( - color: Theme.of(context).colorScheme.secondary, - ), - ); + return Center(child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary)); } return _buildEventTile(context); } @@ -37,17 +33,9 @@ class EventTile extends StatelessWidget { // height: 300, child: InkWell( onTap: () { - Navigator.pushNamed( - context, - RoutePaths.EVENT_DETAIL_VIEW, - arguments: data, - ); + Navigator.pushNamed(context, RoutePaths.EVENT_DETAIL_VIEW, arguments: data); }, - child: Column( - children: [ - _eventDetailsCard(context), - ], - ), + child: Column(children: [_eventDetailsCard(context)]), ), ); } @@ -71,10 +59,7 @@ class EventTile extends StatelessWidget { width: TILE_WIDTH, height: 300, child: DecoratedBox( - decoration: BoxDecoration( - border: Border.all(width: 0.3), - borderRadius: BorderRadius.all(CORNER_RADIUS), - ), + decoration: BoxDecoration(border: Border.all(width: 0.3), borderRadius: BorderRadius.all(CORNER_RADIUS)), child: Card( margin: EdgeInsets.symmetric(vertical: 1, horizontal: 1), elevation: 4.0, @@ -100,17 +85,17 @@ class EventTile extends StatelessWidget { fit: BoxFit.scaleDown, alignment: Alignment.centerRight, child: isAllDay - ? Text('All day', + ? Text( + 'All day', style: TextStyle( fontSize: 14, color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : Colors.white, fontWeight: FontWeight.w400, - )) - : TileTime( - time: '$startTime - $endTime', - ), + ), + ) + : TileTime(time: '$startTime - $endTime'), ), ), ], @@ -131,21 +116,16 @@ class EventTile extends StatelessWidget { Widget _eventImageLoader(String? url) { return url?.isEmpty ?? true ? ClipRRect( - borderRadius: BorderRadius.only( - topLeft: EventTile.CORNER_RADIUS, - topRight: EventTile.CORNER_RADIUS, - ), + borderRadius: BorderRadius.only(topLeft: EventTile.CORNER_RADIUS, topRight: EventTile.CORNER_RADIUS), child: Image.asset( 'assets/images/UCSDMobile_sharp.png', height: 150, width: EventTile.TILE_WIDTH, fit: BoxFit.cover, - )) - : ClipRRect( - borderRadius: BorderRadius.only( - topLeft: EventTile.CORNER_RADIUS, - topRight: EventTile.CORNER_RADIUS, ), + ) + : ClipRRect( + borderRadius: BorderRadius.only(topLeft: EventTile.CORNER_RADIUS, topRight: EventTile.CORNER_RADIUS), child: Image.network( url!, loadingBuilder: (context, child, loadingProgress) { @@ -162,7 +142,8 @@ Widget _eventImageLoader(String? url) { height: 150, width: EventTile.TILE_WIDTH, fit: BoxFit.cover, - )); + ), + ); } class TileTitle extends StatelessWidget { @@ -230,11 +211,7 @@ class TileTime extends StatelessWidget { Row( children: [ // Start Time - Text( - startTime, - textAlign: TextAlign.right, - style: style, - ), + Text(startTime, textAlign: TextAlign.right, style: style), Text(" - ", style: style), // Separator ], ), @@ -269,7 +246,7 @@ class StartEndDateContainer extends StatelessWidget { 'Sep': 'September', 'Oct': 'October', 'Nov': 'November', - 'Dec': 'December' + 'Dec': 'December', }; months.forEach((key, value) { semanticDate = semanticDate.replaceAll(key, value); @@ -298,8 +275,9 @@ class StartEndDateContainer extends StatelessWidget { date.split(' ')[0].toUpperCase(), style: TextStyle( fontSize: 20, - color: - Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : Colors.white, + color: Theme.of(context).brightness == Brightness.light + ? lightPrimaryColor + : Colors.white, fontWeight: FontWeight.w600, ), ), @@ -308,14 +286,15 @@ class StartEndDateContainer extends StatelessWidget { date.split(' ')[1].toUpperCase(), style: TextStyle( fontSize: 22, - color: - Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : Colors.white, + color: Theme.of(context).brightness == Brightness.light + ? lightPrimaryColor + : Colors.white, fontWeight: FontWeight.w600, ), ), ], ), - ) + ), ], ), Padding( @@ -341,8 +320,9 @@ class StartEndDateContainer extends StatelessWidget { date.split(' ')[4].toUpperCase(), style: TextStyle( fontSize: 20, - color: - Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : Colors.white, + color: Theme.of(context).brightness == Brightness.light + ? lightPrimaryColor + : Colors.white, fontWeight: FontWeight.w600, ), ), @@ -351,16 +331,17 @@ class StartEndDateContainer extends StatelessWidget { date.split(' ')[5].toUpperCase(), style: TextStyle( fontSize: 22, - color: - Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : Colors.white, + color: Theme.of(context).brightness == Brightness.light + ? lightPrimaryColor + : Colors.white, fontWeight: FontWeight.w600, ), ), ], ), - ) + ), ], - ) + ), ] // If it's a single date, display it normally else ...[ @@ -388,7 +369,7 @@ class StartEndDateContainer extends StatelessWidget { ), ], ), - ) + ), ], ], ), diff --git a/lib/ui/events/events_card.dart b/lib/ui/events/events_card.dart index 3a46fdfed..3497e1da2 100644 --- a/lib/ui/events/events_card.dart +++ b/lib/ui/events/events_card.dart @@ -26,11 +26,12 @@ class EventsCard extends StatelessWidget { child: () => buildEventsCardList(Provider.of(context).eventsModels), actionButtons: [ ActionButton( - buttonText: "VIEW ALL EVENTS", - onPressed: () { - analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'view_all'}); - Navigator.pushNamed(context, RoutePaths.EVENTS_VIEW_ALL); - }) + buttonText: "VIEW ALL EVENTS", + onPressed: () { + analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'view_all'}); + Navigator.pushNamed(context, RoutePaths.EVENTS_VIEW_ALL); + }, + ), ], ); } diff --git a/lib/ui/events/events_card_list.dart b/lib/ui/events/events_card_list.dart index 83a298a0d..5aa81e9f0 100644 --- a/lib/ui/events/events_card_list.dart +++ b/lib/ui/events/events_card_list.dart @@ -37,10 +37,7 @@ class EventsCardList extends StatelessWidget { return SingleChildScrollView( physics: const BouncingScrollPhysics(), scrollDirection: Axis.horizontal, - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: eventTiles, - ), + child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: eventTiles), ); } else { return ContainerView( diff --git a/lib/ui/events/events_detail_view.dart b/lib/ui/events/events_detail_view.dart index dd78ba79a..18ac6c46a 100644 --- a/lib/ui/events/events_detail_view.dart +++ b/lib/ui/events/events_detail_view.dart @@ -33,15 +33,17 @@ class EventDetailView extends StatelessWidget { child: Row( children: [ // Event Date - Builder(builder: (context) { - final df = DateFormat("MMM d y"); - final localStart = data.startDate.toLocal(); - final localEnd = data.endDate.toLocal(); - final startDate = df.format(localStart); - final endDate = df.format(localEnd); - final dateDisplay = startDate == endDate ? startDate : '$startDate - $endDate'; - return StartEndDateContainer(date: dateDisplay); - }), + Builder( + builder: (context) { + final df = DateFormat("MMM d y"); + final localStart = data.startDate.toLocal(); + final localEnd = data.endDate.toLocal(); + final startDate = df.format(localStart); + final endDate = df.format(localEnd); + final dateDisplay = startDate == endDate ? startDate : '$startDate - $endDate'; + return StartEndDateContainer(date: dateDisplay); + }, + ), // Event Title Expanded(child: EventTitle(title: data.title)), @@ -49,8 +51,9 @@ class EventDetailView extends StatelessWidget { ), ), Container( - padding: const EdgeInsets.only(left: 17.0), - child: Row(children: [ + padding: const EdgeInsets.only(left: 17.0), + child: Row( + children: [ // Event Location Icon( Icons.location_on_sharp, @@ -76,49 +79,54 @@ class EventDetailView extends StatelessWidget { ), SizedBox(width: 5), // Event Time - Builder(builder: (context) { - final timeString = data.startDate.toLocal().hour == 0 && data.endDate.toLocal().hour == 23 - ? ' All day ' - : DateFormat.jm().format(data.startDate.toLocal()) + - ' - ' + - DateFormat.jm().format(data.endDate.toLocal()); - final semanticTime = 'From: ' + timeString.replaceAll('-', 'to').trim(); - return Semantics( - container: true, - child: Text( - timeString, - semanticsLabel: semanticTime, - style: TextStyle( - fontSize: 16, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : Colors.white, - fontWeight: FontWeight.w400, + Builder( + builder: (context) { + final timeString = data.startDate.toLocal().hour == 0 && data.endDate.toLocal().hour == 23 + ? ' All day ' + : DateFormat.jm().format(data.startDate.toLocal()) + + ' - ' + + DateFormat.jm().format(data.endDate.toLocal()); + final semanticTime = 'From: ' + timeString.replaceAll('-', 'to').trim(); + return Semantics( + container: true, + child: Text( + timeString, + semanticsLabel: semanticTime, + style: TextStyle( + fontSize: 16, + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : Colors.white, + fontWeight: FontWeight.w400, + ), ), - ), - ); - }), + ); + }, + ), SizedBox(width: 16), - ])), + ], + ), + ), Container( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: Column( - children: [ - ///////////////// Horizontal Division /////////////////// - Divider(color: listTileDividerColorDark, thickness: 0.6), - // Event Description - data.description != null && data.description!.isNotEmpty - ? Text( - data.description!, - semanticsLabel: 'Event Description and Details: ${data.description}', - style: TextStyle(fontSize: 16, height: 1.4, fontWeight: FontWeight.w400), - ) - : Container(), - ], - )), + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Column( + children: [ + ///////////////// Horizontal Division /////////////////// + Divider(color: listTileDividerColorDark, thickness: 0.6), + // Event Description + data.description != null && data.description!.isNotEmpty + ? Text( + data.description!, + semanticsLabel: 'Event Description and Details: ${data.description}', + style: TextStyle(fontSize: 16, height: 1.4, fontWeight: FontWeight.w400), + ) + : Container(), + ], + ), + ), Container( padding: EdgeInsets.only(left: 15, top: 5, right: 248, bottom: 20), // "GO TO EVENT PAGE" Button child: data.link != null && data.link!.isNotEmpty ? GoToEventPageButton(link: data.link!) : Container(), - ) + ), ], ); } diff --git a/lib/ui/events/events_view_all.dart b/lib/ui/events/events_view_all.dart index c003f9173..aff7d1876 100644 --- a/lib/ui/events/events_view_all.dart +++ b/lib/ui/events/events_view_all.dart @@ -14,10 +14,7 @@ class EventsAll extends StatelessWidget { ? Center(child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary)) : Padding( padding: const EdgeInsets.only(top: 16.0), - child: buildEventsList( - Provider.of(context).eventsModels, - context, - ), + child: buildEventsList(Provider.of(context).eventsModels, context), ); } @@ -39,11 +36,7 @@ class EventsAll extends StatelessWidget { childAspectRatio: MediaQuery.of(context).size.width / (MediaQuery.of(context).size.height / 1.4), ); } else { - return ContainerView( - child: Center( - child: Text('No events found.'), - ), - ); + return ContainerView(child: Center(child: Text('No events found.'))); } } } diff --git a/lib/ui/finals/finals_card.dart b/lib/ui/finals/finals_card.dart index 8a6342a27..2387131f8 100644 --- a/lib/ui/finals/finals_card.dart +++ b/lib/ui/finals/finals_card.dart @@ -30,10 +30,11 @@ class FinalsCard extends StatelessWidget { titleText: CardTitleConstants.TITLE_MAP[cardId]!, errorText: Provider.of(context).error, child: () => buildFinalsCard( - Provider.of(context).finals, - Provider.of(context).lastUpdated, - Provider.of(context).nextDayWithClass, - context), + Provider.of(context).finals, + Provider.of(context).lastUpdated, + Provider.of(context).nextDayWithClass, + context, + ), ); } @@ -60,8 +61,12 @@ class FinalsCard extends StatelessWidget { } } - Widget buildFinalsCard(Map> finalsData, DateTime lastUpdated, String? nextDayWithClasses, - BuildContext context) { + Widget buildFinalsCard( + Map> finalsData, + DateTime lastUpdated, + String? nextDayWithClasses, + BuildContext context, + ) { try { var finalsCount = 0, i = 1; // Iterate through the map and count the number Finals @@ -72,32 +77,34 @@ class FinalsCard extends StatelessWidget { List listToReturn = []; finalsData.forEach((key, value) { for (SectionData data in value) { - listToReturn.add(ListTile( - // Friday - title: buildWeekdayText(context, abbrevToFullWeekday(data.days)), - subtitle: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox(height: 7), - // CSE 127 19:00 - 21:59 - Row( - children: [ - buildClassCode(context, data.subjectCode! + ' ' + data.courseCode!), - SizedBox(width: 10), // 10 logical pixels - buildTimeRow(context, data.time), - ], - ), - SizedBox(height: 2), - // Intro to Computer Security - buildClassTitle(context, data.courseTitle!), - SizedBox(height: 2), - // WLH 2005 - buildLocationRow(context, data.building! + ' ' + data.room!), - ///////////////// Horizontal Division /////////////////// - if (i < finalsCount) Divider(color: listTileDividerColorLight, thickness: 0.7), - ], + listToReturn.add( + ListTile( + // Friday + title: buildWeekdayText(context, abbrevToFullWeekday(data.days)), + subtitle: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox(height: 7), + // CSE 127 19:00 - 21:59 + Row( + children: [ + buildClassCode(context, data.subjectCode! + ' ' + data.courseCode!), + SizedBox(width: 10), // 10 logical pixels + buildTimeRow(context, data.time), + ], + ), + SizedBox(height: 2), + // Intro to Computer Security + buildClassTitle(context, data.courseTitle!), + SizedBox(height: 2), + // WLH 2005 + buildLocationRow(context, data.building! + ' ' + data.room!), + ///////////////// Horizontal Division /////////////////// + if (i < finalsCount) Divider(color: listTileDividerColorLight, thickness: 0.7), + ], + ), ), - )); + ); i++; } }); @@ -107,22 +114,23 @@ class FinalsCard extends StatelessWidget { child: LastUpdatedWidget(time: lastUpdated), ), ); - return ListView( - physics: NeverScrollableScrollPhysics(), - children: listToReturn, - shrinkWrap: true, - ); + return ListView(physics: NeverScrollableScrollPhysics(), children: listToReturn, shrinkWrap: true); } catch (e) { - FirebaseCrashlytics.instance.recordError(e, StackTrace.fromString(e.toString()), - reason: "Finals Card: Failed to build card content.", fatal: false); + FirebaseCrashlytics.instance.recordError( + e, + StackTrace.fromString(e.toString()), + reason: "Finals Card: Failed to build card content.", + fatal: false, + ); return Container( width: double.infinity, child: Center( child: Padding( padding: EdgeInsets.only(left: 12, top: 32, bottom: 48), child: Container( - child: - Text("Your finals could not be displayed.\n\nIf the problem persists contact mobilesupport@ucsd.edu"), + child: Text( + "Your finals could not be displayed.\n\nIf the problem persists contact mobilesupport@ucsd.edu", + ), ), ), ), @@ -144,14 +152,16 @@ class FinalsCard extends StatelessWidget { // Heading 3 i.e. "CSE 140" Widget buildClassCode(BuildContext context, String className) { - return Text(className, - style: TextStyle( - fontSize: 18.0, - fontFamily: 'Refrigerator Deluxe', - fontWeight: FontWeight.w900, - letterSpacing: 1.1, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, - )); + return Text( + className, + style: TextStyle( + fontSize: 18.0, + fontFamily: 'Refrigerator Deluxe', + fontWeight: FontWeight.w900, + letterSpacing: 1.1, + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + ), + ); } // Small body text i.e. 15:00 - 17:59 (24hr format) @@ -168,12 +178,14 @@ class FinalsCard extends StatelessWidget { // Medium Body text i.e. "Intro to Computer Security" Widget buildClassTitle(BuildContext context, String title) { - return Text(title, - style: TextStyle( - fontSize: 18.0, - color: - Theme.of(context).brightness == Brightness.light ? descriptiveTextColorLight : descriptiveTextColorDark, - fontWeight: FontWeight.w400)); + return Text( + title, + style: TextStyle( + fontSize: 18.0, + color: Theme.of(context).brightness == Brightness.light ? descriptiveTextColorLight : descriptiveTextColorDark, + fontWeight: FontWeight.w400, + ), + ); } // Medium Body Text i.e. "WLH 2005" @@ -184,13 +196,16 @@ class FinalsCard extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(location, - style: TextStyle( - fontSize: 18.0, - color: Theme.of(context).brightness == Brightness.light - ? descriptiveTextColorLight - : descriptiveTextColorDark, - fontWeight: FontWeight.w400)), + Text( + location, + style: TextStyle( + fontSize: 18.0, + color: Theme.of(context).brightness == Brightness.light + ? descriptiveTextColorLight + : descriptiveTextColorDark, + fontWeight: FontWeight.w400, + ), + ), ], ), ), diff --git a/lib/ui/home/home.dart b/lib/ui/home/home.dart index b6eb31cb3..b764e7f69 100644 --- a/lib/ui/home/home.dart +++ b/lib/ui/home/home.dart @@ -57,11 +57,7 @@ class MeasureSizeRenderObject extends RenderProxyBox { class MeasureSize extends SingleChildRenderObjectWidget { final OnWidgetSizeChange onChange; - const MeasureSize({ - Key? key, - required this.onChange, - required Widget child, - }) : super(key: key, child: child); + const MeasureSize({Key? key, required this.onChange, required Widget child}) : super(key: key, child: child); @override RenderObject createRenderObject(BuildContext context) => MeasureSizeRenderObject(onChange); @@ -93,9 +89,7 @@ class Home extends StatefulWidget { } class _HomeState extends State { - final _controller = ScrollController( - initialScrollOffset: getHomeScrollOffset(), - ); + final _controller = ScrollController(initialScrollOffset: getHomeScrollOffset()); InternetConnectivityProvider? _connectivityProvider; @override @@ -157,9 +151,7 @@ class _HomeState extends State { List createList() { // Copy list so select() detects reorder: profile mutates _cardOrder in place (same ref). - final orderedCards = getOrderedCardsList( - context.select((CardsDataProvider p) => List.from(p.cardOrder)), - ); + final orderedCards = getOrderedCardsList(context.select((CardsDataProvider p) => List.from(p.cardOrder))); final noticesCards = getNoticesCardsList(context.select((NoticesDataProvider p) => p.noticesModel)); return [...noticesCards, ...orderedCards]; } @@ -167,10 +159,12 @@ class _HomeState extends State { List getNoticesCardsList(List notices) => notices .asMap() .entries - .map((e) => CardViewTrackingWrapper( - cardId: 'notice_${e.key}', - child: NoticesCard(notice: e.value), - )) + .map( + (e) => CardViewTrackingWrapper( + cardId: 'notice_${e.key}', + child: NoticesCard(notice: e.value), + ), + ) .toList(); // Constructor tear-offs used below to generate ordered cards list in O(1) time @@ -187,7 +181,7 @@ class _HomeState extends State { 'employee_id': EmployeeIdCard.new, 'parking': ParkingCard.new, 'speed_test': WiFiCard.new, - 'shuttle': ShuttleCard.new + 'shuttle': ShuttleCard.new, }; void setNewCardHeight(String card, double height) { diff --git a/lib/ui/map/directions_button.dart b/lib/ui/map/directions_button.dart index d183a5749..e90a055a9 100644 --- a/lib/ui/map/directions_button.dart +++ b/lib/ui/map/directions_button.dart @@ -6,28 +6,25 @@ import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:provider/provider.dart'; class DirectionsButton extends StatelessWidget { - const DirectionsButton({ - Key? key, - }) : super(key: key); + const DirectionsButton({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return FloatingActionButton( heroTag: "directions", - child: Icon( - Icons.directions_walk, - color: Colors.lightBlue, - ), + child: Icon(Icons.directions_walk, color: Colors.lightBlue), backgroundColor: Colors.white, onPressed: () { final MapsDataProvider mapsProvider = Provider.of(context, listen: false); final bool hasNullLatitude = mapsProvider.coordinates!.lat == null; final bool hasNullLongitude = mapsProvider.coordinates!.lon == null; if (hasNullLatitude || hasNullLongitude) { - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text('Please turn your location on in order to use this feature.'), - duration: Duration(seconds: 3), - )); + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text('Please turn your location on in order to use this feature.'), + duration: Duration(seconds: 3), + ), + ); } else { String locationQuery = Provider.of(context, listen: false).searchBarController.text; if (locationQuery.isNotEmpty) { diff --git a/lib/ui/map/map.dart b/lib/ui/map/map.dart index 106434d5b..66fc222f7 100644 --- a/lib/ui/map/map.dart +++ b/lib/ui/map/map.dart @@ -89,10 +89,7 @@ class Maps extends StatelessWidget { onMapCreated: (controller) { Provider.of(context, listen: false).mapController = controller; }, - initialCameraPosition: CameraPosition( - target: const LatLng(32.8801, -117.2341), - zoom: 14.5, - ), + initialCameraPosition: CameraPosition(target: const LatLng(32.8801, -117.2341), zoom: 14.5), ), MapSearchBarPlaceHolder(), buildButtons(context), diff --git a/lib/ui/map/map_search_bar_ph.dart b/lib/ui/map/map_search_bar_ph.dart index 04cb80c43..a85216804 100644 --- a/lib/ui/map/map_search_bar_ph.dart +++ b/lib/ui/map/map_search_bar_ph.dart @@ -4,52 +4,49 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class MapSearchBarPlaceHolder extends StatelessWidget { - const MapSearchBarPlaceHolder({ - Key? key, - }) : super(key: key); + const MapSearchBarPlaceHolder({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Hero( - tag: 'search_bar', - child: Card( - margin: EdgeInsets.all(5), - child: RawMaterialButton( - onPressed: () { - Navigator.pushNamed(context, RoutePaths.MAP_SEARCH); - }, - child: Row( - children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 9), - child: Provider.of(context).isLoading! - ? Padding( - padding: const EdgeInsets.all(2.5), - child: Container( - height: 25, - width: 25, - child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary)), - ) - : Icon( - Icons.search, - size: 30, + tag: 'search_bar', + child: Card( + margin: EdgeInsets.all(5), + child: RawMaterialButton( + onPressed: () { + Navigator.pushNamed(context, RoutePaths.MAP_SEARCH); + }, + child: Row( + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 9), + child: Provider.of(context).isLoading! + ? Padding( + padding: const EdgeInsets.all(2.5), + child: Container( + height: 25, + width: 25, + child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary), ), - ), - Expanded( - child: TextField( - enabled: false, - controller: Provider.of(context).searchBarController, - style: TextStyle(fontSize: 20), - decoration: InputDecoration( - border: InputBorder.none, - contentPadding: EdgeInsets.symmetric(horizontal: 15), - hintText: 'Search', - ), + ) + : Icon(Icons.search, size: 30), + ), + Expanded( + child: TextField( + enabled: false, + controller: Provider.of(context).searchBarController, + style: TextStyle(fontSize: 20), + decoration: InputDecoration( + border: InputBorder.none, + contentPadding: EdgeInsets.symmetric(horizontal: 15), + hintText: 'Search', ), ), - ], - ), + ), + ], ), - )); + ), + ), + ); } } diff --git a/lib/ui/map/map_search_view.dart b/lib/ui/map/map_search_view.dart index 494b36f83..5d1c8bdd4 100644 --- a/lib/ui/map/map_search_view.dart +++ b/lib/ui/map/map_search_view.dart @@ -12,10 +12,7 @@ class MapSearchView extends StatelessWidget { return ContainerView( child: Column( children: [ - Hero( - tag: 'search_bar', - child: MapSearchBar(), - ), + Hero(tag: 'search_bar', child: MapSearchBar()), QuickSearchIcons(), Provider.of(context).searchHistory.isEmpty ? Card( @@ -26,7 +23,7 @@ class MapSearchView extends StatelessWidget { child: Center(child: Text('You have no recent searches')), ), ) - : SearchHistoryList() + : SearchHistoryList(), ], ), ); diff --git a/lib/ui/map/more_results_list.dart b/lib/ui/map/more_results_list.dart index 57f4f1dc4..d97f0f4d0 100644 --- a/lib/ui/map/more_results_list.dart +++ b/lib/ui/map/more_results_list.dart @@ -4,9 +4,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class MoreResultsList extends StatelessWidget { - const MoreResultsList({ - Key? key, - }) : super(key: key); + const MoreResultsList({Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -23,14 +21,9 @@ class MoreResultsList extends StatelessWidget { Container( height: 50, alignment: Alignment.center, - child: Text( - 'More Results', - style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), - ), - ), - Divider( - height: 0, + child: Text('More Results', style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)), ), + Divider(height: 0), Expanded( child: ListView.builder( itemCount: Provider.of(context).mapSearchModels.length, @@ -41,11 +34,11 @@ class MoreResultsList extends StatelessWidget { ), trailing: Text( Provider.of(cntxt, listen: false).mapSearchModels[index].distance != null - ? Provider.of(cntxt, listen: false) - .mapSearchModels[index] - .distance! - .toStringAsFixed(1) + - ' mi' + ? Provider.of( + cntxt, + listen: false, + ).mapSearchModels[index].distance!.toStringAsFixed(1) + + ' mi' : '--', style: TextStyle(color: Colors.blue[600]), ), @@ -64,17 +57,9 @@ class MoreResultsList extends StatelessWidget { style: ElevatedButton.styleFrom( backgroundColor: actionButtonBackgroundColor, padding: EdgeInsets.all(16), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(12), - ), - ), - child: Text( - 'SHOW MORE RESULTS', - style: TextStyle( - color: lightPrimaryColor, - fontSize: 16, - ), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), ), + child: Text('SHOW MORE RESULTS', style: TextStyle(color: lightPrimaryColor, fontSize: 16)), ), ), ); diff --git a/lib/ui/map/my_location_button.dart b/lib/ui/map/my_location_button.dart index 20b9ce0df..6cd2e94b2 100644 --- a/lib/ui/map/my_location_button.dart +++ b/lib/ui/map/my_location_button.dart @@ -4,11 +4,9 @@ import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:provider/provider.dart'; class MyLocationButton extends StatelessWidget { - const MyLocationButton({ - Key? key, - required GoogleMapController? mapController, - }) : _mapController = mapController, - super(key: key); + const MyLocationButton({Key? key, required GoogleMapController? mapController}) + : _mapController = mapController, + super(key: key); final GoogleMapController? _mapController; @@ -16,24 +14,28 @@ class MyLocationButton extends StatelessWidget { Widget build(BuildContext context) { return FloatingActionButton( heroTag: "my_location", - child: Icon( - Icons.my_location, - color: Colors.white, - ), + child: Icon(Icons.my_location, color: Colors.white), backgroundColor: Colors.lightBlue, onPressed: () { final MapsDataProvider mapsProvider = Provider.of(context, listen: false); final bool hasNullLatitude = mapsProvider.coordinates!.lat == null; final bool hasNullLongitude = mapsProvider.coordinates!.lon == null; if (hasNullLatitude || hasNullLongitude) { - ScaffoldMessenger.of(context).showSnackBar(SnackBar( - content: Text('Please turn your location on in order to use this feature.'), - duration: Duration(seconds: 3), - )); + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text('Please turn your location on in order to use this feature.'), + duration: Duration(seconds: 3), + ), + ); } else { - _mapController!.animateCamera(CameraUpdate.newLatLng(LatLng( - Provider.of(context, listen: false).coordinates!.lat!, - Provider.of(context, listen: false).coordinates!.lon!))); + _mapController!.animateCamera( + CameraUpdate.newLatLng( + LatLng( + Provider.of(context, listen: false).coordinates!.lat!, + Provider.of(context, listen: false).coordinates!.lon!, + ), + ), + ); } }, ); diff --git a/lib/ui/map/quick_search_icons.dart b/lib/ui/map/quick_search_icons.dart index 336b545a6..9b239899b 100644 --- a/lib/ui/map/quick_search_icons.dart +++ b/lib/ui/map/quick_search_icons.dart @@ -3,9 +3,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class QuickSearchIcons extends StatelessWidget { - const QuickSearchIcons({ - Key? key, - }) : super(key: key); + const QuickSearchIcons({Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -65,10 +63,7 @@ class LabeledIconButton extends StatelessWidget { onPressed: onPressed as void Function()?, color: Color(0xFF00629B), textColor: Colors.white, - child: Icon( - icon, - size: 28, - ), + child: Icon(icon, size: 28), padding: EdgeInsets.all(12), shape: CircleBorder(), ), diff --git a/lib/ui/map/search_bar.dart b/lib/ui/map/search_bar.dart index de448e3b9..e3d820366 100644 --- a/lib/ui/map/search_bar.dart +++ b/lib/ui/map/search_bar.dart @@ -3,9 +3,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class MapSearchBar extends StatelessWidget { - const MapSearchBar({ - Key? key, - }) : super(key: key); + const MapSearchBar({Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -27,12 +25,16 @@ class MapSearchBar extends StatelessWidget { textInputAction: TextInputAction.search, onChanged: (text) {}, onSubmitted: (text) { - final bool hasText = - Provider.of(context, listen: false).searchBarController.text.isNotEmpty; + final bool hasText = Provider.of( + context, + listen: false, + ).searchBarController.text.isNotEmpty; if (hasText) { // Don't fetch on empty text field - Provider.of(context, listen: false) - .fetchLocations(); // Text doesn't need to be sent over because it's already in the controller + Provider.of( + context, + listen: false, + ).fetchLocations(); // Text doesn't need to be sent over because it's already in the controller } Navigator.pop(context); }, @@ -54,7 +56,7 @@ class MapSearchBar extends StatelessWidget { Provider.of(context, listen: false).markers.clear(); }, ) - : Container(height: 0) + : Container(height: 0), ], ), ); diff --git a/lib/ui/map/search_history_list.dart b/lib/ui/map/search_history_list.dart index 671e1370c..21aebc55b 100644 --- a/lib/ui/map/search_history_list.dart +++ b/lib/ui/map/search_history_list.dart @@ -3,9 +3,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class SearchHistoryList extends StatelessWidget { - const SearchHistoryList({ - Key? key, - }) : super(key: key); + const SearchHistoryList({Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -26,7 +24,8 @@ class SearchHistoryList extends StatelessWidget { icon: Icon(Icons.cancel), onPressed: () { Provider.of(context, listen: false).removeFromSearchHistory( - Provider.of(context, listen: false).searchHistory.reversed.toList()[index]); + Provider.of(context, listen: false).searchHistory.reversed.toList()[index], + ); }, ), onTap: () { diff --git a/lib/ui/my_student_chart/my_student_chart_card.dart b/lib/ui/my_student_chart/my_student_chart_card.dart index 3d1604f70..ecc8452d7 100644 --- a/lib/ui/my_student_chart/my_student_chart_card.dart +++ b/lib/ui/my_student_chart/my_student_chart_card.dart @@ -28,8 +28,9 @@ class MyStudentChartCard extends StatelessWidget { analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'login'}); try { launchUrl( - Uri.parse('https://mystudentchart.ucsd.edu/SHS/Authentication/Saml/Login?idp=UCSD_STUDENT_AD_LOGIN'), - mode: LaunchMode.inAppBrowserView); + Uri.parse('https://mystudentchart.ucsd.edu/SHS/Authentication/Saml/Login?idp=UCSD_STUDENT_AD_LOGIN'), + mode: LaunchMode.inAppBrowserView, + ); } catch (e) { // an error occurred, do nothing } @@ -45,15 +46,8 @@ class MyStudentChartCard extends StatelessWidget { child: Row( children: [ Container( - child: Image.asset( - 'assets/images/MyChartLogo.png', - fit: BoxFit.contain, - height: 32, - ), - padding: EdgeInsets.only( - left: 16, - right: 8, - ), + child: Image.asset('assets/images/MyChartLogo.png', fit: BoxFit.contain, height: 32), + padding: EdgeInsets.only(left: 16, right: 8), ), Flexible( child: Text( @@ -61,7 +55,7 @@ class MyStudentChartCard extends StatelessWidget { textAlign: TextAlign.left, style: Theme.of(context).textTheme.bodyMedium, ), - ) + ), ], ), ); diff --git a/lib/ui/my_ucsd_chart/my_ucsd_chart_card.dart b/lib/ui/my_ucsd_chart/my_ucsd_chart_card.dart index 27f4f259c..96a87a0c0 100644 --- a/lib/ui/my_ucsd_chart/my_ucsd_chart_card.dart +++ b/lib/ui/my_ucsd_chart/my_ucsd_chart_card.dart @@ -44,15 +44,8 @@ class MyUCSDChartCard extends StatelessWidget { child: Row( children: [ Container( - child: Image.asset( - 'assets/images/MyChartLogo.png', - fit: BoxFit.contain, - height: 32, - ), - padding: EdgeInsets.only( - left: 16, - right: 8, - ), + child: Image.asset('assets/images/MyChartLogo.png', fit: BoxFit.contain, height: 32), + padding: EdgeInsets.only(left: 16, right: 8), ), Flexible( child: Text( @@ -60,7 +53,7 @@ class MyUCSDChartCard extends StatelessWidget { textAlign: TextAlign.left, style: Theme.of(context).textTheme.bodyMedium, ), - ) + ), ], ), ); diff --git a/lib/ui/navigator/bottom.dart b/lib/ui/navigator/bottom.dart index 5c974f0ad..2de5cf2eb 100644 --- a/lib/ui/navigator/bottom.dart +++ b/lib/ui/navigator/bottom.dart @@ -30,13 +30,7 @@ class BottomTabBar extends StatefulWidget { } class _BottomTabBarState extends State { - var currentTab = [ - Home(), - EsriMap(), - AIAssistantTab(), - NotificationsListView(), - Profile(), - ]; + var currentTab = [Home(), EsriMap(), AIAssistantTab(), NotificationsListView(), Profile()]; @override Widget build(BuildContext context) { @@ -48,15 +42,12 @@ class _BottomTabBarState extends State { drawerScrimColor: Colors.transparent, backgroundColor: provider.currentIndex == 0 ? lightPrimaryColor : theme.scaffoldBackgroundColor, appBar: isAssistantTab - ? null - : PreferredSize(preferredSize: Size.fromHeight(50), child: Provider.of(context).appBar), + ? null + : PreferredSize(preferredSize: Size.fromHeight(50), child: Provider.of(context).appBar), body: PushNotificationWrapper( - child: IndexedStack( - index: provider.currentIndex, - children: currentTab, - ), + child: IndexedStack(index: provider.currentIndex, children: currentTab), ), - + bottomNavigationBar: Container( decoration: BoxDecoration( color: theme.bottomNavigationBarTheme.backgroundColor, @@ -89,8 +80,10 @@ class _BottomTabBarState extends State { break; case NavigatorConstants.NOTIFICATIONS_TAB: resetAllCardLoadedStates(); - Provider.of(context, listen: false) - .changeTitle("Notifications", done: false, notification: true); + Provider.of( + context, + listen: false, + ).changeTitle("Notifications", done: false, notification: true); break; case NavigatorConstants.PROFILE_TAB: resetAllCardLoadedStates(); @@ -99,21 +92,18 @@ class _BottomTabBarState extends State { } }, items: [ - BottomNavigationBarItem( - icon: _buildIcon(Icons.home, provider.currentIndex == 0, theme), - label: 'HOME', - ), - BottomNavigationBarItem( - icon: _buildIcon(Icons.map, provider.currentIndex == 1, theme), - label: 'MAP', - ), + BottomNavigationBarItem(icon: _buildIcon(Icons.home, provider.currentIndex == 0, theme), label: 'HOME'), + BottomNavigationBarItem(icon: _buildIcon(Icons.map, provider.currentIndex == 1, theme), label: 'MAP'), BottomNavigationBarItem( icon: _buildAIAssistantIcon(provider.currentIndex == NavigatorConstants.AI_ASSISTANT_TAB, theme), label: 'AI ASSISTANT', ), BottomNavigationBarItem( - icon: - _buildIcon(Icons.notifications, provider.currentIndex == NavigatorConstants.NOTIFICATIONS_TAB, theme), + icon: _buildIcon( + Icons.notifications, + provider.currentIndex == NavigatorConstants.NOTIFICATIONS_TAB, + theme, + ), label: 'NOTIFICATIONS', ), BottomNavigationBarItem( @@ -135,8 +125,9 @@ class _BottomTabBarState extends State { } Widget _buildAIAssistantIcon(bool isSelected, ThemeData theme) { - final iconAsset = - isSelected ? 'assets/images/tgpt/center-icon2.png' : 'assets/images/tgpt/center-icon2-unselected.png'; + final iconAsset = isSelected + ? 'assets/images/tgpt/center-icon2.png' + : 'assets/images/tgpt/center-icon2-unselected.png'; return Container( height: 34, @@ -146,16 +137,11 @@ class _BottomTabBarState extends State { color: isSelected ? theme.listTileTheme.selectedColor : Colors.transparent, borderRadius: BorderRadius.circular(34), ), - child: Image.asset( - iconAsset, - width: 34, - height: 34, - filterQuality: FilterQuality.high, - ), + child: Image.asset(iconAsset, width: 34, height: 34, filterQuality: FilterQuality.high), ); } -// Build bottom navigator icons + // Build bottom navigator icons Widget _buildIcon(IconData icon, bool isSelected, ThemeData theme, {double size = 34}) { return Container( height: 34, diff --git a/lib/ui/navigator/top.dart b/lib/ui/navigator/top.dart index a7bca507a..f4792bbf7 100644 --- a/lib/ui/navigator/top.dart +++ b/lib/ui/navigator/top.dart @@ -6,11 +6,7 @@ import 'package:provider/provider.dart'; import 'package:campus_mobile_experimental/ui/common/top_content.dart'; class CMAppBar extends StatelessWidget { - CMAppBar({ - this.title, - this.doneButton, - this.notificationsFilterButton, - }); + CMAppBar({this.title, this.doneButton, this.notificationsFilterButton}); final String? title; final bool? doneButton; @@ -22,25 +18,23 @@ class CMAppBar extends StatelessWidget { return TopContent( title: title, action: Padding( - padding: EdgeInsets.only(bottom: 8, right: 20), - child: TextButton( - style: TextButton.styleFrom( - foregroundColor: darkButtonColor, - ), - child: Text( - 'Done', - ), - onPressed: () { - // Set tab bar index to the Home tab - Provider.of(context, listen: false).currentIndex = - NavigatorConstants.HOME_TAB; - // Navigate to Home tab - Navigator.of(context) - .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); - // change the appBar title to the ucsd logo - Provider.of(context, listen: false).changeTitle(CustomAppBar().appBar.title); - }, - )), + padding: EdgeInsets.only(bottom: 8, right: 20), + child: TextButton( + style: TextButton.styleFrom(foregroundColor: darkButtonColor), + child: Text('Done'), + onPressed: () { + // Set tab bar index to the Home tab + Provider.of(context, listen: false).currentIndex = + NavigatorConstants.HOME_TAB; + // Navigate to Home tab + Navigator.of( + context, + ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + // change the appBar title to the ucsd logo + Provider.of(context, listen: false).changeTitle(CustomAppBar().appBar.title); + }, + ), + ), hasAction: true, ); } else if (notificationsFilterButton == true) { @@ -58,11 +52,7 @@ class CMAppBar extends StatelessWidget { hasAction: true, ); } else { - return TopContent( - title: title, - action: null, - hasAction: false, - ); + return TopContent(title: title, action: null, hasAction: false); } } } @@ -79,11 +69,7 @@ class CustomAppBar extends ChangeNotifier { late CMAppBar appBar; makeAppBar() { - appBar = CMAppBar( - title: title, - doneButton: doneButton, - notificationsFilterButton: notificationsFilterButton, - ); + appBar = CMAppBar(title: title, doneButton: doneButton, notificationsFilterButton: notificationsFilterButton); } changeTitle(String? newTitle, {done = false, notification = false}) { diff --git a/lib/ui/news/news_card.dart b/lib/ui/news/news_card.dart index 4f78cecee..8dac71732 100644 --- a/lib/ui/news/news_card.dart +++ b/lib/ui/news/news_card.dart @@ -18,23 +18,22 @@ class NewsCard extends StatelessWidget { print(e); return Container( width: double.infinity, - child: Center( - child: Container( - child: Text('An error occurred, please try again.'), - ), - ), + child: Center(child: Container(child: Text('An error occurred, please try again.'))), ); } } List buildActionButtons(BuildContext context) { List actionButtons = []; - actionButtons.add(ActionButton( + actionButtons.add( + ActionButton( buttonText: 'VIEW MORE NEWS STORIES', onPressed: () { analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'view_more'}); Navigator.pushNamed(context, RoutePaths.NEWS_VIEW_ALL); - })); + }, + ), + ); return actionButtons; } diff --git a/lib/ui/news/news_detail_view.dart b/lib/ui/news/news_detail_view.dart index 73ba76e30..84fada918 100644 --- a/lib/ui/news/news_detail_view.dart +++ b/lib/ui/news/news_detail_view.dart @@ -14,48 +14,46 @@ class NewsDetailView extends StatelessWidget { return ContainerView( child: ListView( children: [ - Builder(builder: (context) { - String fallbackTitle = data.title; - var hasColon = fallbackTitle.contains(':'); - if (hasColon) fallbackTitle = fallbackTitle.split(':')[0].trim(); - var isTitleTooLong = fallbackTitle.length > 40; - if (isTitleTooLong) fallbackTitle = fallbackTitle.substring(0, 40) + '...'; - String semanticLabel = fallbackTitle; + Builder( + builder: (context) { + String fallbackTitle = data.title; + var hasColon = fallbackTitle.contains(':'); + if (hasColon) fallbackTitle = fallbackTitle.split(':')[0].trim(); + var isTitleTooLong = fallbackTitle.length > 40; + if (isTitleTooLong) fallbackTitle = fallbackTitle.substring(0, 40) + '...'; + String semanticLabel = fallbackTitle; - // Add spaces between consecutive uppercase letters so TalkBack spells acronyms out - semanticLabel = semanticLabel.replaceAllMapped( - RegExp(r'[A-Z]{2,}'), - (match) => match.group(0)!.split('').join(' '), - ); + // Add spaces between consecutive uppercase letters so TalkBack spells acronyms out + semanticLabel = semanticLabel.replaceAllMapped( + RegExp(r'[A-Z]{2,}'), + (match) => match.group(0)!.split('').join(' '), + ); - return Semantics( - image: true, - label: semanticLabel, - child: Container( - height: MediaQuery.of(context).size.height * 0.33, - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.cover, - image: data.image.isEmpty - ? const AssetImage('assets/images/UCSDMobile_banner.png') as ImageProvider - : NetworkImage(data.image), + return Semantics( + image: true, + label: semanticLabel, + child: Container( + height: MediaQuery.of(context).size.height * 0.33, + decoration: BoxDecoration( + image: DecorationImage( + fit: BoxFit.cover, + image: data.image.isEmpty + ? const AssetImage('assets/images/UCSDMobile_banner.png') as ImageProvider + : NetworkImage(data.image), + ), ), ), - ), - ); - }), + ); + }, + ), Container( padding: const EdgeInsets.all(16.0), child: Row( children: [ // Mimics StartDateContainer from events_detail_view.dart - NewsDateContainer( - date: DateFormat("MMM d y").format(data.date.toLocal()), - ), + NewsDateContainer(date: DateFormat("MMM d y").format(data.date.toLocal())), // Title on the right - Expanded( - child: NewsTitle(title: data.title), - ), + Expanded(child: NewsTitle(title: data.title)), ], ), ), @@ -65,11 +63,7 @@ class NewsDetailView extends StatelessWidget { ? Text( data.description, semanticsLabel: 'What happened: ${data.description}', - style: const TextStyle( - fontSize: 16, - height: 1.4, - fontWeight: FontWeight.w400, - ), + style: const TextStyle(fontSize: 16, height: 1.4, fontWeight: FontWeight.w400), ) : Container(), ), @@ -103,7 +97,7 @@ class NewsDateContainer extends StatelessWidget { 'Sep': 'September', 'Oct': 'October', 'Nov': 'November', - 'Dec': 'December' + 'Dec': 'December', }; months.forEach((key, value) { semanticDate = semanticDate.replaceAll(key, value); @@ -189,18 +183,13 @@ class ContinueReadingButton extends StatelessWidget { try { launchUrl(Uri.parse(link), mode: LaunchMode.inAppBrowserView); } catch (e) { - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar(content: Text('Could not open.')), - ); + ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('Could not open.'))); } }, child: FittedBox( child: Row( children: [ - Text( - 'FULL STORY', - style: TextStyle(fontSize: 18, color: lightPrimaryColor), - ), + Text('FULL STORY', style: TextStyle(fontSize: 18, color: lightPrimaryColor)), const SizedBox(width: 4), Icon(Icons.open_in_new, size: 18, color: lightPrimaryColor), ], diff --git a/lib/ui/news/news_list.dart b/lib/ui/news/news_list.dart index 8897a186e..d1a0966f8 100644 --- a/lib/ui/news/news_list.dart +++ b/lib/ui/news/news_list.dart @@ -17,16 +17,9 @@ class NewsList extends StatelessWidget { @override Widget build(BuildContext context) { if (Provider.of(context).isLoading) { - return Center( - child: CircularProgressIndicator( - color: Theme.of(context).colorScheme.secondary, - ), - ); + return Center(child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary)); } - return buildNewsList( - context, - Provider.of(context).newsModels, - ); + return buildNewsList(context, Provider.of(context).newsModels); } Widget buildNewsList(BuildContext context, NewsModel data) { @@ -81,11 +74,7 @@ class NewsList extends StatelessWidget { excludeSemantics: true, child: GestureDetector( onTap: () { - Navigator.pushNamed( - context, - RoutePaths.NEWS_DETAIL_VIEW, - arguments: newsItem, - ); + Navigator.pushNamed(context, RoutePaths.NEWS_DETAIL_VIEW, arguments: newsItem); }, child: Container( padding: EdgeInsets.all(8.0), @@ -96,11 +85,7 @@ class NewsList extends StatelessWidget { Container( width: 140, margin: EdgeInsets.only(right: 8.0), - child: ImageLoader( - url: newsItem.image, - fullSize: true, - fit: BoxFit.cover, - ), + child: ImageLoader(url: newsItem.image, fullSize: true, fit: BoxFit.cover), ), Expanded( child: Column( @@ -122,10 +107,11 @@ class NewsList extends StatelessWidget { ), TextSpan( text: ' - ', - style: Theme.of(context) - .textTheme - .headlineMedium! - .copyWith(height: 1.42, fontSize: 16.0, decoration: TextDecoration.none), + style: Theme.of(context).textTheme.headlineMedium!.copyWith( + height: 1.42, + fontSize: 16.0, + decoration: TextDecoration.none, + ), ), TextSpan( text: newsItem.title, diff --git a/lib/ui/notices/notices_card.dart b/lib/ui/notices/notices_card.dart index df5e701c1..d0abcb046 100644 --- a/lib/ui/notices/notices_card.dart +++ b/lib/ui/notices/notices_card.dart @@ -5,10 +5,7 @@ import 'package:campus_mobile_experimental/ui/common/image_loader.dart'; import 'package:flutter/material.dart'; class NoticesCard extends StatelessWidget { - const NoticesCard({ - Key? key, - required this.notice, - }) : super(key: key); + const NoticesCard({Key? key, required this.notice}) : super(key: key); /// MODELS final NoticesModel notice; @@ -19,21 +16,15 @@ class NoticesCard extends StatelessWidget { margin: EdgeInsets.only(top: 0.0, right: 0.0, bottom: cardMargin * 1.5, left: 0.0), elevation: 4, shadowColor: Colors.black, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(12.0), - ), - child: ClipRRect( - borderRadius: BorderRadius.circular(12.0), - child: buildBannerView(notice), - ), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), + child: ClipRRect(borderRadius: BorderRadius.circular(12.0), child: buildBannerView(notice)), ); } Widget buildBannerView(NoticesModel notice) { String accessibilityLabel = notice.title; var isWelcomeTitle = notice.title == 'Triton Weeks of Welcome - Welcoming new students to the Triton community'; - if (isWelcomeTitle) - accessibilityLabel = 'T W O W - Triton Weeks of Welcome - visit t w o w dot ucsd dot e d u'; + if (isWelcomeTitle) accessibilityLabel = 'T W O W - Triton Weeks of Welcome - visit t w o w dot ucsd dot e d u'; // The screen reader will read - "image - (text on the image)" // print('\x1B[32mNoticesModel(title: ${notice.title}, link: ${notice.link}, imageUrl: ${notice.imageUrl})\x1B[0m'); @@ -42,13 +33,11 @@ class NoticesCard extends StatelessWidget { image: true, button: true, child: GestureDetector( - onTap: () { - openLink(notice.link); - }, - child: ImageLoader( - url: notice.imageUrl, - fullSize: true, - )), + onTap: () { + openLink(notice.link); + }, + child: ImageLoader(url: notice.imageUrl, fullSize: true), + ), ); } } diff --git a/lib/ui/notifications/notifications_filter.dart b/lib/ui/notifications/notifications_filter.dart index ca52947be..648560c9b 100644 --- a/lib/ui/notifications/notifications_filter.dart +++ b/lib/ui/notifications/notifications_filter.dart @@ -37,17 +37,10 @@ class NotificationsFilterView extends StatelessWidget { contentPadding: EdgeInsets.all(0), visualDensity: VisualDensity.compact, key: Key(topic!), - leading: Icon( - chooseIcons(topic), - color: Theme.of(context).iconTheme.color, - size: 30, - ), + leading: Icon(chooseIcons(topic), color: Theme.of(context).iconTheme.color, size: 30), title: Padding( padding: const EdgeInsets.symmetric(horizontal: 4.0), - child: Text( - getTopicName(context, topic)!, - style: Theme.of(context).textTheme.labelMedium, - ), + child: Text(getTopicName(context, topic)!, style: Theme.of(context).textTheme.labelMedium), ), trailing: Transform.scale( scale: 0.9, diff --git a/lib/ui/notifications/notifications_freefood.dart b/lib/ui/notifications/notifications_freefood.dart index cfdad723c..9d26c4303 100644 --- a/lib/ui/notifications/notifications_freefood.dart +++ b/lib/ui/notifications/notifications_freefood.dart @@ -6,10 +6,7 @@ class FreeFoodNotification extends StatefulWidget { /// required parameters final String? messageId; - const FreeFoodNotification({ - Key? key, - required this.messageId, - }) : super(key: key); + const FreeFoodNotification({Key? key, required this.messageId}) : super(key: key); @override _CheckBoxButtonState createState() => _CheckBoxButtonState(messageId); @@ -56,91 +53,92 @@ class _CheckBoxButtonState extends State { var countText = currCount == 1 ? '$currCount student is going' : '$currCount students are going'; return Container( - margin: EdgeInsets.only(top: 8.0), - child: Row( - children: [ - Container( - height: 30, - width: 170, - child: AnimatedCrossFade( - duration: Duration(milliseconds: 300), - crossFadeState: isOverCount ? CrossFadeState.showFirst : CrossFadeState.showSecond, - firstChild: Column( - children: [ - Text(countText, style: TextStyle(fontSize: 10, color: Colors.red)), - Container( - margin: EdgeInsets.only(top: 2.0), - child: Row( - children: [ - Icon(Icons.report, color: Colors.grey, size: 15), - Text("There may not be enough food", style: TextStyle(fontSize: 12)) - ], - )), - ], - crossAxisAlignment: CrossAxisAlignment.start, - ), - secondChild: Align( - alignment: Alignment.topLeft, - child: Text(countText, style: TextStyle(fontSize: 12, color: Colors.green)), - ), + margin: EdgeInsets.only(top: 8.0), + child: Row( + children: [ + Container( + height: 30, + width: 170, + child: AnimatedCrossFade( + duration: Duration(milliseconds: 300), + crossFadeState: isOverCount ? CrossFadeState.showFirst : CrossFadeState.showSecond, + firstChild: Column( + children: [ + Text(countText, style: TextStyle(fontSize: 10, color: Colors.red)), + Container( + margin: EdgeInsets.only(top: 2.0), + child: Row( + children: [ + Icon(Icons.report, color: Colors.grey, size: 15), + Text("There may not be enough food", style: TextStyle(fontSize: 12)), + ], + ), + ), + ], + crossAxisAlignment: CrossAxisAlignment.start, + ), + secondChild: Align( + alignment: Alignment.topLeft, + child: Text(countText, style: TextStyle(fontSize: 12, color: Colors.green)), ), ), - _checkBoxButton() - ], - mainAxisAlignment: MainAxisAlignment.spaceBetween, - )); + ), + _checkBoxButton(), + ], + mainAxisAlignment: MainAxisAlignment.spaceBetween, + ), + ); } Widget _checkBoxButton() { return Container( - height: 23, - width: 100, - decoration: BoxDecoration( - border: Border.all( - width: 1.0, - color: _borderColor, - ), - borderRadius: BorderRadius.all( - Radius.circular(2.0), - ), - ), - margin: EdgeInsets.only(right: 10.0), - child: _isLoading - ? Center( - child: Container( - height: 12, - width: 12, - child: CircularProgressIndicator( - color: Theme.of(context).colorScheme.secondary, - strokeWidth: 1.5, - ))) - : Material( - color: _buttonColor, - child: InkWell( - onTap: () { - _toggleGoing(); - }, - child: Center( - child: Row( + height: 23, + width: 100, + decoration: BoxDecoration( + border: Border.all(width: 1.0, color: _borderColor), + borderRadius: BorderRadius.all(Radius.circular(2.0)), + ), + margin: EdgeInsets.only(right: 10.0), + child: _isLoading + ? Center( + child: Container( + height: 12, + width: 12, + child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary, strokeWidth: 1.5), + ), + ) + : Material( + color: _buttonColor, + child: InkWell( + onTap: () { + _toggleGoing(); + }, + child: Center( + child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ SizedBox( - height: 10.0, - width: 8.0, - child: Transform.scale( - scale: 0.5, - child: Checkbox( - checkColor: Colors.green, - activeColor: Colors.white, - value: _isGoing, - onChanged: (bool? val) { - _toggleGoing(); - }, - ))), + height: 10.0, + width: 8.0, + child: Transform.scale( + scale: 0.5, + child: Checkbox( + checkColor: Colors.green, + activeColor: Colors.white, + value: _isGoing, + onChanged: (bool? val) { + _toggleGoing(); + }, + ), + ), + ), Text("I'm Going!", style: TextStyle(color: _textColor, fontSize: 12)), ], - )), - ))); + ), + ), + ), + ), + ); } void _toggleGoing() { diff --git a/lib/ui/notifications/notifications_list_view.dart b/lib/ui/notifications/notifications_list_view.dart index a5035866f..2057b9923 100644 --- a/lib/ui/notifications/notifications_list_view.dart +++ b/lib/ui/notifications/notifications_list_view.dart @@ -29,9 +29,10 @@ class _NotificationsListViewState extends State { super.initState(); hideListView = true; WidgetsBinding.instance.addPostFrameCallback((_) { - Provider.of(context, listen: false) - .notificationScrollController - .jumpTo(getNotificationsScrollOffset()); + Provider.of( + context, + listen: false, + ).notificationScrollController.jumpTo(getNotificationsScrollOffset()); setState(() { hideListView = false; }); @@ -95,22 +96,14 @@ class _NotificationsListViewState extends State { static Widget _buildErrorText() { return Row( mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text(NotificationsConstants.STATUS_FETCH_PROBLEM), - ], + children: [Text(NotificationsConstants.STATUS_FETCH_PROBLEM)], ); } static Widget _buildNoMessagesText() { return Row( mainAxisAlignment: MainAxisAlignment.center, - children: [ - Flexible( - child: Text( - NotificationsConstants.STATUS_NO_MESSAGES, - ), - ), - ], + children: [Flexible(child: Text(NotificationsConstants.STATUS_NO_MESSAGES))], ); } @@ -166,8 +159,10 @@ class _NotificationsListViewState extends State { children: [ Align( alignment: Alignment.topLeft, - child: Text(data.message.title, - style: Theme.of(context).brightness == Brightness.dark ? headlineMediumDark2 : headlineMediumLight2), + child: Text( + data.message.title, + style: Theme.of(context).brightness == Brightness.dark ? headlineMediumDark2 : headlineMediumLight2, + ), ), ], ), @@ -178,19 +173,19 @@ class _NotificationsListViewState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Linkify( - text: data.message.message, - onOpen: (link) async { - try { - launchUrl(Uri.parse(link.url), mode: LaunchMode.inAppBrowserView); - } catch (e) { - // an error occurred, do nothing - } - }, - options: LinkifyOptions(humanize: false), - style: Theme.of(context) - .textTheme - .bodySmall - ?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400)), + text: data.message.message, + onOpen: (link) async { + try { + launchUrl(Uri.parse(link.url), mode: LaunchMode.inAppBrowserView); + } catch (e) { + // an error occurred, do nothing + } + }, + options: LinkifyOptions(humanize: false), + style: Theme.of( + context, + ).textTheme.bodySmall?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), + ), freefoodProvider.isFreeFood(data.messageId) ? FreeFoodNotification(messageId: data.messageId) : Container(), ], ), @@ -200,11 +195,12 @@ class _NotificationsListViewState extends State { children: [ Padding( padding: const EdgeInsets.only(top: 6.0), - child: Text(_readTimestamp(data.timestamp), - style: Theme.of(context) - .textTheme - .bodySmall - ?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700)), + child: Text( + _readTimestamp(data.timestamp), + style: Theme.of( + context, + ).textTheme.bodySmall?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), + ), ), ], ), diff --git a/lib/ui/onboarding/onboarding_login.dart b/lib/ui/onboarding/onboarding_login.dart index 170d0f334..b5cf44e02 100644 --- a/lib/ui/onboarding/onboarding_login.dart +++ b/lib/ui/onboarding/onboarding_login.dart @@ -35,296 +35,308 @@ class _OnboardingLoginState extends State { Widget build(BuildContext context) => // This improves colors and styling of the status bar text AnnotatedRegion( - value: const SystemUiOverlayStyle( - statusBarColor: Colors.transparent, - systemNavigationBarColor: Colors.black, - statusBarIconBrightness: Brightness.dark, - statusBarBrightness: Brightness.light, // for iOS - systemNavigationBarIconBrightness: Brightness.dark, - ), - child: Scaffold( - backgroundColor: lightOnboardingScreen, - body: _userDataProvider.isLoading - ? const Center( - child: const CircularProgressIndicator( - valueColor: const AlwaysStoppedAnimation(darkAccentColor), - ), - ) - : SingleChildScrollView( - child: Container( - height: _screenHeight, - decoration: const BoxDecoration( - image: const DecorationImage( - image: const AssetImage("assets/images/login-background.png"), - fit: BoxFit.cover, // Ensure the image covers the entire screen - ), - ), - child: SafeArea(child: _buildLoginWidget()), + value: const SystemUiOverlayStyle( + statusBarColor: Colors.transparent, + systemNavigationBarColor: Colors.black, + statusBarIconBrightness: Brightness.dark, + statusBarBrightness: Brightness.light, // for iOS + systemNavigationBarIconBrightness: Brightness.dark, + ), + child: Scaffold( + backgroundColor: lightOnboardingScreen, + body: _userDataProvider.isLoading + ? const Center( + child: const CircularProgressIndicator( + valueColor: const AlwaysStoppedAnimation(darkAccentColor), + ), + ) + : SingleChildScrollView( + child: Container( + height: _screenHeight, + decoration: const BoxDecoration( + image: const DecorationImage( + image: const AssetImage("assets/images/login-background.png"), + fit: BoxFit.cover, // Ensure the image covers the entire screen ), - ))); + ), + child: SafeArea(child: _buildLoginWidget()), + ), + ), + ), + ); Widget _buildLoginWidget() => Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, // Align items at the top - crossAxisAlignment: CrossAxisAlignment.center, // Center items horizontally - children: [ - const Spacer(flex: 3), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, // Align items at the top + crossAxisAlignment: CrossAxisAlignment.center, // Center items horizontally + children: [ + const Spacer(flex: 3), - // UCSD Logo - Flexible( - flex: 0, - child: FractionallySizedBox( - widthFactor: 0.78055556, - child: Image.asset('assets/images/UCSanDiegoLogo-Blue.png'), + // UCSD Logo + Flexible( + flex: 0, + child: FractionallySizedBox( + widthFactor: 0.78055556, + child: Image.asset('assets/images/UCSanDiegoLogo-Blue.png'), + ), + ), + const SizedBox(height: 44.0), + + // Welcome Heading + const Flexible( + flex: 0, + child: const FractionallySizedBox( + widthFactor: 0.725, + child: const Text( + "WELCOME TO THE UC SAN DIEGO MOBILE APP", + textAlign: TextAlign.center, + style: const TextStyle( + fontFamily: "Refrigerator Deluxe", + fontSize: 34.5, + height: 0.9333, // line height: 20px + fontWeight: FontWeight.w900, + color: const Color(0xFF182B49), // Subheading color ), ), - const SizedBox(height: 44.0), + ), + ), + const SizedBox(height: 12.5), - // Welcome Heading - const Flexible( - flex: 0, - child: const FractionallySizedBox( - widthFactor: 0.725, - child: const Text( - "WELCOME TO THE UC SAN DIEGO MOBILE APP", - textAlign: TextAlign.center, - style: const TextStyle( - fontFamily: "Refrigerator Deluxe", - fontSize: 34.5, - height: 0.9333, // line height: 20px - fontWeight: FontWeight.w900, - color: const Color(0xFF182B49), // Subheading color - ), - )), + // Description Text + const Flexible( + flex: 0, + child: const FractionallySizedBox( + widthFactor: 0.64722222, + child: const Text( + // TODO: the font here seems a bit light. Might need to swap that out later - December 2025 + "Your personalized gateway to campus life, events, news and more.", + textAlign: TextAlign.center, + style: const TextStyle( + fontFamily: 'Brix Sans', + fontWeight: FontWeight.w400, + fontSize: 18, + letterSpacing: 2.2, + height: 1.2778, // line height: ~26px + color: const Color(0xFF182B49), // Foreground body color + ), ), - const SizedBox(height: 12.5), + ), + ), + const SizedBox(height: 35.0), + + // UCSD Email Input + _buildEmailField(), + const SizedBox(height: 18.5), - // Description Text - const Flexible( - flex: 0, - child: const FractionallySizedBox( - widthFactor: 0.64722222, + // Password Input + _buildPasswordField(), + const SizedBox(height: 20.0), + + // SIGN IN and Forgot Password? + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: EdgeInsets.only(left: MediaQuery.of(context).size.width * ((1 - 0.74444444) / 2) + 6), + child: ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: const Color(0xFFFFCD00), // Yellow Button + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + elevation: 0.0, + fixedSize: () { + // calculate width using scaling ratio, then calculate height from width using aspect ratio + final width = _screenWidth * 0.24111111; + final height = width / 2.29268293; + return Size(width, height); + }(), + ), + child: Semantics( + button: true, + hint: 'press to login with your information inputted in above textfields', child: const Text( - // TODO: the font here seems a bit light. Might need to swap that out later - December 2025 - "Your personalized gateway to campus life, events, news and more.", - textAlign: TextAlign.center, + 'SIGN IN', style: const TextStyle( fontFamily: 'Brix Sans', - fontWeight: FontWeight.w400, - fontSize: 18, - letterSpacing: 2.2, - height: 1.2778, // line height: ~26px - color: const Color(0xFF182B49), // Foreground body color + fontSize: 18.0, + height: 1.195, + color: Colors.black, // Text color on button + fontWeight: FontWeight.bold, ), ), - )), - const SizedBox(height: 35.0), - - // UCSD Email Input - _buildEmailField(), - const SizedBox(height: 18.5), - - // Password Input - _buildPasswordField(), - const SizedBox(height: 20.0), - - // SIGN IN and Forgot Password? - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Padding( - padding: EdgeInsets.only(left: MediaQuery.of(context).size.width * ((1 - 0.74444444) / 2) + 6), - child: ElevatedButton( - style: ElevatedButton.styleFrom( - backgroundColor: const Color(0xFFFFCD00), // Yellow Button - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - elevation: 0.0, - fixedSize: () { - // calculate width using scaling ratio, then calculate height from width using aspect ratio - final width = _screenWidth * 0.24111111; - final height = width / 2.29268293; - return Size(width, height); - }(), - ), - child: Semantics( - button: true, - hint: 'press to login with your information inputted in above textfields', - child: const Text( - 'SIGN IN', - style: const TextStyle( - fontFamily: 'Brix Sans', - fontSize: 18.0, - height: 1.195, - color: Colors.black, // Text color on button - fontWeight: FontWeight.bold, - ), - ), - ), - onPressed: _userDataProvider.isLoading - ? null - : () { - _userDataProvider - .manualLogin(_emailTextFieldController.text, _passwordTextFieldController.text) - .then((isLoggedIn) async { + ), + onPressed: _userDataProvider.isLoading + ? null + : () { + _userDataProvider + .manualLogin(_emailTextFieldController.text, _passwordTextFieldController.text) + .then((isLoggedIn) async { if (isLoggedIn) { Navigator.pushNamedAndRemoveUntil(context, RoutePaths.ONBOARDING_INITIAL, (_) => false); } else { showAlertDialog(context); } }); - }, - ), - ), - - // the spacer in between sign in and forgot password - // SizedBox(width: _screenWidth * 0.202), + }, + ), + ), - Padding( - padding: EdgeInsets.only(right: MediaQuery.of(context).size.width * ((1 - 0.74444444) / 2) + 6), - child: GestureDetector( - child: Semantics( - hint: 'press to be redirected to the UCSD Password reset page', - child: const Text( - 'Forgot Password?', - style: const TextStyle( - color: const Color(0xFF00629B), - height: 1.42857143, - decoration: TextDecoration.underline, - fontSize: 18.0, - ), // Light Blue - ), - ), - onTap: () async { - try { - // TODO: Update link to redirect to password reset - December 2025 - String link = 'https://acms.ucsd.edu/students/accounts-and-passwords/index.html'; - await launchUrl(Uri.parse(link), mode: LaunchMode.inAppBrowserView); - } catch (e) { - // an error occurred, do nothing - } - }, + // the spacer in between sign in and forgot password + // SizedBox(width: _screenWidth * 0.202), + Padding( + padding: EdgeInsets.only(right: MediaQuery.of(context).size.width * ((1 - 0.74444444) / 2) + 6), + child: GestureDetector( + child: Semantics( + hint: 'press to be redirected to the UCSD Password reset page', + child: const Text( + 'Forgot Password?', + style: const TextStyle( + color: const Color(0xFF00629B), + height: 1.42857143, + decoration: TextDecoration.underline, + fontSize: 18.0, + ), // Light Blue ), ), - ], + onTap: () async { + try { + // TODO: Update link to redirect to password reset - December 2025 + String link = 'https://acms.ucsd.edu/students/accounts-and-passwords/index.html'; + await launchUrl(Uri.parse(link), mode: LaunchMode.inAppBrowserView); + } catch (e) { + // an error occurred, do nothing + } + }, + ), ), + ], + ), - ///////////////////////// Footer //////////////////////////// - const Spacer(flex: 2), + ///////////////////////// Footer //////////////////////////// + const Spacer(flex: 2), - // Not affiliated text - const Text( - "Not affiliated with UC San Diego?", - textAlign: TextAlign.center, - style: const TextStyle( - fontSize: 15.5, - height: 1.42, // line height: 20px - color: const Color(0xFF5D5E60), // Foreground body color - ), - ), - const SizedBox(height: 12.0), + // Not affiliated text + const Text( + "Not affiliated with UC San Diego?", + textAlign: TextAlign.center, + style: const TextStyle( + fontSize: 15.5, + height: 1.42, // line height: 20px + color: const Color(0xFF5D5E60), // Foreground body color + ), + ), + const SizedBox(height: 12.0), - // Skip This Step - GestureDetector( - child: Semantics( - hint: 'press to skip the login process and use this app as a visitor', - child: const Text( - "SKIP THIS STEP", - style: const TextStyle( - color: const Color(0xFF182B49), // Subheading color - fontFamily: 'Brix Sans', - fontWeight: FontWeight.w700, - fontSize: 16.5, - height: 1.195, // line height: 16.73px - decoration: TextDecoration.underline, - ), - ), + // Skip This Step + GestureDetector( + child: Semantics( + hint: 'press to skip the login process and use this app as a visitor', + child: const Text( + "SKIP THIS STEP", + style: const TextStyle( + color: const Color(0xFF182B49), // Subheading color + fontFamily: 'Brix Sans', + fontWeight: FontWeight.w700, + fontSize: 16.5, + height: 1.195, // line height: 16.73px + decoration: TextDecoration.underline, ), - onTap: () async { - Navigator.pushNamedAndRemoveUntil(context, RoutePaths.ONBOARDING_INITIAL, (_) => false); - }, ), - - const Spacer() - ], + ), + onTap: () async { + Navigator.pushNamedAndRemoveUntil(context, RoutePaths.ONBOARDING_INITIAL, (_) => false); + }, ), - ); + + const Spacer(), + ], + ), + ); // TODO: change the font for the password field (it's a lighter gray than what is currently there) - December 2025 - static Widget _buildInputField(InputDecoration decoration, TextEditingController controller, - {TextInputType? keyboardType, bool obscureText = false}) => - Padding( - padding: const EdgeInsets.symmetric(horizontal: 10.0), - child: Container( - decoration: const BoxDecoration(color: Colors.white, boxShadow: const [ - const BoxShadow(color: Colors.black26, blurRadius: 5, spreadRadius: 2.0, offset: const Offset(2.0, 2.0)), - ]), - child: FractionallySizedBox( - widthFactor: 0.74444444, - child: TextField( - style: const TextStyle( - fontFamily: 'Brix Sans', - textBaseline: TextBaseline.alphabetic, - color: const Color(0xFF182B49), // Fixed color format with full opacity - fontWeight: FontWeight.w400, - fontSize: 18.0, - height: 1.277, // line height: 23px - letterSpacing: 1.2), - decoration: decoration, - keyboardType: keyboardType, - controller: controller, - obscureText: obscureText, - ))), - ); + static Widget _buildInputField( + InputDecoration decoration, + TextEditingController controller, { + TextInputType? keyboardType, + bool obscureText = false, + }) => Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Container( + decoration: const BoxDecoration( + color: Colors.white, + boxShadow: const [ + const BoxShadow(color: Colors.black26, blurRadius: 5, spreadRadius: 2.0, offset: const Offset(2.0, 2.0)), + ], + ), + child: FractionallySizedBox( + widthFactor: 0.74444444, + child: TextField( + style: const TextStyle( + fontFamily: 'Brix Sans', + textBaseline: TextBaseline.alphabetic, + color: const Color(0xFF182B49), // Fixed color format with full opacity + fontWeight: FontWeight.w400, + fontSize: 18.0, + height: 1.277, // line height: 23px + letterSpacing: 1.2, + ), + decoration: decoration, + keyboardType: keyboardType, + controller: controller, + obscureText: obscureText, + ), + ), + ), + ); Widget _buildEmailField() => _buildInputField( - const InputDecoration( - border: InputBorder.none, - hintText: 'UCSD Email', - // I'm leaving this here in case we want a black border - // focusedBorder: OutlineInputBorder( - // /*borderSide: BorderSide( - // color: Colors.black, - // ),*/ - // borderRadius: BorderRadius.all(Radius.circular(5)), - // ), - // enabledBorder: OutlineInputBorder( - // /*borderSide: BorderSide( - // color: Colors.black, - // ),*/ - // borderRadius: BorderRadius.all(Radius.circular(5)), - // ), - isDense: true, - contentPadding: const EdgeInsets.only(left: 10, top: 7.0, bottom: 7.0), - hintStyle: const TextStyle(color: Color(0xFF6A6B6D)), - ), - _emailTextFieldController, - keyboardType: TextInputType.emailAddress); + const InputDecoration( + border: InputBorder.none, + hintText: 'UCSD Email', + // I'm leaving this here in case we want a black border + // focusedBorder: OutlineInputBorder( + // /*borderSide: BorderSide( + // color: Colors.black, + // ),*/ + // borderRadius: BorderRadius.all(Radius.circular(5)), + // ), + // enabledBorder: OutlineInputBorder( + // /*borderSide: BorderSide( + // color: Colors.black, + // ),*/ + // borderRadius: BorderRadius.all(Radius.circular(5)), + // ), + isDense: true, + contentPadding: const EdgeInsets.only(left: 10, top: 7.0, bottom: 7.0), + hintStyle: const TextStyle(color: Color(0xFF6A6B6D)), + ), + _emailTextFieldController, + keyboardType: TextInputType.emailAddress, + ); Widget _buildPasswordField() => _buildInputField( - InputDecoration( - border: InputBorder.none, - hintText: 'Password', - suffixIconConstraints: const BoxConstraints(minWidth: 2, minHeight: 2), - suffixIcon: Semantics( - hint: 'press to toggle the visibility of your password field', - child: IconButton( - icon: Icon( - _passwordObscured ? Icons.visibility_off : Icons.visibility, - color: Theme.of(context).primaryColorDark, - ), - padding: const EdgeInsets.only(right: 10), // Remove padding - constraints: const BoxConstraints(), // Remove constraints - onPressed: _toggle, + InputDecoration( + border: InputBorder.none, + hintText: 'Password', + suffixIconConstraints: const BoxConstraints(minWidth: 2, minHeight: 2), + suffixIcon: Semantics( + hint: 'press to toggle the visibility of your password field', + child: IconButton( + icon: Icon( + _passwordObscured ? Icons.visibility_off : Icons.visibility, + color: Theme.of(context).primaryColorDark, ), + padding: const EdgeInsets.only(right: 10), // Remove padding + constraints: const BoxConstraints(), // Remove constraints + onPressed: _toggle, ), - isDense: true, - contentPadding: const EdgeInsets.only(left: 10, top: 7.0, bottom: 7.0), - hintStyle: const TextStyle(color: Color(0xFF6A6B6D)), ), - _passwordTextFieldController, - obscureText: _passwordObscured); + isDense: true, + contentPadding: const EdgeInsets.only(left: 10, top: 7.0, bottom: 7.0), + hintStyle: const TextStyle(color: Color(0xFF6A6B6D)), + ), + _passwordTextFieldController, + obscureText: _passwordObscured, + ); // Toggles the password show status void _toggle() { diff --git a/lib/ui/onboarding/onboarding_slide_template.dart b/lib/ui/onboarding/onboarding_slide_template.dart index 5bf61e73b..068539cbc 100644 --- a/lib/ui/onboarding/onboarding_slide_template.dart +++ b/lib/ui/onboarding/onboarding_slide_template.dart @@ -29,10 +29,7 @@ class OnboardingSlideTemplate extends StatelessWidget { height: height * .42, width: width * .9, decoration: BoxDecoration( - image: DecorationImage( - image: heroImage, - fit: BoxFit.fill, - ), + image: DecorationImage(image: heroImage, fit: BoxFit.fill), ), ), ), @@ -57,10 +54,7 @@ class OnboardingSlideTemplate extends StatelessWidget { // Description Text( description, - style: TextStyle( - color: const Color(0xFF182B49), - fontSize: 18, - ), + style: TextStyle(color: const Color(0xFF182B49), fontSize: 18), textAlign: TextAlign.left, ), ], diff --git a/lib/ui/onboarding/onboarding_slides.dart b/lib/ui/onboarding/onboarding_slides.dart index b6ac11bf8..7839e02e4 100644 --- a/lib/ui/onboarding/onboarding_slides.dart +++ b/lib/ui/onboarding/onboarding_slides.dart @@ -27,126 +27,120 @@ class _OnboardingSlidesState extends State with TickerProvider // Dot Indicator Widget buildDotIndicator() => DotsIndicator( - dotsCount: 5, - position: currentIndex.toDouble(), - decorator: const DotsDecorator( - activeColor: const Color(0xFF00619B), activeSize: const Size(16.0, 16.0) // Bigger active dot - ), - ); + dotsCount: 5, + position: currentIndex.toDouble(), + decorator: const DotsDecorator( + activeColor: const Color(0xFF00619B), + activeSize: const Size(16.0, 16.0), // Bigger active dot + ), + ); @override Widget build(BuildContext context) => Scaffold( - resizeToAvoidBottomInset: false, - backgroundColor: lightOnboardingScreen, - body: Stack( - alignment: Alignment.topCenter, + resizeToAvoidBottomInset: false, + backgroundColor: lightOnboardingScreen, + body: Stack( + alignment: Alignment.topCenter, + children: [ + // Background Image transitioning smoothly + PageView.builder( + controller: _backgroundPageController, + physics: const NeverScrollableScrollPhysics(), + itemCount: 5, + itemBuilder: (_, index) => Stack( + children: [ + Positioned( + left: -2.5, + right: -2.5, + top: 0, + bottom: 0, + child: Image.asset("assets/images/onboarding/slide-${index + 1}-background.jpg", fit: BoxFit.fitWidth), + ), + ], + ), + ), + Column( children: [ - // Background Image transitioning smoothly - PageView.builder( - controller: _backgroundPageController, - physics: const NeverScrollableScrollPhysics(), - itemCount: 5, - itemBuilder: (_, index) => Stack( - children: [ - Positioned( - left: -2.5, - right: -2.5, - top: 0, - bottom: 0, - child: Image.asset( - "assets/images/onboarding/slide-${index + 1}-background.jpg", - fit: BoxFit.fitWidth, - ), - ), - ], - )), - Column( - children: [ - const SizedBox(height: 110.0), - buildDotIndicator(), - Expanded( - child: PageView( - controller: _foregroundPageController, - onPageChanged: (int page) { - setState(() { - currentIndex = page; - }); - }, - children: [ - buildPage1(), - buildPage2(), - buildPage3(), - buildPage4(), - buildPage5(), - ], - ), - ), - buildGoToTheAppButton(), - const SizedBox(height: 80.0), - ], + const SizedBox(height: 110.0), + buildDotIndicator(), + Expanded( + child: PageView( + controller: _foregroundPageController, + onPageChanged: (int page) { + setState(() { + currentIndex = page; + }); + }, + children: [buildPage1(), buildPage2(), buildPage3(), buildPage4(), buildPage5()], + ), ), + buildGoToTheAppButton(), + const SizedBox(height: 80.0), ], ), - ); + ], + ), + ); Widget buildPage1() => OnboardingSlideTemplate( - width: _screenWidth, - height: _screenHeight, - heroImage: const AssetImage('assets/images/onboarding/hero-1-campus-life.png'), - heading: "ONE-STOP ACCESS\nTO CAMPUS LIFE. ", - description: "Keep up to date with amazing events and stay connected to campus news.", - ); + width: _screenWidth, + height: _screenHeight, + heroImage: const AssetImage('assets/images/onboarding/hero-1-campus-life.png'), + heading: "ONE-STOP ACCESS\nTO CAMPUS LIFE. ", + description: "Keep up to date with amazing events and stay connected to campus news.", + ); Widget buildPage2() => OnboardingSlideTemplate( - width: _screenWidth, - height: _screenHeight, - heroImage: const AssetImage('assets/images/onboarding/hero-2-schedule.png'), - heading: "YOUR SCHEDULE\nON THE GO. ", - description: "View your classes and finals schedule whenever you need.", - ); + width: _screenWidth, + height: _screenHeight, + heroImage: const AssetImage('assets/images/onboarding/hero-2-schedule.png'), + heading: "YOUR SCHEDULE\nON THE GO. ", + description: "View your classes and finals schedule whenever you need.", + ); Widget buildPage3() => OnboardingSlideTemplate( - width: _screenWidth, - height: _screenHeight, - heroImage: const AssetImage('assets/images/onboarding/hero-3-parking.png'), - heading: "PARKING\nMADE EASIER. ", - description: "Keep an eye on parking lot capacity to plan your day.", - ); + width: _screenWidth, + height: _screenHeight, + heroImage: const AssetImage('assets/images/onboarding/hero-3-parking.png'), + heading: "PARKING\nMADE EASIER. ", + description: "Keep an eye on parking lot capacity to plan your day.", + ); Widget buildPage4() => OnboardingSlideTemplate( - width: _screenWidth, - height: _screenHeight, - heroImage: const AssetImage('assets/images/onboarding/hero-4-busyness.png'), - heading: "SPEND LESS\nTIME WAITING. ", - description: "Easily see how busy campus locations are before you arrive.", - ); + width: _screenWidth, + height: _screenHeight, + heroImage: const AssetImage('assets/images/onboarding/hero-4-busyness.png'), + heading: "SPEND LESS\nTIME WAITING. ", + description: "Easily see how busy campus locations are before you arrive.", + ); Widget buildPage5() => OnboardingSlideTemplate( - width: _screenWidth, - height: _screenHeight, - heroImage: const AssetImage('assets/images/onboarding/hero-5-notifications.png'), - heading: "YOU'RE ALL SET. ", - description: "We recommend turning on push notifications to receive campus and safety alerts.", - ); + width: _screenWidth, + height: _screenHeight, + heroImage: const AssetImage('assets/images/onboarding/hero-5-notifications.png'), + heading: "YOU'RE ALL SET. ", + description: "We recommend turning on push notifications to receive campus and safety alerts.", + ); Widget buildGoToTheAppButton() => GestureDetector( - child: Semantics( - hint: 'press to skip the login process and use this app as a visitor', - child: const Text( - "GO TO THE APP", - style: const TextStyle( - color: const Color(0xFF182B49), // Subheading color - fontWeight: FontWeight.w700, - fontSize: 16.5, - height: 1.195, // line height: 16.73px - decoration: TextDecoration.underline, - decorationColor: Color(0xFF00629B)), - ), + child: Semantics( + hint: 'press to skip the login process and use this app as a visitor', + child: const Text( + "GO TO THE APP", + style: const TextStyle( + color: const Color(0xFF182B49), // Subheading color + fontWeight: FontWeight.w700, + fontSize: 16.5, + height: 1.195, // line height: 16.73px + decoration: TextDecoration.underline, + decorationColor: Color(0xFF00629B), ), - onTap: () async { - Navigator.pushNamedAndRemoveUntil(context, RoutePaths.BOTTOM_NAVIGATION_BAR, (_) => false); - final prefs = await SharedPreferences.getInstance(); - prefs.setBool('showOnboardingScreen', false); - }, - ); + ), + ), + onTap: () async { + Navigator.pushNamedAndRemoveUntil(context, RoutePaths.BOTTOM_NAVIGATION_BAR, (_) => false); + final prefs = await SharedPreferences.getInstance(); + prefs.setBool('showOnboardingScreen', false); + }, + ); } diff --git a/lib/ui/parking/circular_parking_indicator.dart b/lib/ui/parking/circular_parking_indicator.dart index 8296c543f..d3001d352 100644 --- a/lib/ui/parking/circular_parking_indicator.dart +++ b/lib/ui/parking/circular_parking_indicator.dart @@ -7,10 +7,7 @@ import 'package:provider/provider.dart'; import 'package:campus_mobile_experimental/app_constants.dart'; class CircularParkingIndicators extends StatelessWidget { - const CircularParkingIndicators({ - Key? key, - required this.model, - }) : super(key: key); + const CircularParkingIndicators({Key? key, required this.model}) : super(key: key); /// MODELS final ParkingModel model; @@ -38,14 +35,16 @@ class CircularParkingIndicators extends StatelessWidget { if (hasValue && hasSpaceForMore) selectedSpots.add(key); }); for (String spot in selectedSpots) { - listOfCircularParkingInfo.add(buildCircularParkingInfo( - Provider.of(context).spotTypeMap[spot], model.availability[spot], context)); + listOfCircularParkingInfo.add( + buildCircularParkingInfo( + Provider.of(context).spotTypeMap[spot], + model.availability[spot], + context, + ), + ); } return Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: listOfCircularParkingInfo, - ), + child: Row(mainAxisAlignment: MainAxisAlignment.start, children: listOfCircularParkingInfo), ); } @@ -66,121 +65,127 @@ class CircularParkingIndicators extends StatelessWidget { return locationData != null ? Expanded( child: Semantics( - label: - 'For ${spotType?.name ?? "Unknown"} parking spots, ${((open / total).isNaN ? "Not applicable" : ((open / total) * 100).round().toString() + "% available")}', - excludeSemantics: true, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: Stack( - alignment: Alignment.center, - children: [ - Center( - child: SizedBox( - height: 90, - width: 90, - child: CircularPercentIndicator( - radius: 45, - animation: true, - animationDuration: 1000, - lineWidth: 9, - percent: (open / total).isNaN ? 0.0 : open / total, - center: Text( - (open / total).isNaN ? "N/A" : ((open / total) * 100).round().toString() + "%", - style: Theme.of(context).textTheme.titleMedium, + label: + 'For ${spotType?.name ?? "Unknown"} parking spots, ${((open / total).isNaN ? "Not applicable" : ((open / total) * 100).round().toString() + "% available")}', + excludeSemantics: true, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: Stack( + alignment: Alignment.center, + children: [ + Center( + child: SizedBox( + height: 90, + width: 90, + child: CircularPercentIndicator( + radius: 45, + animation: true, + animationDuration: 1000, + lineWidth: 9, + percent: (open / total).isNaN ? 0.0 : open / total, + center: Text( + (open / total).isNaN ? "N/A" : ((open / total) * 100).round().toString() + "%", + style: Theme.of(context).textTheme.titleMedium, + ), + circularStrokeCap: CircularStrokeCap.round, + backgroundColor: colorFromHex('#EDECEC'), + progressColor: getColor(open / total), ), - circularStrokeCap: CircularStrokeCap.round, - backgroundColor: colorFromHex('#EDECEC'), - progressColor: getColor(open / total), ), ), - ), - ], + ], + ), ), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: spotType != null - ? CircleAvatar( - backgroundColor: colorFromHex(spotType.logoBackgroundColor), - child: spotType.logoText.startsWith('icon - ') - ? Icon(ParkingConstants.STRING_TO_ICON_DATA[spotType.logoText] ?? Icons.error, - size: 25.0, color: colorFromHex(spotType.logoTextColor)) - : (spotType.logoText.isNotEmpty - ? Text( - spotType.logoText, - style: TextStyle( - color: colorFromHex(spotType.logoTextColor), - fontFamily: 'Brix Sans', - fontSize: 28, - fontWeight: FontWeight.w700, - ), - ) - : SizedBox.shrink())) - : Container(), - ) - ], - ), - ) // close Semantics - ) // close Expanded + Padding( + padding: const EdgeInsets.all(8.0), + child: spotType != null + ? CircleAvatar( + backgroundColor: colorFromHex(spotType.logoBackgroundColor), + child: spotType.logoText.startsWith('icon - ') + ? Icon( + ParkingConstants.STRING_TO_ICON_DATA[spotType.logoText] ?? Icons.error, + size: 25.0, + color: colorFromHex(spotType.logoTextColor), + ) + : (spotType.logoText.isNotEmpty + ? Text( + spotType.logoText, + style: TextStyle( + color: colorFromHex(spotType.logoTextColor), + fontFamily: 'Brix Sans', + fontSize: 28, + fontWeight: FontWeight.w700, + ), + ) + : SizedBox.shrink()), + ) + : Container(), + ), + ], + ), + ), // close Semantics + ) // close Expanded : Expanded( child: Semantics( - label: 'For ${spotType?.name ?? "Unknown"} parking, Not applicable', - excludeSemantics: true, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: Stack( - alignment: Alignment.center, - children: [ - Center( - child: SizedBox( - height: 90, - width: 90, - child: CircularPercentIndicator( - radius: 45, - animation: false, - lineWidth: 9, - percent: 0.0, - center: Text( - "N/A", - style: Theme.of(context).textTheme.titleMedium, + label: 'For ${spotType?.name ?? "Unknown"} parking, Not applicable', + excludeSemantics: true, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: Stack( + alignment: Alignment.center, + children: [ + Center( + child: SizedBox( + height: 90, + width: 90, + child: CircularPercentIndicator( + radius: 45, + animation: false, + lineWidth: 9, + percent: 0.0, + center: Text("N/A", style: Theme.of(context).textTheme.titleMedium), + backgroundColor: colorFromHex('#EDECEC'), ), - backgroundColor: colorFromHex('#EDECEC'), ), ), - ), - ], + ], + ), ), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: spotType != null - ? CircleAvatar( - backgroundColor: colorFromHex(spotType.logoBackgroundColor), - child: spotType.logoText.startsWith('icon - ') - ? Icon(ParkingConstants.STRING_TO_ICON_DATA[spotType.logoText] ?? Icons.error, - size: 25.0, color: colorFromHex(spotType.logoTextColor)) - : (spotType.logoText.isNotEmpty - ? Text( - spotType.logoText, - style: TextStyle( - color: colorFromHex(spotType.logoTextColor), - fontFamily: 'Brix Sans', - fontWeight: FontWeight.w700, - fontSize: 28, - ), - ) - : SizedBox.shrink())) - : Container(), - ) - ], + Padding( + padding: const EdgeInsets.all(8.0), + child: spotType != null + ? CircleAvatar( + backgroundColor: colorFromHex(spotType.logoBackgroundColor), + child: spotType.logoText.startsWith('icon - ') + ? Icon( + ParkingConstants.STRING_TO_ICON_DATA[spotType.logoText] ?? Icons.error, + size: 25.0, + color: colorFromHex(spotType.logoTextColor), + ) + : (spotType.logoText.isNotEmpty + ? Text( + spotType.logoText, + style: TextStyle( + color: colorFromHex(spotType.logoTextColor), + fontFamily: 'Brix Sans', + fontWeight: FontWeight.w700, + fontSize: 28, + ), + ) + : SizedBox.shrink()), + ) + : Container(), + ), + ], + ), ), - )); + ); } static Color getColor(double value) { @@ -195,9 +200,7 @@ class CircularParkingIndicators extends StatelessWidget { excludeSemantics: true, child: Text( model.locationName.toUpperCase(), - style: Theme.of(context).textTheme.titleMedium?.copyWith( - fontWeight: FontWeight.normal, - ), + style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.normal), ), ); } @@ -214,21 +217,19 @@ class CircularParkingIndicators extends StatelessWidget { } Widget buildSpotsAvailableText(BuildContext context) { - final openSpots = - Provider.of(context).getApproxNumOfOpenSpots(model.locationName)["Open"].toString(); - final totalSpots = - Provider.of(context).getApproxNumOfOpenSpots(model.locationName)["Total"].toString(); + final openSpots = Provider.of( + context, + ).getApproxNumOfOpenSpots(model.locationName)["Open"].toString(); + final totalSpots = Provider.of( + context, + ).getApproxNumOfOpenSpots(model.locationName)["Total"].toString(); final visualText = "~$openSpots of $totalSpots Spots Available"; final semanticText = "Approximately $openSpots of $totalSpots Spots Available"; return Padding( padding: const EdgeInsets.only(top: 8.0), child: Center( - child: Text( - visualText, - semanticsLabel: semanticText, - style: Theme.of(context).textTheme.bodyMedium, - ), + child: Text(visualText, semanticsLabel: semanticText, style: Theme.of(context).textTheme.bodyMedium), ), ); } @@ -240,17 +241,12 @@ class CircularParkingIndicators extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Icon( - Icons.error_outline, - color: Colors.black, - ), - SizedBox( - width: 4, + Icon(Icons.error_outline, color: Colors.black), + SizedBox(width: 4), + Text( + "No Live Data. Estimated availability shown.", + style: Theme.of(context).textTheme.bodyMedium?.copyWith(fontSize: 16), ), - Text("No Live Data. Estimated availability shown.", - style: Theme.of(context).textTheme.bodyMedium?.copyWith( - fontSize: 16, - )) ], ), ); diff --git a/lib/ui/parking/manage_parking_view.dart b/lib/ui/parking/manage_parking_view.dart index 715d115a3..7d23843e3 100644 --- a/lib/ui/parking/manage_parking_view.dart +++ b/lib/ui/parking/manage_parking_view.dart @@ -11,30 +11,18 @@ class ManageParkingView extends StatefulWidget { class _ManageParkingViewState extends State { @override Widget build(BuildContext context) { - return ContainerView( - child: buildLocationsList(context), - ); + return ContainerView(child: buildLocationsList(context)); } Widget buildLocationsList(BuildContext context) { - const List parkingType = [ - "Neighborhoods", - "Parking Structures", - ]; + const List parkingType = ["Neighborhoods", "Parking Structures"]; List listTiles = []; for (int i = 0; i < parkingType.length; i++) { listTiles.add( ListTile( - title: Text( - parkingType[i], - style: Theme.of(context).textTheme.bodyMedium, - ), - trailing: Icon( - Icons.arrow_forward_ios, - color: dotsSelectedColorLight, - size: 18.0, - ), + title: Text(parkingType[i], style: Theme.of(context).textTheme.bodyMedium), + trailing: Icon(Icons.arrow_forward_ios, color: dotsSelectedColorLight, size: 18.0), onTap: () { if (i == 0) { Navigator.pushNamed(context, RoutePaths.NEIGHBORHOODS_VIEW); @@ -64,7 +52,7 @@ class _ManageParkingViewState extends State { height: 0, ), ), - ] + ], ], ), ); diff --git a/lib/ui/parking/neighborhood_lot_view.dart b/lib/ui/parking/neighborhood_lot_view.dart index 130af0111..8b3129176 100644 --- a/lib/ui/parking/neighborhood_lot_view.dart +++ b/lib/ui/parking/neighborhood_lot_view.dart @@ -52,10 +52,7 @@ class _NeighborhoodLotsViewState extends State { ListTile( title: Padding( padding: const EdgeInsets.fromLTRB(8, 0, 0, 0), - child: Text( - lotName, - style: Theme.of(context).textTheme.bodyMedium, - ), + child: Text(lotName, style: Theme.of(context).textTheme.bodyMedium), ), trailing: Transform.scale( scale: 0.9, diff --git a/lib/ui/parking/neighborhoods_view.dart b/lib/ui/parking/neighborhoods_view.dart index 56c84e923..7c461d433 100644 --- a/lib/ui/parking/neighborhoods_view.dart +++ b/lib/ui/parking/neighborhoods_view.dart @@ -13,9 +13,7 @@ class NeighborhoodsView extends StatefulWidget { class _NeighborhoodsViewState extends State { @override Widget build(BuildContext context) { - return ContainerView( - child: buildNeighborhoodsList(context), - ); + return ContainerView(child: buildNeighborhoodsList(context)); } Widget buildNeighborhoodsList(BuildContext context) { @@ -36,21 +34,10 @@ class _NeighborhoodsViewState extends State { if (key.isNotEmpty) { listTiles.add( ListTile( - title: Text( - key, - style: Theme.of(context).textTheme.bodyMedium, - ), - trailing: Icon( - Icons.arrow_forward_ios, - color: dotsSelectedColorLight, - size: 18.0, - ), + title: Text(key, style: Theme.of(context).textTheme.bodyMedium), + trailing: Icon(Icons.arrow_forward_ios, color: dotsSelectedColorLight, size: 18.0), onTap: () { - Navigator.pushNamed( - context, - RoutePaths.NEIGHBORHOODS_LOTS_VIEW, - arguments: value, - ); + Navigator.pushNamed(context, RoutePaths.NEIGHBORHOODS_LOTS_VIEW, arguments: value); }, ), ); diff --git a/lib/ui/parking/parking_card.dart b/lib/ui/parking/parking_card.dart index bdd40e611..2e38a9089 100644 --- a/lib/ui/parking/parking_card.dart +++ b/lib/ui/parking/parking_card.dart @@ -46,21 +46,23 @@ class _ParkingCardState extends State { hide: () => Provider.of(context, listen: false).toggleCard(CARD_ID), actionButtons: [ ActionButton( - buttonText: 'MANAGE SPOTS', - onPressed: () { - analytics.logEvent(name: '${CARD_ID}_card_action', parameters: {'action': 'manage_spots'}); - final bool isNotLoading = !_parkingDataProvider.isLoading; - final bool hasNoError = _parkingDataProvider.error == null; - if (isNotLoading && hasNoError) Navigator.pushNamed(context, RoutePaths.SPOT_TYPES_VIEW); - }), + buttonText: 'MANAGE SPOTS', + onPressed: () { + analytics.logEvent(name: '${CARD_ID}_card_action', parameters: {'action': 'manage_spots'}); + final bool isNotLoading = !_parkingDataProvider.isLoading; + final bool hasNoError = _parkingDataProvider.error == null; + if (isNotLoading && hasNoError) Navigator.pushNamed(context, RoutePaths.SPOT_TYPES_VIEW); + }, + ), ActionLink( - buttonText: 'MANAGE LOTS', - onPressed: () { - analytics.logEvent(name: '${CARD_ID}_card_action', parameters: {'action': 'manage_lots'}); - final bool isNotLoading = !_parkingDataProvider.isLoading; - final bool hasNoError = _parkingDataProvider.error == null; - if (isNotLoading && hasNoError) Navigator.pushNamed(context, RoutePaths.MANAGE_PARKING_VIEW); - }), + buttonText: 'MANAGE LOTS', + onPressed: () { + analytics.logEvent(name: '${CARD_ID}_card_action', parameters: {'action': 'manage_lots'}); + final bool isNotLoading = !_parkingDataProvider.isLoading; + final bool hasNoError = _parkingDataProvider.error == null; + if (isNotLoading && hasNoError) Navigator.pushNamed(context, RoutePaths.MANAGE_PARKING_VIEW); + }, + ), ], ); } @@ -78,16 +80,10 @@ class _ParkingCardState extends State { crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ - Text( - "No Lots to Display", - style: TextStyle(fontSize: 24), - ), + Text("No Lots to Display", style: TextStyle(fontSize: 24)), Padding( padding: const EdgeInsets.only(top: 5), - child: Text( - "Add a Lot via 'Manage Lots'", - style: TextStyle(fontSize: 14), - ), + child: Text("Add a Lot via 'Manage Lots'", style: TextStyle(fontSize: 14)), ), ], )); @@ -115,8 +111,9 @@ class _ParkingCardState extends State { dotsCount: selectedLotsViews.length, decorator: DotsDecorator( color: dotsUnselectedColor, - activeColor: - Theme.of(context).brightness == Brightness.dark ? dotsSelectedColorDark : dotsSelectedColorLight, + activeColor: Theme.of(context).brightness == Brightness.dark + ? dotsSelectedColorDark + : dotsSelectedColorLight, activeSize: const Size(22.0, 22.0), size: const Size(10.0, 10.0), ), @@ -127,11 +124,7 @@ class _ParkingCardState extends State { print(e); return Container( width: double.infinity, - child: Center( - child: Container( - child: Text('An error occurred, please try again.'), - ), - ), + child: Center(child: Container(child: Text('An error occurred, please try again.'))), ); } } diff --git a/lib/ui/parking/parking_structure_view.dart b/lib/ui/parking/parking_structure_view.dart index be6ffd185..e2d9aecdd 100644 --- a/lib/ui/parking/parking_structure_view.dart +++ b/lib/ui/parking/parking_structure_view.dart @@ -31,8 +31,10 @@ class _ParkingStructureViewState extends State { contentPadding: const EdgeInsets.symmetric(horizontal: 16.0), title: Padding( padding: const EdgeInsets.fromLTRB(0, 0, 0, 0), - child: Text("Parking Structures", - style: Theme.of(context).brightness == Brightness.dark ? textSubheaderDark : textSubheaderLight), + child: Text( + "Parking Structures", + style: Theme.of(context).brightness == Brightness.dark ? textSubheaderDark : textSubheaderLight, + ), ), ), ); @@ -49,10 +51,7 @@ class _ParkingStructureViewState extends State { contentPadding: const EdgeInsets.symmetric(horizontal: 16.0), title: Padding( padding: const EdgeInsets.fromLTRB(0, 0, 0, 0), - child: Text( - structureName, - style: Theme.of(context).textTheme.bodyMedium, - ), + child: Text(structureName, style: Theme.of(context).textTheme.bodyMedium), ), trailing: Transform.scale( scale: 0.9, @@ -104,7 +103,7 @@ class _ParkingStructureViewState extends State { height: 0, ), ), - ] + ], ], ); } diff --git a/lib/ui/parking/spot_types_view.dart b/lib/ui/parking/spot_types_view.dart index e9eac53c9..4e2c5bb0f 100644 --- a/lib/ui/parking/spot_types_view.dart +++ b/lib/ui/parking/spot_types_view.dart @@ -24,30 +24,31 @@ class _SpotTypesViewState extends State { } Widget createListWidget(BuildContext context) => Padding( - padding: const EdgeInsets.symmetric(horizontal: 8.0), - child: ListView( - children: [ - for (int i = 0; i < createList(context).length; i++) ...[ - createList(context)[i], - if (i != createList(context).length - 1) - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: Divider( - color: Theme.of(context).brightness == Brightness.dark - ? listTileDividerColorDark - : listTileDividerColorLight, - thickness: 1, - height: 0, - ), - ), - ] - ], - ), - ); + padding: const EdgeInsets.symmetric(horizontal: 8.0), + child: ListView( + children: [ + for (int i = 0; i < createList(context).length; i++) ...[ + createList(context)[i], + if (i != createList(context).length - 1) + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: Divider( + color: Theme.of(context).brightness == Brightness.dark + ? listTileDividerColorDark + : listTileDividerColorLight, + thickness: 1, + height: 0, + ), + ), + ], + ], + ), + ); List createList(BuildContext context) { - var selectedSpots = - Provider.of(context).spotTypesState.values.where((selected) => selected == true).length; + var selectedSpots = Provider.of( + context, + ).spotTypesState.values.where((selected) => selected == true).length; List list = []; @@ -61,32 +62,31 @@ class _SpotTypesViewState extends State { ListTile( key: Key(data.name.toString()), leading: Container( - width: 35, - height: 35, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: iconColor, - ), - child: Align( - alignment: Alignment.center, - child: data.logoText.startsWith('icon - ') - ? Icon(ParkingConstants.STRING_TO_ICON_DATA[data.logoText] ?? Icons.error, - size: 25.0, color: textColor) - : (data.logoText.isNotEmpty - ? Text( - data.logoText, - style: TextStyle( - color: textColor, - fontFamily: 'Brix Sans', - fontWeight: FontWeight.w700, - fontSize: data.logoText.length > 1 ? 18 : 28, - ), - ) - : SizedBox.shrink()))), - title: Text( - data.name, - style: Theme.of(context).textTheme.bodyMedium, + width: 35, + height: 35, + decoration: BoxDecoration(shape: BoxShape.circle, color: iconColor), + child: Align( + alignment: Alignment.center, + child: data.logoText.startsWith('icon - ') + ? Icon( + ParkingConstants.STRING_TO_ICON_DATA[data.logoText] ?? Icons.error, + size: 25.0, + color: textColor, + ) + : (data.logoText.isNotEmpty + ? Text( + data.logoText, + style: TextStyle( + color: textColor, + fontFamily: 'Brix Sans', + fontWeight: FontWeight.w700, + fontSize: data.logoText.length > 1 ? 18 : 28, + ), + ) + : SizedBox.shrink()), + ), ), + title: Text(data.name, style: Theme.of(context).textTheme.bodyMedium), trailing: Transform.scale( scale: 0.9, child: CupertinoSwitch( diff --git a/lib/ui/profile/cards.dart b/lib/ui/profile/cards.dart index 5367439b3..230eb1d29 100644 --- a/lib/ui/profile/cards.dart +++ b/lib/ui/profile/cards.dart @@ -30,24 +30,24 @@ class _CardsViewState extends State { Widget buildCardsList() { bool isAccessibleNavigation = MediaQuery.of(context).accessibleNavigation; var tempView = ReorderableListView( - header: Padding( - padding: const EdgeInsets.only(top: 10), - child: Text( - isAccessibleNavigation - ? "Press up or down to reorder" - : "Hold and drag to reorder", - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.bodySmall), + header: Padding( + padding: const EdgeInsets.only(top: 10), + child: Text( + isAccessibleNavigation ? "Press up or down to reorder" : "Hold and drag to reorder", + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.bodySmall, ), - children: createList(context), - onReorderItem: (int oldIndex, int newIndex) { - var order = _cardsDataProvider.cardOrder; - order.insert(newIndex, order.removeAt(oldIndex)); - setState(() { - // Checks against stored user order in remote profile - _cardsDataProvider.updateCardOrder(isUserReorder: true); - }); + ), + children: createList(context), + onReorderItem: (int oldIndex, int newIndex) { + var order = _cardsDataProvider.cardOrder; + order.insert(newIndex, order.removeAt(oldIndex)); + setState(() { + // Checks against stored user order in remote profile + _cardsDataProvider.updateCardOrder(isUserReorder: true); }); + }, + ); return tempView; } @@ -139,8 +139,10 @@ class _CardsViewState extends State { ), ], ) - : Icon(Icons.drag_handle, - color: Theme.of(context).brightness == Brightness.dark ? linkTextColorDark : linkTextColorLight), + : Icon( + Icons.drag_handle, + color: Theme.of(context).brightness == Brightness.dark ? linkTextColorDark : linkTextColorLight, + ), title: Text(title, style: Theme.of(context).textTheme.bodyMedium), trailing: Transform.scale( scale: 0.9, // Adjust the scale as needed @@ -162,8 +164,12 @@ class _CardsViewState extends State { ); } catch (e) { FirebaseCrashlytics.instance.log('error getting $card in profile'); - FirebaseCrashlytics.instance.recordError(e, StackTrace.fromString(e.toString()), - reason: "Profile/Cards: Failed to load Cards page", fatal: false); + FirebaseCrashlytics.instance.recordError( + e, + StackTrace.fromString(e.toString()), + reason: "Profile/Cards: Failed to load Cards page", + fatal: false, + ); } } return list; diff --git a/lib/ui/profile/login.dart b/lib/ui/profile/login.dart index 97717d682..6c25ab25f 100644 --- a/lib/ui/profile/login.dart +++ b/lib/ui/profile/login.dart @@ -39,20 +39,24 @@ class _LoginState extends State { } return Container( - constraints: BoxConstraints(maxWidth: 100, maxHeight: 100), - child: Center(child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary))); + constraints: BoxConstraints(maxWidth: 100, maxHeight: 100), + child: Center(child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary)), + ); } Widget buildLoggedInWidget(BuildContext context) { return Container( padding: const EdgeInsets.fromLTRB(15.0, 15.0, 0, 0), - child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - 'LOGGED IN AS:', - style: Theme.of(context).brightness == Brightness.dark ? titleMediumDark : titleMediumLight, - ), - buildUserProfileTile(context), - ]), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'LOGGED IN AS:', + style: Theme.of(context).brightness == Brightness.dark ? titleMediumDark : titleMediumLight, + ), + buildUserProfileTile(context), + ], + ), ); } @@ -75,10 +79,7 @@ class _LoginState extends State { Widget buildUserProfileTile(BuildContext context) { return ListTile( - leading: Icon( - Icons.check_circle, - color: Colors.green, - ), + leading: Icon(Icons.check_circle, color: Colors.green), title: Transform.translate( offset: Offset(-24, 0), child: Text( @@ -89,13 +90,8 @@ class _LoginState extends State { ), ), trailing: TextButton( - style: TextButton.styleFrom( - foregroundColor: Theme.of(context).colorScheme.surface, - ), - child: Text( - 'LOG OUT', - style: TextStyle(decoration: TextDecoration.underline), - ), + style: TextButton.styleFrom(foregroundColor: Theme.of(context).colorScheme.surface), + child: Text('LOG OUT', style: TextStyle(decoration: TextDecoration.underline)), onPressed: () => executeLogout(), ), ); @@ -113,26 +109,19 @@ class _LoginState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - 'SINGLE SIGN-ON', - style: Theme.of(context).textTheme.titleMedium, - ), + Text('SINGLE SIGN-ON', style: Theme.of(context).textTheme.titleMedium), SizedBox(height: 10), TextField( style: TextStyle(fontFamily: 'Brix Sans', fontWeight: FontWeight.w400, color: const Color(0xFF737373)), decoration: InputDecoration( hintText: 'UCSD Email', - hintStyle: TextStyle( - color: Theme.of(context).colorScheme.secondary, - ), + hintStyle: TextStyle(color: Theme.of(context).colorScheme.secondary), border: OutlineInputBorder(), focusedBorder: new OutlineInputBorder( borderSide: new BorderSide(color: Theme.of(context).colorScheme.secondary), ), labelText: 'UCSD Email', - labelStyle: TextStyle( - color: ucLabelColor, - ), + labelStyle: TextStyle(color: ucLabelColor), ), keyboardType: TextInputType.emailAddress, controller: _emailTextFieldController, @@ -142,9 +131,7 @@ class _LoginState extends State { style: TextStyle(fontFamily: 'Brix Sans', fontWeight: FontWeight.w400, color: const Color(0xFF737373)), decoration: InputDecoration( hintText: 'Password', - hintStyle: TextStyle( - color: Theme.of(context).colorScheme.secondary, - ), + hintStyle: TextStyle(color: Theme.of(context).colorScheme.secondary), suffixIcon: IconButton( icon: Icon( // Based on passwordObscured state choose the icon @@ -160,9 +147,7 @@ class _LoginState extends State { borderSide: new BorderSide(color: Theme.of(context).colorScheme.secondary), ), labelText: 'Password', - labelStyle: TextStyle( - color: ucLabelColor, - ), + labelStyle: TextStyle(color: ucLabelColor), ), obscureText: _passwordObscured, controller: _passwordTextFieldController, @@ -174,16 +159,15 @@ class _LoginState extends State { child: SizedBox( height: 41, child: ElevatedButton( - style: ElevatedButton.styleFrom( - backgroundColor: actionButtonBackgroundColor, - ), + style: ElevatedButton.styleFrom(backgroundColor: actionButtonBackgroundColor), child: Text( 'Sign In', style: TextStyle( - fontFamily: 'Brix Sans', - fontSize: 17, - fontWeight: FontWeight.w700, - color: Theme.of(context).textTheme.labelLarge!.color), + fontFamily: 'Brix Sans', + fontSize: 17, + fontWeight: FontWeight.w700, + color: Theme.of(context).textTheme.labelLarge!.color, + ), ), onPressed: _userDataProvider.isLoading ? null @@ -191,23 +175,23 @@ class _LoginState extends State { _userDataProvider .manualLogin(_emailTextFieldController.text, _passwordTextFieldController.text) .then((isLoggedIn) { - if (!isLoggedIn) { - showDialog( - context: context, - builder: (context) { - return AlertDialogWidget( - type: MessageTypeConstants.ERROR, - icon: Icons.block_flipped, - title: LoginConstants.LOGIN_FAILED_TITLE, - description: LoginConstants.LOGIN_FAILED_DESC, - onClose: () { - Navigator.of(context).pop(); + if (!isLoggedIn) { + showDialog( + context: context, + builder: (context) { + return AlertDialogWidget( + type: MessageTypeConstants.ERROR, + icon: Icons.block_flipped, + title: LoginConstants.LOGIN_FAILED_TITLE, + description: LoginConstants.LOGIN_FAILED_DESC, + onClose: () { + Navigator.of(context).pop(); + }, + ); }, ); - }, - ); - } - }); + } + }); }, ), ), @@ -218,11 +202,12 @@ class _LoginState extends State { child: Text( 'Forgot password?', style: TextStyle( - fontFamily: 'Brix Sans', - fontWeight: FontWeight.w400, - fontSize: 17, - decoration: TextDecoration.underline, - color: Theme.of(context).textTheme.labelLarge!.color), + fontFamily: 'Brix Sans', + fontWeight: FontWeight.w400, + fontSize: 17, + decoration: TextDecoration.underline, + color: Theme.of(context).textTheme.labelLarge!.color, + ), textAlign: TextAlign.right, ), onTap: () async { @@ -263,8 +248,10 @@ class _LoginState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( - child: Icon(Icons.info_outline, - color: Theme.of(context).brightness == Brightness.dark ? linkTextColorDark : linkTextColorLight), + child: Icon( + Icons.info_outline, + color: Theme.of(context).brightness == Brightness.dark ? linkTextColorDark : linkTextColorLight, + ), flex: 1, ), Expanded( @@ -273,16 +260,26 @@ class _LoginState extends State { textAlign: TextAlign.left, style: Theme.of(context).brightness == Brightness.dark ? TextStyle( - color: linkTextColorDark, fontFamily: 'Brix Sans', fontWeight: FontWeight.w700, fontSize: 18.0) + color: linkTextColorDark, + fontFamily: 'Brix Sans', + fontWeight: FontWeight.w700, + fontSize: 18.0, + ) : TextStyle( - color: linkTextColorLight, fontFamily: 'Brix Sans', fontWeight: FontWeight.w700, fontSize: 18.0), + color: linkTextColorLight, + fontFamily: 'Brix Sans', + fontWeight: FontWeight.w700, + fontSize: 18.0, + ), ), flex: 7, ), Expanded( child: IconButton( - icon: Icon(Icons.close, - color: Theme.of(context).brightness == Brightness.dark ? linkTextColorDark : linkTextColorLight), + icon: Icon( + Icons.close, + color: Theme.of(context).brightness == Brightness.dark ? linkTextColorDark : linkTextColorLight, + ), alignment: Alignment.topRight, onPressed: () { Navigator.of(context).pop(); @@ -300,10 +297,7 @@ class _LoginState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded( - flex: 1, - child: Container(), - ), + Expanded(flex: 1, child: Container()), Expanded( flex: 6, child: Column( @@ -313,18 +307,16 @@ class _LoginState extends State { LoginConstants.LOGIN_FAILED_DESC, textAlign: TextAlign.left, style: TextStyle( - color: linkTextColorLight, - fontFamily: 'Source Sans Pro', - fontWeight: FontWeight.w400, - fontSize: 12.0), + color: linkTextColorLight, + fontFamily: 'Source Sans Pro', + fontWeight: FontWeight.w400, + fontSize: 12.0, + ), ), ], ), ), - Expanded( - flex: 1, - child: Container(), - ), + Expanded(flex: 1, child: Container()), ], ), ), diff --git a/lib/ui/profile/profile.dart b/lib/ui/profile/profile.dart index 447709692..880bf6b92 100644 --- a/lib/ui/profile/profile.dart +++ b/lib/ui/profile/profile.dart @@ -92,10 +92,7 @@ class Profile extends StatelessWidget { ), child: Padding( padding: const EdgeInsets.all(1.0), // Adjust the padding as needed - child: Icon( - Icons.question_mark, - color: Theme.of(context).iconTheme.color, - ), + child: Icon(Icons.question_mark, color: Theme.of(context).iconTheme.color), ), ), title: Text( diff --git a/lib/ui/shuttle/add_shuttle_stops_view.dart b/lib/ui/shuttle/add_shuttle_stops_view.dart index cbf44ccb8..27b5ce9b0 100644 --- a/lib/ui/shuttle/add_shuttle_stops_view.dart +++ b/lib/ui/shuttle/add_shuttle_stops_view.dart @@ -21,25 +21,25 @@ class _AddShuttleStopsViewState extends State { _shuttleDataProvider = Provider.of(context); if (isAddingStop) { - return Stack(children: [ - ContainerView( + return Stack( + children: [ + ContainerView( child: Container( - width: double.infinity, - height: 200.0, - child: Center( - child: Container( - height: 32, - width: 32, - child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary)), + width: double.infinity, + height: 200.0, + child: Center( + child: Container( + height: 32, + width: 32, + child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary), + ), + ), + ), ), - )), - ]); + ], + ); } else { - return Stack(children: [ - ContainerView( - child: buildAllLocationsList(context), - ), - ]); + return Stack(children: [ContainerView(child: buildAllLocationsList(context))]); } } @@ -50,20 +50,20 @@ class _AddShuttleStopsViewState extends State { _shuttleDataProvider.stopsNotSelected.forEach((key, value) { ShuttleStopModel model = value; - list.add(ListTile( - key: Key(model.id.toString()), - title: Text( - model.name, + list.add( + ListTile( + key: Key(model.id.toString()), + title: Text(model.name), + onTap: () async { + setState(() { + isAddingStop = true; + }); + await _shuttleDataProvider.addStop(model.id); + isAddingStop = false; + Navigator.pop(context); + }, ), - onTap: () async { - setState(() { - isAddingStop = true; - }); - await _shuttleDataProvider.addStop(model.id); - isAddingStop = false; - Navigator.pop(context); - }, - )); + ); }); return list; diff --git a/lib/ui/shuttle/manage_shuttle_view.dart b/lib/ui/shuttle/manage_shuttle_view.dart index 626784aaa..4f19a3f36 100644 --- a/lib/ui/shuttle/manage_shuttle_view.dart +++ b/lib/ui/shuttle/manage_shuttle_view.dart @@ -19,12 +19,12 @@ class _ManageShuttleViewState extends State { @override Widget build(BuildContext context) { _shuttleDataProvider = Provider.of(context); - return Stack(children: [ - ContainerView( - child: buildLocationsList(context), - ), - buildAddStopsButton(context), - ]); + return Stack( + children: [ + ContainerView(child: buildLocationsList(context)), + buildAddStopsButton(context), + ], + ); } Widget buildLocationsList(BuildContext context) { @@ -34,8 +34,11 @@ class _ManageShuttleViewState extends State { return ReorderableListView( header: Padding( padding: const EdgeInsets.only(top: 10), - child: Text("Hold and drag to reorder", - textAlign: TextAlign.center, style: Theme.of(context).textTheme.bodySmall), + child: Text( + "Hold and drag to reorder", + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.bodySmall, + ), ), children: createList(context), onReorderItem: _onReorder, @@ -62,21 +65,27 @@ class _ManageShuttleViewState extends State { List list = []; for (ShuttleStopModel? model in _shuttleDataProvider.stopsToRender) { if (model != null) { - list.add(Card( - key: Key(model.id.toString()), - elevation: 2.0, - margin: EdgeInsets.fromLTRB(cardMargin, 5, cardMargin, 5), - child: ListTile( + list.add( + Card( + key: Key(model.id.toString()), + elevation: 2.0, + margin: EdgeInsets.fromLTRB(cardMargin, 5, cardMargin, 5), + child: ListTile( title: Text(model.name, style: Theme.of(context).textTheme.bodyMedium), - leading: Icon(Icons.drag_handle, - color: Theme.of(context).brightness == Brightness.dark ? linkTextColorDark : linkTextColorLight), + leading: Icon( + Icons.drag_handle, + color: Theme.of(context).brightness == Brightness.dark ? linkTextColorDark : linkTextColorLight, + ), trailing: IconButton( - icon: Icon(Icons.close), - tooltip: 'Remove ${model.name}', - onPressed: () async { - await _shuttleDataProvider.removeStop(model.id); - })), - )); + icon: Icon(Icons.close), + tooltip: 'Remove ${model.name}', + onPressed: () async { + await _shuttleDataProvider.removeStop(model.id); + }, + ), + ), + ), + ); } } return list; @@ -96,18 +105,19 @@ class _ManageShuttleViewState extends State { Navigator.pushNamed(context, RoutePaths.ADD_SHUTTLE_STOPS_VIEW); } else { showDialog( - context: context, - builder: (context) { - return AlertDialogWidget( - type: MessageTypeConstants.ERROR, - icon: Icons.block_flipped, - title: LoginConstants.SHUTTLE_MAX_TITLE, - description: LoginConstants.SHUTTLE_MAX_DESC, - onClose: () { - Navigator.of(context).pop(); - }, - ); - }); + context: context, + builder: (context) { + return AlertDialogWidget( + type: MessageTypeConstants.ERROR, + icon: Icons.block_flipped, + title: LoginConstants.SHUTTLE_MAX_TITLE, + description: LoginConstants.SHUTTLE_MAX_DESC, + onClose: () { + Navigator.of(context).pop(); + }, + ); + }, + ); } }, ), @@ -150,10 +160,12 @@ class _ManageShuttleViewState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( - child: Icon(Icons.block, - color: Theme.of(context).brightness == Brightness.dark - ? systemErrorTextColorDark - : systemErrorTextColorLight), + child: Icon( + Icons.block, + color: Theme.of(context).brightness == Brightness.dark + ? systemErrorTextColorDark + : systemErrorTextColorLight, + ), flex: 1, ), Expanded( @@ -165,21 +177,25 @@ class _ManageShuttleViewState extends State { color: systemErrorTextColorDark, fontFamily: 'Brix Sans', fontWeight: FontWeight.w700, - fontSize: 18.0) + fontSize: 18.0, + ) : TextStyle( color: systemErrorTextColorLight, fontFamily: 'Brix Sans', fontWeight: FontWeight.w700, - fontSize: 18.0), + fontSize: 18.0, + ), ), flex: 6, ), Expanded( child: IconButton( - icon: Icon(Icons.close, - color: Theme.of(context).brightness == Brightness.dark - ? systemErrorTextColorDark - : systemErrorTextColorLight), + icon: Icon( + Icons.close, + color: Theme.of(context).brightness == Brightness.dark + ? systemErrorTextColorDark + : systemErrorTextColorLight, + ), alignment: Alignment.topRight, onPressed: () { Navigator.of(context).pop(); @@ -197,10 +213,7 @@ class _ManageShuttleViewState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Expanded( - flex: 1, - child: Container(), - ), + Expanded(flex: 1, child: Container()), Expanded( flex: 6, child: Column( @@ -214,20 +227,19 @@ class _ManageShuttleViewState extends State { color: systemErrorTextColorDark, fontFamily: 'Brix Sans', fontWeight: FontWeight.w400, - fontSize: 14.0) + fontSize: 14.0, + ) : TextStyle( color: systemErrorTextColorLight, fontFamily: 'Brix Sans', fontWeight: FontWeight.w400, - fontSize: 14.0), + fontSize: 14.0, + ), ), ], ), ), - Expanded( - flex: 1, - child: Container(), - ), + Expanded(flex: 1, child: Container()), ], ), ), diff --git a/lib/ui/shuttle/shuttle_card.dart b/lib/ui/shuttle/shuttle_card.dart index 67877b301..b71348511 100644 --- a/lib/ui/shuttle/shuttle_card.dart +++ b/lib/ui/shuttle/shuttle_card.dart @@ -59,14 +59,15 @@ class _ShuttleCardState extends State { const SizedBox(height: 16), ], ActionLink( - buttonText: 'MANAGE SHUTTLE STOPS', - onPressed: () { - analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'manage_stops'}); - setState(() { - _currentPage = 0; - }); - Navigator.pushNamed(context, RoutePaths.MANAGE_SHUTTLE_VIEW); - }), + buttonText: 'MANAGE SHUTTLE STOPS', + onPressed: () { + analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'manage_stops'}); + setState(() { + _currentPage = 0; + }); + Navigator.pushNamed(context, RoutePaths.MANAGE_SHUTTLE_VIEW); + }, + ), ]; return CardContainer( @@ -116,9 +117,12 @@ class _ShuttleCardState extends State { // Display all the shuttle stops with their respective arrivals for (var i = 0; i < _shuttleCardDataProvider.stopsToRender.length; i++) { - renderList.add(ShuttleDisplay( + renderList.add( + ShuttleDisplay( stop: _shuttleCardDataProvider.stopsToRender[i], - arrivingShuttles: arrivalsToRender[_shuttleCardDataProvider.stopsToRender[i].id])); + arrivingShuttles: arrivalsToRender[_shuttleCardDataProvider.stopsToRender[i].id], + ), + ); } return Column( children: [ @@ -139,20 +143,19 @@ class _ShuttleCardState extends State { dotsCount: renderList.length, decorator: DotsDecorator( color: dotsUnselectedColor, - activeColor: - Theme.of(context).brightness == Brightness.dark ? dotsSelectedColorDark : dotsSelectedColorLight, + activeColor: Theme.of(context).brightness == Brightness.dark + ? dotsSelectedColorDark + : dotsSelectedColorLight, activeSize: const Size(22.0, 22.0), size: const Size(10.0, 10.0), ), - ) + ), ], ); } catch (e) { return Container( width: double.infinity, - child: Center( - child: Text('An error occurred, please try again. ${e.toString()}'), - ), + child: Center(child: Text('An error occurred, please try again. ${e.toString()}')), ); } } diff --git a/lib/ui/shuttle/shuttle_display.dart b/lib/ui/shuttle/shuttle_display.dart index 72e789c80..f49a6c83e 100644 --- a/lib/ui/shuttle/shuttle_display.dart +++ b/lib/ui/shuttle/shuttle_display.dart @@ -21,7 +21,10 @@ class ShuttleDisplay extends StatelessWidget { height: 200.0, child: Center( child: Container( - height: 32, width: 32, child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary)), + height: 32, + width: 32, + child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary), + ), ), ); } else { @@ -58,22 +61,21 @@ class ShuttleDisplay extends StatelessWidget { ), child: CircleAvatar( minRadius: 40, - backgroundColor: - HexColor(arrivingShuttles!.isEmpty ? noArrivalsFoundColor : arrivingShuttles![0].routeColor), + backgroundColor: HexColor( + arrivingShuttles!.isEmpty ? noArrivalsFoundColor : arrivingShuttles![0].routeColor, + ), foregroundColor: Colors.black, child: Builder( builder: (context) { - Color circleColor = - HexColor(arrivingShuttles!.isEmpty ? noArrivalsFoundColor : arrivingShuttles![0].routeColor); + Color circleColor = HexColor( + arrivingShuttles!.isEmpty ? noArrivalsFoundColor : arrivingShuttles![0].routeColor, + ); // Calculate luminance to determine the color of "?" final double luminance = circleColor.computeLuminance(); final Color textColor = luminance > 0.5 ? Colors.black : Colors.white; return Text( arrivingShuttles!.isEmpty ? "?" : arrivingShuttles![0].routeName[0], - style: TextStyle( - fontSize: 50, - color: textColor, - ), + style: TextStyle(fontSize: 50, color: textColor), ); }, ), @@ -91,7 +93,7 @@ class ShuttleDisplay extends StatelessWidget { softWrap: true, // optional, default true ), ), - SizedBox(width: 16) + SizedBox(width: 16), ], ); } @@ -105,11 +107,12 @@ class ShuttleDisplay extends StatelessWidget { Text( "No arrivals found.", style: TextStyle( - fontSize: 23.0, - fontWeight: FontWeight.w700, - color: Theme.of(context).brightness == Brightness.light - ? descriptiveTextColorLight - : descriptiveTextColorDark), + fontSize: 23.0, + fontWeight: FontWeight.w700, + color: Theme.of(context).brightness == Brightness.light + ? descriptiveTextColorLight + : descriptiveTextColorDark, + ), ), ], ); @@ -153,7 +156,7 @@ class ShuttleDisplay extends StatelessWidget { ), buildTimeToArrivalText(context), ], - ) + ), ], ); } @@ -210,20 +213,12 @@ class ShuttleDisplay extends StatelessWidget { minRadius: 20, backgroundColor: circleColor, foregroundColor: textColor, - child: Text( - shuttle.routeName[0], - style: TextStyle(fontSize: 25), - ), + child: Text(shuttle.routeName[0], style: TextStyle(fontSize: 25)), ), ), Expanded( flex: 3, - child: Text( - shuttle.routeName, - style: TextStyle(fontSize: 16), - overflow: TextOverflow.ellipsis, - maxLines: 1, - ), + child: Text(shuttle.routeName, style: TextStyle(fontSize: 16), overflow: TextOverflow.ellipsis, maxLines: 1), ), Expanded(flex: 1, child: Container()), Padding( diff --git a/lib/ui/student_id/student_id_card.dart b/lib/ui/student_id/student_id_card.dart index 317ff5fcc..84e99f98d 100644 --- a/lib/ui/student_id/student_id_card.dart +++ b/lib/ui/student_id/student_id_card.dart @@ -20,46 +20,28 @@ class _StudentIdCardState extends State { static const CARD_ID = "student_id"; /// Pop up barcode - createAlertDialog( - BuildContext context, - Column image, - String cardNumber, - bool rotated, - ) { + createAlertDialog(BuildContext context, Column image, String cardNumber, bool rotated) { return showDialog( context: context, builder: (context) { return AlertDialog( backgroundColor: Colors.white, - title: Text( - "Student ID", - style: TextStyle(color: Colors.black), - ), - content: Container( - child: checkForRotation(image, context, cardNumber, rotated), - ), + title: Text("Student ID", style: TextStyle(color: Colors.black)), + content: Container(child: checkForRotation(image, context, cardNumber, rotated)), actions: [ TextButton( - child: Icon( - Icons.close, - color: Colors.black, - ), + child: Icon(Icons.close, color: Colors.black), onPressed: () { Navigator.of(context).pop(); }, - ) + ), ], ); }, ); } - Column checkForRotation( - Column image, - BuildContext context, - String cardNumber, - bool rotated, - ) { + Column checkForRotation(Column image, BuildContext context, String cardNumber, bool rotated) { if (MediaQuery.of(context).orientation == Orientation.landscape) return returnBarcodeContainer(cardNumber, rotated, context); return image; @@ -134,11 +116,8 @@ class _StudentIdCardState extends State { _buildCollegeName(profileModel), Column( crossAxisAlignment: CrossAxisAlignment.center, - children: [ - _buildBarcode(profileModel), - _buildBarcodeNumber(profileModel), - ], - ) + children: [_buildBarcode(profileModel), _buildBarcodeNumber(profileModel)], + ), ], ), ), @@ -170,11 +149,7 @@ class _StudentIdCardState extends State { } /// Determine barcode to display - Column returnBarcodeContainer( - String cardNumber, - bool rotated, - BuildContext context, - ) { + Column returnBarcodeContainer(String cardNumber, bool rotated, BuildContext context) { final barcodeWithText; /// Initialize sizing @@ -186,11 +161,7 @@ class _StudentIdCardState extends State { data: cardNumber, width: ScalingUtility.verticalSafeBlock * 45, height: 80, - style: TextStyle( - letterSpacing: ScalingUtility.verticalSafeBlock * 3, - color: Colors.white, - fontSize: 0, - ), + style: TextStyle(letterSpacing: ScalingUtility.verticalSafeBlock * 3, color: Colors.white, fontSize: 0), ); } else { barcodeWithText = BarcodeWidget( @@ -198,11 +169,7 @@ class _StudentIdCardState extends State { data: cardNumber, width: ScalingUtility.horizontalSafeBlock * 50, height: ScalingUtility.verticalSafeBlock * 4.45, - style: TextStyle( - letterSpacing: ScalingUtility.horizontalSafeBlock * 1.5, - fontSize: 0, - color: Colors.white, - ), + style: TextStyle(letterSpacing: ScalingUtility.horizontalSafeBlock * 1.5, fontSize: 0, color: Colors.white), ); } @@ -215,16 +182,11 @@ class _StudentIdCardState extends State { quarterTurns: 1, child: Row( children: [ - Padding( - padding: EdgeInsets.all(ScalingUtility.verticalSafeBlock * 7.5), - ), + Padding(padding: EdgeInsets.all(ScalingUtility.verticalSafeBlock * 7.5)), Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Container( - child: barcodeWithText, - color: Colors.white, - ), + Container(child: barcodeWithText, color: Colors.white), Text( cardNumber, style: TextStyle( @@ -232,7 +194,7 @@ class _StudentIdCardState extends State { fontSize: fontSizeForTablet(), letterSpacing: letterSpacingForTablet(), ), - ) + ), ], ), ], @@ -253,11 +215,7 @@ class _StudentIdCardState extends State { style: linkTextLight.copyWith(fontSize: 18.0), ), ), - Container( - padding: EdgeInsets.fromLTRB(0, 0, 10, 0), - color: Colors.white, - child: barcodeWithText, - ), + Container(padding: EdgeInsets.fromLTRB(0, 0, 10, 0), color: Colors.white, child: barcodeWithText), ], ); } @@ -427,91 +385,63 @@ class _StudentIdCardState extends State { // } Container _buildName(StudentIdNameModel nameModel) => Container( - padding: EdgeInsets.only( - right: ScalingUtility.horizontalSafeBlock * cardMargin, - ), - child: FittedBox( - child: Text( - '${nameModel.firstName} ${nameModel.lastName}', - style: TextStyle( - fontFamily: 'Brix Sans', - fontWeight: FontWeight.w400, - fontSize: getFontSize( - '${nameModel.firstName} ${nameModel.lastName}', - "name", - ), - ), - textAlign: TextAlign.left, - softWrap: true, - maxLines: 1, - ), + padding: EdgeInsets.only(right: ScalingUtility.horizontalSafeBlock * cardMargin), + child: FittedBox( + child: Text( + '${nameModel.firstName} ${nameModel.lastName}', + style: TextStyle( + fontFamily: 'Brix Sans', + fontWeight: FontWeight.w400, + fontSize: getFontSize('${nameModel.firstName} ${nameModel.lastName}', "name"), ), - ); + textAlign: TextAlign.left, + softWrap: true, + maxLines: 1, + ), + ), + ); Container _buildCollegeName(StudentIdProfileModel profileModel) => Container( - padding: EdgeInsets.only( - right: ScalingUtility.horizontalSafeBlock * cardMargin, - ), - child: Text( - profileModel.collegeCurrent, - style: Theme.of(context).textTheme.bodySmall?.copyWith( - fontWeight: FontWeight.w400, - ), - textAlign: TextAlign.left, - softWrap: false, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ); + padding: EdgeInsets.only(right: ScalingUtility.horizontalSafeBlock * cardMargin), + child: Text( + profileModel.collegeCurrent, + style: Theme.of(context).textTheme.bodySmall?.copyWith(fontWeight: FontWeight.w400), + textAlign: TextAlign.left, + softWrap: false, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ); Container _buildMajorName(StudentIdProfileModel profileModel) => Container( - padding: EdgeInsets.only( - right: ScalingUtility.horizontalSafeBlock * cardMargin, - ), - child: Text( - profileModel.graduatePrimaryMajorCurrent != "" - ? profileModel.graduatePrimaryMajorCurrent - : profileModel.ugPrimaryMajorCurrent, - style: Theme.of(context).textTheme.bodySmall?.copyWith( - fontWeight: FontWeight.w700, - ), - textAlign: TextAlign.left, - softWrap: false, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), - ); + padding: EdgeInsets.only(right: ScalingUtility.horizontalSafeBlock * cardMargin), + child: Text( + profileModel.graduatePrimaryMajorCurrent != "" + ? profileModel.graduatePrimaryMajorCurrent + : profileModel.ugPrimaryMajorCurrent, + style: Theme.of(context).textTheme.bodySmall?.copyWith(fontWeight: FontWeight.w700), + textAlign: TextAlign.left, + softWrap: false, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ); Widget _buildBarcode(StudentIdProfileModel profileModel) => TextButton( - style: TextButton.styleFrom( - padding: EdgeInsets.all(0), - tapTargetSize: MaterialTapTargetSize.shrinkWrap, - ), - child: returnBarcodeContainer( - profileModel.barcode.toString(), - false, - context, - ), - onPressed: () { - createAlertDialog( - context, - returnBarcodeContainer( - profileModel.barcode.toString(), - true, - context, - ), - profileModel.toString(), - true, - ); - }, + style: TextButton.styleFrom(padding: EdgeInsets.all(0), tapTargetSize: MaterialTapTargetSize.shrinkWrap), + child: returnBarcodeContainer(profileModel.barcode.toString(), false, context), + onPressed: () { + createAlertDialog( + context, + returnBarcodeContainer(profileModel.barcode.toString(), true, context), + profileModel.toString(), + true, ); + }, + ); - Widget _buildClassificationTitle(StudentIdProfileModel profileModel) => Text( - profileModel.classificationType, - style: TextStyle( - fontSize: ScalingUtility.horizontalSafeBlock * 4.0, - ), - ); + Widget _buildClassificationTitle(StudentIdProfileModel profileModel) => + Text(profileModel.classificationType, style: TextStyle(fontSize: ScalingUtility.horizontalSafeBlock * 4.0)); Widget _buildBarcodeNumber(StudentIdProfileModel profileModel) { return Padding( diff --git a/lib/ui/wifi/wifi_card.dart b/lib/ui/wifi/wifi_card.dart index 5fb0af12a..1fb112998 100644 --- a/lib/ui/wifi/wifi_card.dart +++ b/lib/ui/wifi/wifi_card.dart @@ -66,16 +66,10 @@ class _WiFiCardState extends State with AutomaticKeepAliveClientMixin // initial, speedTest, finished, unavailableState, simulated Widget buildCardContent(BuildContext context) { if (!_speedTestProvider.isUCSDWiFi!) { - return Padding( - padding: const EdgeInsets.only(left: 8, right: 8, top: 8), - child: unavailableState(), - ); + return Padding(padding: const EdgeInsets.only(left: 8, right: 8, top: 8), child: unavailableState()); } if (timedOut) { - return Padding( - padding: const EdgeInsets.only(left: 8, right: 8, top: 8), - child: finishedState(), - ); + return Padding(padding: const EdgeInsets.only(left: 8, right: 8, top: 8), child: finishedState()); } _speedTestProvider.addListener(() { @@ -108,10 +102,7 @@ class _WiFiCardState extends State with AutomaticKeepAliveClientMixin }); // STATE MACHINE - return Padding( - padding: const EdgeInsets.only(left: 8, right: 8, top: 8), - child: _buildStateWidget(context), - ); + return Padding(padding: const EdgeInsets.only(left: 8, right: 8, top: 8), child: _buildStateWidget(context)); } Widget _buildStateWidget(BuildContext context) { @@ -129,27 +120,30 @@ class _WiFiCardState extends State with AutomaticKeepAliveClientMixin mainAxisAlignment: MainAxisAlignment.start, children: [ // Wifi icon + Description - Row(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Icon( - Icons.wifi_sharp, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, - size: 38, - ), - SizedBox(width: 10), - Padding( - padding: EdgeInsets.only(top: 10), - child: Text( - "Help identify campus WiFi issues.", - style: TextStyle( - fontSize: 22, - color: Theme.of(context).brightness == Brightness.light - ? descriptiveTextColorLight - : descriptiveTextColorDark, - fontWeight: FontWeight.w400, + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Icon( + Icons.wifi_sharp, + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + size: 38, + ), + SizedBox(width: 10), + Padding( + padding: EdgeInsets.only(top: 10), + child: Text( + "Help identify campus WiFi issues.", + style: TextStyle( + fontSize: 22, + color: Theme.of(context).brightness == Brightness.light + ? descriptiveTextColorLight + : descriptiveTextColorDark, + fontWeight: FontWeight.w400, + ), ), ), - ) - ]), + ], + ), SizedBox(height: 50), // TEST SPEED and REPORT ISSUE buttons Row( @@ -157,20 +151,21 @@ class _WiFiCardState extends State with AutomaticKeepAliveClientMixin children: [ // TEST SPEED ActionButton( - buttonText: 'TEST SPEED', - onPressed: () { - analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'test_speed'}); - if (_speedTestProvider.onSimulator!) { - setState(() { - cardState = TestStatus.simulated; - }); - } else { - setState(() { - cardState = TestStatus.running; - }); - _speedTestProvider.speedTest().timeout(const Duration(seconds: 1), onTimeout: _onTimeout); - } - }), + buttonText: 'TEST SPEED', + onPressed: () { + analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'test_speed'}); + if (_speedTestProvider.onSimulator!) { + setState(() { + cardState = TestStatus.simulated; + }); + } else { + setState(() { + cardState = TestStatus.running; + }); + _speedTestProvider.speedTest().timeout(const Duration(seconds: 1), onTimeout: _onTimeout); + } + }, + ), // REPORT ISSUE ActionLink( buttonText: 'REPORT ISSUE', @@ -179,20 +174,22 @@ class _WiFiCardState extends State with AutomaticKeepAliveClientMixin analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'report_issue'}); _speedTestProvider.reportIssue(); showDialog( - context: context, - builder: (context) { - return AlertDialogWidget( - type: MessageTypeConstants.ERROR, - icon: Icons.block_flipped, - title: WifiConstants.WIFI_ISSUE_FAILED_TITLE, - description: WifiConstants.WIFI_ISSUE_FAILED_DESC, - onClose: () { - Navigator.of(context).pop(); - }); - }); + context: context, + builder: (context) { + return AlertDialogWidget( + type: MessageTypeConstants.ERROR, + icon: Icons.block_flipped, + title: WifiConstants.WIFI_ISSUE_FAILED_TITLE, + description: WifiConstants.WIFI_ISSUE_FAILED_DESC, + onClose: () { + Navigator.of(context).pop(); + }, + ); + }, + ); } : () {}, - ) + ), ], ), ], @@ -204,33 +201,34 @@ class _WiFiCardState extends State with AutomaticKeepAliveClientMixin return Column( children: [ Padding( - padding: const EdgeInsets.only(left: 8, right: 8, top: 8), - child: RichText( - text: TextSpan(children: [ - TextSpan( + padding: const EdgeInsets.only(left: 8, right: 8, top: 8), + child: RichText( + text: TextSpan( + children: [ + TextSpan( text: "Testing... ", - style: TextStyle( - color: Theme.of(context).colorScheme.secondary, - fontSize: 36, - )), - WidgetSpan( - child: Icon(Icons.wifi, size: 36), - ), - ]))), + style: TextStyle(color: Theme.of(context).colorScheme.secondary, fontSize: 36), + ), + WidgetSpan(child: Icon(Icons.wifi, size: 36)), + ], + ), + ), + ), Container( height: 40, child: LiquidLinearProgressIndicator( - backgroundColor: Colors.white, - // Defaults to the current Theme's backgroundColor. - borderColor: Colors.black, - borderWidth: 0.5, - center: Text( - "${((_speedTestProvider.percentDownloaded * 100) / 2 + (_speedTestProvider.percentUploaded * 100) / 2).toStringAsPrecision(6).substring(0, 5)} %", - style: TextStyle(color: Colors.grey), - ), - direction: Axis.horizontal, - value: (_speedTestProvider.percentDownloaded + _speedTestProvider.percentUploaded) / 2, - valueColor: AlwaysStoppedAnimation(lightPrimaryColor)), + backgroundColor: Colors.white, + // Defaults to the current Theme's backgroundColor. + borderColor: Colors.black, + borderWidth: 0.5, + center: Text( + "${((_speedTestProvider.percentDownloaded * 100) / 2 + (_speedTestProvider.percentUploaded * 100) / 2).toStringAsPrecision(6).substring(0, 5)} %", + style: TextStyle(color: Colors.grey), + ), + direction: Axis.horizontal, + value: (_speedTestProvider.percentDownloaded + _speedTestProvider.percentUploaded) / 2, + valueColor: AlwaysStoppedAnimation(lightPrimaryColor), + ), ), ], ); @@ -280,15 +278,16 @@ class _WiFiCardState extends State with AutomaticKeepAliveClientMixin ), // Download Speed in Mbps Expanded( - flex: 4, - child: Text( - downloadSpeed, - style: TextStyle( - fontSize: 24.0, - fontWeight: FontWeight.w700, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, - ), - )) + flex: 4, + child: Text( + downloadSpeed, + style: TextStyle( + fontSize: 24.0, + fontWeight: FontWeight.w700, + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + ), + ), + ), ], ), ), @@ -313,15 +312,16 @@ class _WiFiCardState extends State with AutomaticKeepAliveClientMixin ), ), Expanded( - flex: 4, - child: Text( - downloadSpeed, - style: TextStyle( - fontSize: 24.0, - fontWeight: FontWeight.w700, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, - ), - )) + flex: 4, + child: Text( + downloadSpeed, + style: TextStyle( + fontSize: 24.0, + fontWeight: FontWeight.w700, + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + ), + ), + ), ], ), ), @@ -334,44 +334,48 @@ class _WiFiCardState extends State with AutomaticKeepAliveClientMixin // TODO: This brings you back to the initial state, but that requires two "TEST SPEED" Button clicks. - December 2025 // TODO: For the UI people, do you want 1 click? or 2 clicks but the first one indicating to "Reset" - December 2025 ActionButton( - buttonText: 'TEST SPEED', - onPressed: () { - analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'test_speed'}); - setState(() { - timedOut = false; - cardState = TestStatus.running; - _speedTestProvider.resetSpeedTest(); - }); - _speedTestProvider.speedTest().timeout(const Duration(seconds: 1), onTimeout: _onTimeout); - // setState(() { - // timedOut = false; - // cardState = TestStatus.initial; - // _speedTestProvider.resetSpeedTest(); - // }); - }), + buttonText: 'TEST SPEED', + onPressed: () { + analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'test_speed'}); + setState(() { + timedOut = false; + cardState = TestStatus.running; + _speedTestProvider.resetSpeedTest(); + }); + _speedTestProvider.speedTest().timeout(const Duration(seconds: 1), onTimeout: _onTimeout); + // setState(() { + // timedOut = false; + // cardState = TestStatus.initial; + // _speedTestProvider.resetSpeedTest(); + // }); + }, + ), SizedBox(width: 10), // REPORT ISSUE ActionLink( buttonText: 'REPORT ISSUE', - onPressed: _buttonEnabled // TODO: DO WE REALLY NEED THIS BUTTON ENABLED? - December 2025 + onPressed: + _buttonEnabled // TODO: DO WE REALLY NEED THIS BUTTON ENABLED? - December 2025 ? () { analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'report_issue'}); _speedTestProvider.reportIssue(); showDialog( - context: context, - builder: (context) { - return AlertDialogWidget( - type: MessageTypeConstants.SUCCESS, - icon: Icons.check_circle_outline_sharp, - title: WifiConstants.WIFI_ISSUE_SUCCESS_TITLE, - description: WifiConstants.WIFI_ISSUE_SUCCESS_DESC, - onClose: () { - Navigator.of(context).pop(); - }); - }); + context: context, + builder: (context) { + return AlertDialogWidget( + type: MessageTypeConstants.SUCCESS, + icon: Icons.check_circle_outline_sharp, + title: WifiConstants.WIFI_ISSUE_SUCCESS_TITLE, + description: WifiConstants.WIFI_ISSUE_SUCCESS_DESC, + onClose: () { + Navigator.of(context).pop(); + }, + ); + }, + ); } : () {}, - ) + ), ], ), ], @@ -384,21 +388,16 @@ class _WiFiCardState extends State with AutomaticKeepAliveClientMixin children: [ Padding( padding: const EdgeInsets.only(left: 8, right: 8, top: 8), - child: Text( - "Connect to a UCSD Network", - style: TextStyle( - fontSize: 25, - ), - textAlign: TextAlign.center, - ), + child: Text("Connect to a UCSD Network", style: TextStyle(fontSize: 25), textAlign: TextAlign.center), ), SizedBox(height: 50), ActionButton( - buttonText: 'TRY AGAIN', - onPressed: () { - analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'try_again'}); - tryAgain(); - }), + buttonText: 'TRY AGAIN', + onPressed: () { + analytics.logEvent(name: '${cardId}_card_action', parameters: {'action': 'try_again'}); + tryAgain(); + }, + ), ], ); } @@ -419,20 +418,14 @@ class _WiFiCardState extends State with AutomaticKeepAliveClientMixin } } -//////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////// ////////////// SIMULATED STATE //////////// Column simulatedState() { return Column( children: [ Padding( padding: EdgeInsets.only(left: 8, right: 8, top: 8), - child: Text( - "Sorry", - style: TextStyle( - fontSize: 25, - ), - textAlign: TextAlign.center, - ), + child: Text("Sorry", style: TextStyle(fontSize: 25), textAlign: TextAlign.center), ), Padding( padding: const EdgeInsets.only(left: 8, right: 8, top: 8), @@ -441,7 +434,7 @@ class _WiFiCardState extends State with AutomaticKeepAliveClientMixin style: TextStyle(fontSize: 13), textAlign: TextAlign.center, ), - ) + ), ], ); } From 33c790d8c0f0d827e6fb5b659894a36622db2999 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 19:20:19 +0000 Subject: [PATCH 010/139] style: auto fix formatting violations --- lib/core/models/tgpt_models/chat_session.dart | 5 ++--- .../services/tgpt_services/chat_session_creation.dart | 4 +--- lib/ui/availability/availability_detail_view.dart | 4 +--- lib/ui/availability/availability_display.dart | 8 +++----- lib/ui/classes/classes_list.dart | 4 +--- lib/ui/common/base64_image_widget.dart | 4 +--- lib/ui/dining/dining_busyness_bar.dart | 4 +--- lib/ui/esrimap/esrimap.dart | 8 ++------ lib/ui/esrimap/esrimap_scene.dart | 5 ++--- lib/ui/events/event_tile.dart | 3 +-- lib/ui/news/news_list.dart | 3 +-- lib/ui/parking/manage_parking_view.dart | 4 +--- lib/ui/parking/neighborhoods_view.dart | 4 +--- lib/ui/wifi/wifi_card.dart | 7 ++----- 14 files changed, 20 insertions(+), 47 deletions(-) diff --git a/lib/core/models/tgpt_models/chat_session.dart b/lib/core/models/tgpt_models/chat_session.dart index efaa233d0..a97a4d588 100644 --- a/lib/core/models/tgpt_models/chat_session.dart +++ b/lib/core/models/tgpt_models/chat_session.dart @@ -22,9 +22,8 @@ class CreateChatSessionID { CreateChatSessionID({required this.chatSessionId}); - factory CreateChatSessionID.fromJson(Map json) { - return CreateChatSessionID(chatSessionId: json['chat_session_id'] as String); - } + factory CreateChatSessionID.fromJson(Map json) => + CreateChatSessionID(chatSessionId: json['chat_session_id'] as String); /// Defensive factory that handles both Map and JSON String responses. /// Use this when the response format from the API is uncertain. diff --git a/lib/core/services/tgpt_services/chat_session_creation.dart b/lib/core/services/tgpt_services/chat_session_creation.dart index 17371094e..eb7267c9b 100644 --- a/lib/core/services/tgpt_services/chat_session_creation.dart +++ b/lib/core/services/tgpt_services/chat_session_creation.dart @@ -26,9 +26,7 @@ class ChatSessionService { ChatSessionService(this._userDataProvider); /// Build fresh headers for each request to avoid race conditions. - Map _buildHeaders() { - return {"accept": "application/json", "content-type": "application/json"}; - } + Map _buildHeaders() => {"accept": "application/json", "content-type": "application/json"}; /// Create a new chat session. /// diff --git a/lib/ui/availability/availability_detail_view.dart b/lib/ui/availability/availability_detail_view.dart index 9d984b0a5..be409731b 100644 --- a/lib/ui/availability/availability_detail_view.dart +++ b/lib/ui/availability/availability_detail_view.dart @@ -9,9 +9,7 @@ class AvailabilityDetailedView extends StatelessWidget { const AvailabilityDetailedView({required this.subLocation}); @override - Widget build(BuildContext context) { - return ContainerView(child: buildLocationsList(context, subLocation)); - } + Widget build(BuildContext context) => ContainerView(child: buildLocationsList(context, subLocation)); Widget buildLocationsList(BuildContext context, SubLocations subLocation) { List list = []; diff --git a/lib/ui/availability/availability_display.dart b/lib/ui/availability/availability_display.dart index 9f709c553..c3ce4c446 100644 --- a/lib/ui/availability/availability_display.dart +++ b/lib/ui/availability/availability_display.dart @@ -10,9 +10,8 @@ class AvailabilityDisplay extends StatelessWidget { final AvailabilityModel model; @override - Widget build(BuildContext context) { - return Column(children: [buildLocationTitle(context), buildAvailabilityBars(context)]); - } + Widget build(BuildContext context) => + Column(children: [buildLocationTitle(context), buildAvailabilityBars(context)]); Widget buildLocationTitle(BuildContext context) { return Container( @@ -49,9 +48,8 @@ class AvailabilityDisplay extends StatelessWidget { excludeSemantics: true, child: GestureDetector( onTap: () { - if (subLocation.floors.isNotEmpty) { + if (subLocation.floors.isNotEmpty) Navigator.pushNamed(context, RoutePaths.AVAILABILITY_DETAILED_VIEW, arguments: subLocation); - } }, child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/ui/classes/classes_list.dart b/lib/ui/classes/classes_list.dart index 819a87083..37a4ba82c 100644 --- a/lib/ui/classes/classes_list.dart +++ b/lib/ui/classes/classes_list.dart @@ -9,9 +9,7 @@ import 'package:campus_mobile_experimental/app_styles.dart'; class ClassList extends StatelessWidget { @override - Widget build(BuildContext context) { - return ContainerView(child: buildSchedule(context)); - } + Widget build(BuildContext context) => ContainerView(child: buildSchedule(context)); Widget buildSchedule(BuildContext context) { List list = []; diff --git a/lib/ui/common/base64_image_widget.dart b/lib/ui/common/base64_image_widget.dart index 1cd5bcdee..70469bf94 100644 --- a/lib/ui/common/base64_image_widget.dart +++ b/lib/ui/common/base64_image_widget.dart @@ -52,7 +52,5 @@ class Base64ImageWidget extends StatelessWidget { } } - Widget _buildPlaceholder() { - return Image.asset(placeholderAssetPath, fit: fit, width: width, height: height); - } + Widget _buildPlaceholder() => Image.asset(placeholderAssetPath, fit: fit, width: width, height: height); } diff --git a/lib/ui/dining/dining_busyness_bar.dart b/lib/ui/dining/dining_busyness_bar.dart index db466b9d3..da6953c36 100644 --- a/lib/ui/dining/dining_busyness_bar.dart +++ b/lib/ui/dining/dining_busyness_bar.dart @@ -12,9 +12,7 @@ class DiningBusynessBar extends StatelessWidget { final AvailabilityModel busynessDiningHallModel; @override - Widget build(BuildContext context) { - return Column(children: [buildAvailabilityBars(context)]); - } + Widget build(BuildContext context) => Column(children: [buildAvailabilityBars(context)]); Widget buildAvailabilityBars(BuildContext context) { if (busynessDiningHallModel.subLocations.isEmpty) { diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 45d5e30cb..c90e002fc 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1598,12 +1598,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return; } // Collapse whichever sheet is active to the minimum snap - if (_showCategoryList && _selectedResult == null) { - if (_categorySheetController.isAttached) _categorySheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } - if (_selectedResult != null) { - if (_detailSheetController.isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } + if (_showCategoryList && _selectedResult == null) if (_categorySheetController.isAttached) _categorySheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + if (_selectedResult != null) if (_detailSheetController.isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); } // --------------------------------------------------------------------------- diff --git a/lib/ui/esrimap/esrimap_scene.dart b/lib/ui/esrimap/esrimap_scene.dart index 434bd3f2f..2576a4df2 100644 --- a/lib/ui/esrimap/esrimap_scene.dart +++ b/lib/ui/esrimap/esrimap_scene.dart @@ -124,7 +124,6 @@ class EsriSceneWidgetState extends State { } @override - Widget build(BuildContext context) { - return ArcGISSceneView(controllerProvider: () => _sceneViewController, onSceneViewReady: _onSceneViewReady); - } + Widget build(BuildContext context) => + ArcGISSceneView(controllerProvider: () => _sceneViewController, onSceneViewReady: _onSceneViewReady); } diff --git a/lib/ui/events/event_tile.dart b/lib/ui/events/event_tile.dart index d42fcfd95..428a7b637 100644 --- a/lib/ui/events/event_tile.dart +++ b/lib/ui/events/event_tile.dart @@ -21,9 +21,8 @@ class EventTile extends StatelessWidget { @override Widget build(BuildContext context) { // Show loading indicator while data is loading - if (Provider.of(context).isLoading) { + if (Provider.of(context).isLoading) return Center(child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary)); - } return _buildEventTile(context); } diff --git a/lib/ui/news/news_list.dart b/lib/ui/news/news_list.dart index d1a0966f8..a756b475c 100644 --- a/lib/ui/news/news_list.dart +++ b/lib/ui/news/news_list.dart @@ -16,9 +16,8 @@ class NewsList extends StatelessWidget { @override Widget build(BuildContext context) { - if (Provider.of(context).isLoading) { + if (Provider.of(context).isLoading) return Center(child: CircularProgressIndicator(color: Theme.of(context).colorScheme.secondary)); - } return buildNewsList(context, Provider.of(context).newsModels); } diff --git a/lib/ui/parking/manage_parking_view.dart b/lib/ui/parking/manage_parking_view.dart index 7d23843e3..fea435917 100644 --- a/lib/ui/parking/manage_parking_view.dart +++ b/lib/ui/parking/manage_parking_view.dart @@ -10,9 +10,7 @@ class ManageParkingView extends StatefulWidget { class _ManageParkingViewState extends State { @override - Widget build(BuildContext context) { - return ContainerView(child: buildLocationsList(context)); - } + Widget build(BuildContext context) => ContainerView(child: buildLocationsList(context)); Widget buildLocationsList(BuildContext context) { const List parkingType = ["Neighborhoods", "Parking Structures"]; diff --git a/lib/ui/parking/neighborhoods_view.dart b/lib/ui/parking/neighborhoods_view.dart index 7c461d433..8a5a1dd5a 100644 --- a/lib/ui/parking/neighborhoods_view.dart +++ b/lib/ui/parking/neighborhoods_view.dart @@ -12,9 +12,7 @@ class NeighborhoodsView extends StatefulWidget { class _NeighborhoodsViewState extends State { @override - Widget build(BuildContext context) { - return ContainerView(child: buildNeighborhoodsList(context)); - } + Widget build(BuildContext context) => ContainerView(child: buildNeighborhoodsList(context)); Widget buildNeighborhoodsList(BuildContext context) { Map> neighborhoods = Provider.of(context).getParkingMap(); diff --git a/lib/ui/wifi/wifi_card.dart b/lib/ui/wifi/wifi_card.dart index 1fb112998..5f88bf841 100644 --- a/lib/ui/wifi/wifi_card.dart +++ b/lib/ui/wifi/wifi_card.dart @@ -65,12 +65,9 @@ class _WiFiCardState extends State with AutomaticKeepAliveClientMixin // Wifi card changes its contents based on the state i.e. // initial, speedTest, finished, unavailableState, simulated Widget buildCardContent(BuildContext context) { - if (!_speedTestProvider.isUCSDWiFi!) { + if (!_speedTestProvider.isUCSDWiFi!) return Padding(padding: const EdgeInsets.only(left: 8, right: 8, top: 8), child: unavailableState()); - } - if (timedOut) { - return Padding(padding: const EdgeInsets.only(left: 8, right: 8, top: 8), child: finishedState()); - } + if (timedOut) return Padding(padding: const EdgeInsets.only(left: 8, right: 8, top: 8), child: finishedState()); _speedTestProvider.addListener(() { try { From d408e19c456037d06e454542a970540e85e87f91 Mon Sep 17 00:00:00 2001 From: Albert Hoang Date: Mon, 27 Jul 2026 13:27:07 -0700 Subject: [PATCH 011/139] fixed iOS issues --- ios/Flutter/AppFrameworkInfo.plist | 2 +- ios/Podfile | 7 +- ios/Podfile.lock | 320 +++++++++++++++++- ios/Runner.xcodeproj/project.pbxproj | 87 ++++- .../xcshareddata/swiftpm/Package.resolved | 149 -------- .../xcshareddata/swiftpm/Package.resolved | 149 -------- lib/ui/esrimap/esrimap.dart | 35 +- lib/ui/esrimap/esrimap_basemaps.dart | 45 +-- pubspec.yaml | 2 + 9 files changed, 458 insertions(+), 338 deletions(-) delete mode 100644 ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 86343d860..f32f270dc 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 16.0 + 17.0 diff --git a/ios/Podfile b/ios/Podfile index 97c9ea949..9a169d8cb 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '16.0' +platform :ios, '17.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -31,6 +31,9 @@ target 'Runner' do use_frameworks! use_modular_headers! + pod 'Runtimecore', :podspec => '../arcgis_maps_core/ios/Runtimecore.podspec' + pod 'arcgis_maps_ffi', :podspec => '../arcgis_maps_core/ios/arcgis_maps_ffi.podspec' + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end @@ -41,7 +44,7 @@ post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0' + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '17.0' end end end diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 9184e92e5..a169324e7 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,28 +1,346 @@ PODS: - app_links (0.0.1): - Flutter + - arcgis_maps (300.0.0.4935): + - arcgis_maps_ffi + - Flutter + - Runtimecore + - arcgis_maps_ffi (300.0.0.4935) + - connectivity_plus (0.0.1): + - Flutter + - device_info_plus (0.0.1): + - Flutter + - Firebase/CoreOnly (12.6.0): + - FirebaseCore (~> 12.6.0) + - Firebase/Crashlytics (12.6.0): + - Firebase/CoreOnly + - FirebaseCrashlytics (~> 12.6.0) + - Firebase/Messaging (12.6.0): + - Firebase/CoreOnly + - FirebaseMessaging (~> 12.6.0) + - firebase_analytics (12.1.0): + - firebase_core + - FirebaseAnalytics (= 12.6.0) + - Flutter + - firebase_core (4.3.0): + - Firebase/CoreOnly (= 12.6.0) + - Flutter + - firebase_crashlytics (5.0.6): + - Firebase/Crashlytics (= 12.6.0) + - firebase_core + - Flutter + - firebase_messaging (16.1.0): + - Firebase/Messaging (= 12.6.0) + - firebase_core + - Flutter + - FirebaseAnalytics (12.6.0): + - FirebaseAnalytics/Default (= 12.6.0) + - FirebaseCore (~> 12.6.0) + - FirebaseInstallations (~> 12.6.0) + - GoogleUtilities/AppDelegateSwizzler (~> 8.1) + - GoogleUtilities/MethodSwizzler (~> 8.1) + - GoogleUtilities/Network (~> 8.1) + - "GoogleUtilities/NSData+zlib (~> 8.1)" + - nanopb (~> 3.30910.0) + - FirebaseAnalytics/Default (12.6.0): + - FirebaseCore (~> 12.6.0) + - FirebaseInstallations (~> 12.6.0) + - GoogleAppMeasurement/Default (= 12.6.0) + - GoogleUtilities/AppDelegateSwizzler (~> 8.1) + - GoogleUtilities/MethodSwizzler (~> 8.1) + - GoogleUtilities/Network (~> 8.1) + - "GoogleUtilities/NSData+zlib (~> 8.1)" + - nanopb (~> 3.30910.0) + - FirebaseCore (12.6.0): + - FirebaseCoreInternal (~> 12.6.0) + - GoogleUtilities/Environment (~> 8.1) + - GoogleUtilities/Logger (~> 8.1) + - FirebaseCoreExtension (12.6.0): + - FirebaseCore (~> 12.6.0) + - FirebaseCoreInternal (12.6.0): + - "GoogleUtilities/NSData+zlib (~> 8.1)" + - FirebaseCrashlytics (12.6.0): + - FirebaseCore (~> 12.6.0) + - FirebaseInstallations (~> 12.6.0) + - FirebaseRemoteConfigInterop (~> 12.6.0) + - FirebaseSessions (~> 12.6.0) + - GoogleDataTransport (~> 10.1) + - GoogleUtilities/Environment (~> 8.1) + - nanopb (~> 3.30910.0) + - PromisesObjC (~> 2.4) + - FirebaseInstallations (12.6.0): + - FirebaseCore (~> 12.6.0) + - GoogleUtilities/Environment (~> 8.1) + - GoogleUtilities/UserDefaults (~> 8.1) + - PromisesObjC (~> 2.4) + - FirebaseMessaging (12.6.0): + - FirebaseCore (~> 12.6.0) + - FirebaseInstallations (~> 12.6.0) + - GoogleDataTransport (~> 10.1) + - GoogleUtilities/AppDelegateSwizzler (~> 8.1) + - GoogleUtilities/Environment (~> 8.1) + - GoogleUtilities/Reachability (~> 8.1) + - GoogleUtilities/UserDefaults (~> 8.1) + - nanopb (~> 3.30910.0) + - FirebaseRemoteConfigInterop (12.6.0) + - FirebaseSessions (12.6.0): + - FirebaseCore (~> 12.6.0) + - FirebaseCoreExtension (~> 12.6.0) + - FirebaseInstallations (~> 12.6.0) + - GoogleDataTransport (~> 10.1) + - GoogleUtilities/Environment (~> 8.1) + - GoogleUtilities/UserDefaults (~> 8.1) + - nanopb (~> 3.30910.0) + - PromisesSwift (~> 2.1) - Flutter (1.0.0) + - flutter_local_notifications (0.0.1): + - Flutter + - flutter_secure_storage_darwin (10.0.0): + - Flutter + - FlutterMacOS + - flutter_web_auth_2 (5.0.0): + - Flutter + - geolocator_apple (1.2.0): + - Flutter + - FlutterMacOS + - Google-Maps-iOS-Utils (6.1.3): + - GoogleMaps (~> 10.0) + - google_maps_flutter_ios_sdk10 (0.0.1): + - Flutter + - Google-Maps-iOS-Utils (~> 6.1.3) + - GoogleMaps (~> 10.0) + - GoogleAdsOnDeviceConversion (3.2.0): + - GoogleUtilities/Environment (~> 8.1) + - GoogleUtilities/Logger (~> 8.1) + - GoogleUtilities/Network (~> 8.1) + - nanopb (~> 3.30910.0) + - GoogleAppMeasurement/Core (12.6.0): + - GoogleUtilities/AppDelegateSwizzler (~> 8.1) + - GoogleUtilities/MethodSwizzler (~> 8.1) + - GoogleUtilities/Network (~> 8.1) + - "GoogleUtilities/NSData+zlib (~> 8.1)" + - nanopb (~> 3.30910.0) + - GoogleAppMeasurement/Default (12.6.0): + - GoogleAdsOnDeviceConversion (~> 3.2.0) + - GoogleAppMeasurement/Core (= 12.6.0) + - GoogleAppMeasurement/IdentitySupport (= 12.6.0) + - GoogleUtilities/AppDelegateSwizzler (~> 8.1) + - GoogleUtilities/MethodSwizzler (~> 8.1) + - GoogleUtilities/Network (~> 8.1) + - "GoogleUtilities/NSData+zlib (~> 8.1)" + - nanopb (~> 3.30910.0) + - GoogleAppMeasurement/IdentitySupport (12.6.0): + - GoogleAppMeasurement/Core (= 12.6.0) + - GoogleUtilities/AppDelegateSwizzler (~> 8.1) + - GoogleUtilities/MethodSwizzler (~> 8.1) + - GoogleUtilities/Network (~> 8.1) + - "GoogleUtilities/NSData+zlib (~> 8.1)" + - nanopb (~> 3.30910.0) + - GoogleDataTransport (10.1.0): + - nanopb (~> 3.30910.0) + - PromisesObjC (~> 2.4) + - GoogleMaps (10.14.0): + - GoogleMaps/Maps (= 10.14.0) + - GoogleMaps/Maps (10.14.0) + - GoogleUtilities/AppDelegateSwizzler (8.1.2): + - GoogleUtilities/Environment + - GoogleUtilities/Logger + - GoogleUtilities/Network + - GoogleUtilities/Privacy + - GoogleUtilities/Environment (8.1.2): + - GoogleUtilities/Privacy + - GoogleUtilities/Logger (8.1.2): + - GoogleUtilities/Environment + - GoogleUtilities/Privacy + - GoogleUtilities/MethodSwizzler (8.1.2): + - GoogleUtilities/Logger + - GoogleUtilities/Privacy + - GoogleUtilities/Network (8.1.2): + - GoogleUtilities/Logger + - "GoogleUtilities/NSData+zlib" + - GoogleUtilities/Privacy + - GoogleUtilities/Reachability + - "GoogleUtilities/NSData+zlib (8.1.2)": + - GoogleUtilities/Privacy + - GoogleUtilities/Privacy (8.1.2) + - GoogleUtilities/Reachability (8.1.2): + - GoogleUtilities/Logger + - GoogleUtilities/Privacy + - GoogleUtilities/UserDefaults (8.1.2): + - GoogleUtilities/Logger + - GoogleUtilities/Privacy + - haptic_feedback (0.5.1): + - Flutter + - nanopb (3.30910.0): + - nanopb/decode (= 3.30910.0) + - nanopb/encode (= 3.30910.0) + - nanopb/decode (3.30910.0) + - nanopb/encode (3.30910.0) + - package_info_plus (0.4.5): + - Flutter + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS + - permission_handler_apple (9.4.8): + - Flutter + - PromisesObjC (2.4.1) + - PromisesSwift (2.4.1): + - PromisesObjC (= 2.4.1) + - Runtimecore (300.0.0.4935) + - shared_preferences_foundation (0.0.1): + - Flutter + - FlutterMacOS + - url_launcher_ios (0.0.1): + - Flutter + - webview_flutter_wkwebview (0.0.1): + - Flutter + - FlutterMacOS - wifi_connection (0.0.2): - Flutter DEPENDENCIES: - app_links (from `.symlinks/plugins/app_links/ios`) + - arcgis_maps (from `.symlinks/plugins/arcgis_maps/ios`) + - arcgis_maps_ffi (from `../arcgis_maps_core/ios/arcgis_maps_ffi.podspec`) + - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) + - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) + - firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) + - firebase_core (from `.symlinks/plugins/firebase_core/ios`) + - firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`) + - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) - Flutter (from `Flutter`) + - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) + - flutter_secure_storage_darwin (from `.symlinks/plugins/flutter_secure_storage_darwin/darwin`) + - flutter_web_auth_2 (from `.symlinks/plugins/flutter_web_auth_2/ios`) + - geolocator_apple (from `.symlinks/plugins/geolocator_apple/darwin`) + - google_maps_flutter_ios_sdk10 (from `.symlinks/plugins/google_maps_flutter_ios_sdk10/ios`) + - haptic_feedback (from `.symlinks/plugins/haptic_feedback/ios`) + - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) + - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) + - Runtimecore (from `../arcgis_maps_core/ios/Runtimecore.podspec`) + - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) + - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) + - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/darwin`) - wifi_connection (from `.symlinks/plugins/wifi_connection/ios`) +SPEC REPOS: + trunk: + - Firebase + - FirebaseAnalytics + - FirebaseCore + - FirebaseCoreExtension + - FirebaseCoreInternal + - FirebaseCrashlytics + - FirebaseInstallations + - FirebaseMessaging + - FirebaseRemoteConfigInterop + - FirebaseSessions + - Google-Maps-iOS-Utils + - GoogleAdsOnDeviceConversion + - GoogleAppMeasurement + - GoogleDataTransport + - GoogleMaps + - GoogleUtilities + - nanopb + - PromisesObjC + - PromisesSwift + EXTERNAL SOURCES: app_links: :path: ".symlinks/plugins/app_links/ios" + arcgis_maps: + :path: ".symlinks/plugins/arcgis_maps/ios" + arcgis_maps_ffi: + :podspec: "../arcgis_maps_core/ios/arcgis_maps_ffi.podspec" + connectivity_plus: + :path: ".symlinks/plugins/connectivity_plus/ios" + device_info_plus: + :path: ".symlinks/plugins/device_info_plus/ios" + firebase_analytics: + :path: ".symlinks/plugins/firebase_analytics/ios" + firebase_core: + :path: ".symlinks/plugins/firebase_core/ios" + firebase_crashlytics: + :path: ".symlinks/plugins/firebase_crashlytics/ios" + firebase_messaging: + :path: ".symlinks/plugins/firebase_messaging/ios" Flutter: :path: Flutter + flutter_local_notifications: + :path: ".symlinks/plugins/flutter_local_notifications/ios" + flutter_secure_storage_darwin: + :path: ".symlinks/plugins/flutter_secure_storage_darwin/darwin" + flutter_web_auth_2: + :path: ".symlinks/plugins/flutter_web_auth_2/ios" + geolocator_apple: + :path: ".symlinks/plugins/geolocator_apple/darwin" + google_maps_flutter_ios_sdk10: + :path: ".symlinks/plugins/google_maps_flutter_ios_sdk10/ios" + haptic_feedback: + :path: ".symlinks/plugins/haptic_feedback/ios" + package_info_plus: + :path: ".symlinks/plugins/package_info_plus/ios" + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/darwin" + permission_handler_apple: + :path: ".symlinks/plugins/permission_handler_apple/ios" + Runtimecore: + :podspec: "../arcgis_maps_core/ios/Runtimecore.podspec" + shared_preferences_foundation: + :path: ".symlinks/plugins/shared_preferences_foundation/darwin" + url_launcher_ios: + :path: ".symlinks/plugins/url_launcher_ios/ios" + webview_flutter_wkwebview: + :path: ".symlinks/plugins/webview_flutter_wkwebview/darwin" wifi_connection: :path: ".symlinks/plugins/wifi_connection/ios" SPEC CHECKSUMS: app_links: c5161ac5ab5383ad046884568b4b91cb52df5d91 + arcgis_maps: 6751f496cf10a6ab40be99650db808fba3c79479 + arcgis_maps_ffi: 2cc4e1074cc3922e60e0a5a73f5bb15ffbc7b132 + connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd + device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe + Firebase: a451a7b61536298fd5cbfe3a746fd40443a50679 + firebase_analytics: 4f9cca09e65f6c2944a862c6dc86f6bed9fb769c + firebase_core: ba00a168e719694f38960502ceb560285603d073 + firebase_crashlytics: 13f4b77e9ce2a84b1f8ea07f293db5b6213ce1cf + firebase_messaging: bf0e29321927edc02a563c984dbfa5b063864b15 + FirebaseAnalytics: d0a97a0db6425e5a5d966340b87f92ca7b13a557 + FirebaseCore: 0e38ad5d62d980a47a64b8e9301ffa311457be04 + FirebaseCoreExtension: 032fd6f8509e591fda8cb76f6651f20d926b121f + FirebaseCoreInternal: 69bf1306a05b8ac43004f6cc1f804bb7b05b229e + FirebaseCrashlytics: 3d6248c50726ee7832aef0e53cb84c9e64d9fa7e + FirebaseInstallations: 631b38da2e11a83daa4bfb482f79d286a5dfa7ad + FirebaseMessaging: a61bc42dcab3f7a346d94bbb54dab2c9435b18b2 + FirebaseRemoteConfigInterop: 3443b8cb8fffd76bb3e03b2a84bfd3db952fcda4 + FirebaseSessions: 2e8f808347e665dff3e5843f275715f07045297d Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 + flutter_local_notifications: a5a732f069baa862e728d839dd2ebb904737effb + flutter_secure_storage_darwin: acdb3f316ed05a3e68f856e0353b133eec373a23 + flutter_web_auth_2: 646fc9df97a01c59e5eea99b237da2c6360f8439 + geolocator_apple: ab36aa0e8b7d7a2d7639b3b4e48308394e8cef5e + Google-Maps-iOS-Utils: bed22fa703c919259b3901449434d60d994fae20 + google_maps_flutter_ios_sdk10: 1e1c8414a444154c5baa204803a0ace89011f4da + GoogleAdsOnDeviceConversion: d68c69dd9581a0f5da02617b6f377e5be483970f + GoogleAppMeasurement: 3bf40aff49a601af5da1c3345702fcb4991d35ee + GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7 + GoogleMaps: 23807b5617f32664952c04220b3b292df87ee884 + GoogleUtilities: 766ace00c6b10d8148408f329d10c4f051931850 + haptic_feedback: 1f22d7ad3abb43bb814aa42fdf548dc6d9e8245a + nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 + package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499 + path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 + permission_handler_apple: 92d754bbaa7361d436db2d6c3c1c2a0fdcec462e + PromisesObjC: 752c3227f599e3467650e47ea36f433eeb10c273 + PromisesSwift: 217dea0fd5d2ad65222a109c48698add13cc1c5b + Runtimecore: e706ad2fb40e33670e3a17847ae96ab3a3b9060f + shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 + url_launcher_ios: 694010445543906933d732453a59da0a173ae33d + webview_flutter_wkwebview: 1821ceac936eba6f7984d89a9f3bcb4dea99ebb2 wifi_connection: a73e16eb2fe4e40ca32a6d69c8609130603bb62d -PODFILE CHECKSUM: 92b1419e797417a7048bb6349dda358cd95dfd73 +PODFILE CHECKSUM: 4e3590781c99d3a40e117ed93fcb8810d0ccf558 COCOAPODS: 1.16.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 1e7ea2b31..bbb7cc892 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -158,6 +158,7 @@ 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 348EE9E2258A901800712F2E /* ShellScript */, B19D24E1170B60724162B13B /* [CP] Embed Pods Frameworks */, + F3660986D315CC3D0C38923C /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -281,13 +282,69 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCoreExtension/FirebaseCoreExtension.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCrashlytics/FirebaseCrashlytics.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseRemoteConfigInterop/FirebaseRemoteConfigInterop.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseSessions/FirebaseSessions.framework", + "${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework", + "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework", + "${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework", + "${BUILT_PRODUCTS_DIR}/PromisesSwift/Promises.framework", "${BUILT_PRODUCTS_DIR}/app_links/app_links.framework", + "${BUILT_PRODUCTS_DIR}/arcgis_maps/arcgis_maps.framework", + "${BUILT_PRODUCTS_DIR}/connectivity_plus/connectivity_plus.framework", + "${BUILT_PRODUCTS_DIR}/device_info_plus/device_info_plus.framework", + "${BUILT_PRODUCTS_DIR}/flutter_local_notifications/flutter_local_notifications.framework", + "${BUILT_PRODUCTS_DIR}/flutter_secure_storage_darwin/flutter_secure_storage_darwin.framework", + "${BUILT_PRODUCTS_DIR}/flutter_web_auth_2/flutter_web_auth_2.framework", + "${BUILT_PRODUCTS_DIR}/geolocator_apple/geolocator_apple.framework", + "${BUILT_PRODUCTS_DIR}/haptic_feedback/haptic_feedback.framework", + "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", + "${BUILT_PRODUCTS_DIR}/package_info_plus/package_info_plus.framework", + "${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework", + "${BUILT_PRODUCTS_DIR}/shared_preferences_foundation/shared_preferences_foundation.framework", + "${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework", + "${BUILT_PRODUCTS_DIR}/webview_flutter_wkwebview/webview_flutter_wkwebview.framework", "${BUILT_PRODUCTS_DIR}/wifi_connection/wifi_connection.framework", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/Runtimecore/Runtimecore.framework/Runtimecore", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/arcgis_maps_ffi/arcgis_maps_ffi.framework/arcgis_maps_ffi", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreExtension.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreInternal.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCrashlytics.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseRemoteConfigInterop.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseSessions.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Promises.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/app_links.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/arcgis_maps.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/connectivity_plus.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info_plus.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_local_notifications.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_secure_storage_darwin.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_web_auth_2.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/geolocator_apple.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/haptic_feedback.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info_plus.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_foundation.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter_wkwebview.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/wifi_connection.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Runtimecore.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/arcgis_maps_ffi.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -316,6 +373,30 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + F3660986D315CC3D0C38923C /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/GoogleMaps/GoogleMapsResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/firebase_messaging/firebase_messaging_Privacy.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/google_maps_flutter_ios_sdk10/google_maps_flutter_ios_sdk10_privacy.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/permission_handler_apple/permission_handler_apple_privacy.bundle", + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleMapsResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/firebase_messaging_Privacy.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/google_maps_flutter_ios_sdk10_privacy.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/permission_handler_apple_privacy.bundle", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -416,7 +497,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -559,7 +640,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -596,7 +677,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index c47cc2963..000000000 --- a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,149 +0,0 @@ -{ - "pins" : [ - { - "identity" : "abseil-cpp-binary", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/abseil-cpp-binary.git", - "state" : { - "revision" : "bbe8b69694d7873315fd3a4ad41efe043e1c07c5", - "version" : "1.2024072200.0" - } - }, - { - "identity" : "app-check", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/app-check.git", - "state" : { - "revision" : "3e33dd27dd4c69bd81c7c81fe61d8ccf58846902", - "version" : "11.3.1" - } - }, - { - "identity" : "firebase-ios-sdk", - "kind" : "remoteSourceControl", - "location" : "https://github.com/firebase/firebase-ios-sdk", - "state" : { - "revision" : "9ab4a7e6e5d6d3df2a2aa002a11d25e078c8d6e5", - "version" : "12.16.0" - } - }, - { - "identity" : "flutterfire", - "kind" : "remoteSourceControl", - "location" : "https://github.com/firebase/flutterfire", - "state" : { - "revision" : "39bdb5b1ef392e8c31c60209e333b45e408099e8", - "version" : "4.3.0-firebase-core-swift" - } - }, - { - "identity" : "google-ads-on-device-conversion-ios-sdk", - "kind" : "remoteSourceControl", - "location" : "https://github.com/googleads/google-ads-on-device-conversion-ios-sdk", - "state" : { - "revision" : "dc39082d8881109d35b94b1c122164c0e8d08a55", - "version" : "3.6.1" - } - }, - { - "identity" : "google-maps-ios-utils", - "kind" : "remoteSourceControl", - "location" : "https://github.com/googlemaps/google-maps-ios-utils", - "state" : { - "revision" : "1727a5e25036cecc07296569b8ad3f85d4baca4b", - "version" : "6.1.3" - } - }, - { - "identity" : "googleappmeasurement", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/GoogleAppMeasurement.git", - "state" : { - "revision" : "ce606e3768abddff0510783e1a6d2f270b943b35", - "version" : "12.16.0" - } - }, - { - "identity" : "googledatatransport", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/GoogleDataTransport.git", - "state" : { - "revision" : "617af071af9aa1d6a091d59a202910ac482128f9", - "version" : "10.1.0" - } - }, - { - "identity" : "googleutilities", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/GoogleUtilities.git", - "state" : { - "revision" : "9f183ae842be978784f2963a343682e0c46d8fb3", - "version" : "8.1.2" - } - }, - { - "identity" : "grpc-binary", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/grpc-binary.git", - "state" : { - "revision" : "75b31c842f664a0f46a2e590a570e370249fd8f6", - "version" : "1.69.1" - } - }, - { - "identity" : "gtm-session-fetcher", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/gtm-session-fetcher.git", - "state" : { - "revision" : "c0ac7575d70050c2973ba2318bd5af47f8e8153a", - "version" : "5.3.0" - } - }, - { - "identity" : "interop-ios-for-google-sdks", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/interop-ios-for-google-sdks.git", - "state" : { - "revision" : "040d087ac2267d2ddd4cca36c757d1c6a05fdbfe", - "version" : "101.0.0" - } - }, - { - "identity" : "ios-maps-sdk", - "kind" : "remoteSourceControl", - "location" : "https://github.com/googlemaps/ios-maps-sdk", - "state" : { - "revision" : "a951b24ac0ca7720f87d4be3d5bd539552d13882", - "version" : "10.15.0" - } - }, - { - "identity" : "leveldb", - "kind" : "remoteSourceControl", - "location" : "https://github.com/firebase/leveldb.git", - "state" : { - "revision" : "a0bc79961d7be727d258d33d5a6b2f1023270ba1", - "version" : "1.22.5" - } - }, - { - "identity" : "nanopb", - "kind" : "remoteSourceControl", - "location" : "https://github.com/firebase/nanopb.git", - "state" : { - "revision" : "3851d94a41890dea16dc3db34caf60e585cb4163", - "version" : "2.30910.1" - } - }, - { - "identity" : "promises", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/promises.git", - "state" : { - "revision" : "f4a19a3c313dc2616c70bb49d29a799fb16be837", - "version" : "2.4.1" - } - } - ], - "version" : 2 -} diff --git a/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index c47cc2963..000000000 --- a/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,149 +0,0 @@ -{ - "pins" : [ - { - "identity" : "abseil-cpp-binary", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/abseil-cpp-binary.git", - "state" : { - "revision" : "bbe8b69694d7873315fd3a4ad41efe043e1c07c5", - "version" : "1.2024072200.0" - } - }, - { - "identity" : "app-check", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/app-check.git", - "state" : { - "revision" : "3e33dd27dd4c69bd81c7c81fe61d8ccf58846902", - "version" : "11.3.1" - } - }, - { - "identity" : "firebase-ios-sdk", - "kind" : "remoteSourceControl", - "location" : "https://github.com/firebase/firebase-ios-sdk", - "state" : { - "revision" : "9ab4a7e6e5d6d3df2a2aa002a11d25e078c8d6e5", - "version" : "12.16.0" - } - }, - { - "identity" : "flutterfire", - "kind" : "remoteSourceControl", - "location" : "https://github.com/firebase/flutterfire", - "state" : { - "revision" : "39bdb5b1ef392e8c31c60209e333b45e408099e8", - "version" : "4.3.0-firebase-core-swift" - } - }, - { - "identity" : "google-ads-on-device-conversion-ios-sdk", - "kind" : "remoteSourceControl", - "location" : "https://github.com/googleads/google-ads-on-device-conversion-ios-sdk", - "state" : { - "revision" : "dc39082d8881109d35b94b1c122164c0e8d08a55", - "version" : "3.6.1" - } - }, - { - "identity" : "google-maps-ios-utils", - "kind" : "remoteSourceControl", - "location" : "https://github.com/googlemaps/google-maps-ios-utils", - "state" : { - "revision" : "1727a5e25036cecc07296569b8ad3f85d4baca4b", - "version" : "6.1.3" - } - }, - { - "identity" : "googleappmeasurement", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/GoogleAppMeasurement.git", - "state" : { - "revision" : "ce606e3768abddff0510783e1a6d2f270b943b35", - "version" : "12.16.0" - } - }, - { - "identity" : "googledatatransport", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/GoogleDataTransport.git", - "state" : { - "revision" : "617af071af9aa1d6a091d59a202910ac482128f9", - "version" : "10.1.0" - } - }, - { - "identity" : "googleutilities", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/GoogleUtilities.git", - "state" : { - "revision" : "9f183ae842be978784f2963a343682e0c46d8fb3", - "version" : "8.1.2" - } - }, - { - "identity" : "grpc-binary", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/grpc-binary.git", - "state" : { - "revision" : "75b31c842f664a0f46a2e590a570e370249fd8f6", - "version" : "1.69.1" - } - }, - { - "identity" : "gtm-session-fetcher", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/gtm-session-fetcher.git", - "state" : { - "revision" : "c0ac7575d70050c2973ba2318bd5af47f8e8153a", - "version" : "5.3.0" - } - }, - { - "identity" : "interop-ios-for-google-sdks", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/interop-ios-for-google-sdks.git", - "state" : { - "revision" : "040d087ac2267d2ddd4cca36c757d1c6a05fdbfe", - "version" : "101.0.0" - } - }, - { - "identity" : "ios-maps-sdk", - "kind" : "remoteSourceControl", - "location" : "https://github.com/googlemaps/ios-maps-sdk", - "state" : { - "revision" : "a951b24ac0ca7720f87d4be3d5bd539552d13882", - "version" : "10.15.0" - } - }, - { - "identity" : "leveldb", - "kind" : "remoteSourceControl", - "location" : "https://github.com/firebase/leveldb.git", - "state" : { - "revision" : "a0bc79961d7be727d258d33d5a6b2f1023270ba1", - "version" : "1.22.5" - } - }, - { - "identity" : "nanopb", - "kind" : "remoteSourceControl", - "location" : "https://github.com/firebase/nanopb.git", - "state" : { - "revision" : "3851d94a41890dea16dc3db34caf60e585cb4163", - "version" : "2.30910.1" - } - }, - { - "identity" : "promises", - "kind" : "remoteSourceControl", - "location" : "https://github.com/google/promises.git", - "state" : { - "revision" : "f4a19a3c313dc2616c70bb49d29a799fb16be837", - "version" : "2.4.1" - } - } - ], - "version" : 2 -} diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index c90e002fc..823fef026 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -141,7 +141,8 @@ class _SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { } @override - bool shouldRebuild(covariant _SlideOverHeaderDelegate oldDelegate) => child != oldDelegate.child || height != oldDelegate.height || backgroundColor != oldDelegate.backgroundColor; + bool shouldRebuild(covariant _SlideOverHeaderDelegate oldDelegate) => + child != oldDelegate.child || height != oldDelegate.height || backgroundColor != oldDelegate.backgroundColor; } // ----------------------------------------------------------------------------- @@ -335,8 +336,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _setupAgeAuthChallengeHandler(); _mapViewController.arcGISMap = _map; _mapViewController.interactionOptions.rotateEnabled = true; - if (!_mapViewController.graphicsOverlays.contains(_graphicsOverlay)) _mapViewController.graphicsOverlays.add(_graphicsOverlay); - if (!_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay)) _mapViewController.graphicsOverlays.add(_routeGraphicsOverlay); + if (!_mapViewController.graphicsOverlays.contains(_graphicsOverlay)) + _mapViewController.graphicsOverlays.add(_graphicsOverlay); + if (!_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay)) + _mapViewController.graphicsOverlays.add(_routeGraphicsOverlay); // Wire up location display — blue dot, no auto-pan on start _mapViewController.locationDisplay.dataSource = _locationDataSource; @@ -584,7 +587,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _showResults = false; } }); - if (_detailSheetController.isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + if (_detailSheetController.isAttached) + _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); } } @@ -597,7 +601,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _showResults = false; } }); - if (_detailSheetController.isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + if (_detailSheetController.isAttached) + _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); } } @@ -1426,7 +1431,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); } - IconData _iconForResult(MapSearchResult result) => result.source == MapSearchSource.building ? Icons.business : Icons.place; + IconData _iconForResult(MapSearchResult result) => + result.source == MapSearchSource.building ? Icons.business : Icons.place; /// Returns the icon for a POI class — uses the hardcoded category icon if one /// exists, otherwise falls back to a generic place icon. @@ -1598,8 +1604,12 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return; } // Collapse whichever sheet is active to the minimum snap - if (_showCategoryList && _selectedResult == null) if (_categorySheetController.isAttached) _categorySheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - if (_selectedResult != null) if (_detailSheetController.isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + if (_showCategoryList && _selectedResult == null) + if (_categorySheetController.isAttached) + _categorySheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + if (_selectedResult != null) + if (_detailSheetController.isAttached) + _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); } // --------------------------------------------------------------------------- @@ -2349,7 +2359,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ) : null; }); - if (_routeDestination != null && _fromLatLng != null) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + if (_routeDestination != null && _fromLatLng != null) + _solveRoute(_routeDestination!, originLatLng: _fromLatLng); }, ), ), @@ -2618,11 +2629,13 @@ class _AgeAuthChallengeHandler implements ArcGISAuthenticationChallengeHandler { if (isAgo) { if (_cachedAgoToken != null && _agoTokenExpiry != null && - DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) => (_cachedAgoToken, _agoTokenExpiry); + DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) + return (_cachedAgoToken, _agoTokenExpiry); } else { if (_cachedAgeToken != null && _ageTokenExpiry != null && - DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) => (_cachedAgeToken, _ageTokenExpiry); + DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) + return (_cachedAgeToken, _ageTokenExpiry); } final response = await http.get(Uri.parse(tokensUrl)); diff --git a/lib/ui/esrimap/esrimap_basemaps.dart b/lib/ui/esrimap/esrimap_basemaps.dart index a046d3e0c..cf1abc978 100644 --- a/lib/ui/esrimap/esrimap_basemaps.dart +++ b/lib/ui/esrimap/esrimap_basemaps.dart @@ -5,20 +5,29 @@ enum BasemapType { defaultMap, light, dark, satellite } String basemapKey(BasemapType type) { switch (type) { - case BasemapType.defaultMap: return 'defaultMap'; - case BasemapType.light: return 'light'; - case BasemapType.dark: return 'dark'; - case BasemapType.satellite: return 'satellite'; + case BasemapType.defaultMap: + return 'defaultMap'; + case BasemapType.light: + return 'light'; + case BasemapType.dark: + return 'dark'; + case BasemapType.satellite: + return 'satellite'; } } BasemapType? basemapTypeFromKey(String key) { switch (key) { - case 'defaultMap': return BasemapType.defaultMap; - case 'light': return BasemapType.light; - case 'dark': return BasemapType.dark; - case 'satellite': return BasemapType.satellite; - default: return null; + case 'defaultMap': + return BasemapType.defaultMap; + case 'light': + return BasemapType.light; + case 'dark': + return BasemapType.dark; + case 'satellite': + return BasemapType.satellite; + default: + return null; } } @@ -30,35 +39,27 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { for (final layer in entry.baseLayers) { switch (layer.type) { case 'arcgisTiled': - final url = layer.serviceKey != null - ? config.serviceUrls[layer.serviceKey!] - : null; + final url = layer.serviceKey != null ? config.serviceUrls[layer.serviceKey!] : null; if (url != null) basemap.baseLayers.add(ArcGISTiledLayer.withUri(Uri.parse(url))); break; case 'arcgisVectorTiled': - final portalUrl = layer.portalKey != null - ? config.portals[layer.portalKey!] - : null; + final portalUrl = layer.portalKey != null ? config.portals[layer.portalKey!] : null; final hasPortalAndItem = portalUrl != null && layer.itemId != null; if (hasPortalAndItem) { basemap.baseLayers.add( ArcGISVectorTiledLayer.withItem( - PortalItem.withPortalAndItemId( - portal: Portal(Uri.parse(portalUrl)), - itemId: layer.itemId!, - ), + PortalItem.withPortalAndItemId(portal: Portal(Uri.parse(portalUrl)), itemId: layer.itemId!), ), ); } break; case 'arcgisMapImage': - final url = layer.serviceKey != null - ? config.serviceUrls[layer.serviceKey!] - : null; + final url = layer.serviceKey != null ? config.serviceUrls[layer.serviceKey!] : null; if (url != null) basemap.baseLayers.add(ArcGISMapImageLayer.withUri(Uri.parse(url))); break; } } return basemap; +} diff --git a/pubspec.yaml b/pubspec.yaml index 14072818c..db38fc6dc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -61,6 +61,8 @@ dev_dependencies: sdk: flutter hive_generator: 1.1.3 flutter: + config: + enable-swift-package-manager: false uses-material-design: true assets: - assets/images/ From ff8f8df26ff01844fd877029eb20c9bf92d13b18 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 16:23:25 -0700 Subject: [PATCH 012/139] applied separation of concerns to the main esrimap.dart file --- .../construction-thumbnail.png | Bin .../dark-thumbnail.png | Bin .../default-thumbnail.png | Bin .../districts-thumbnail.png | Bin .../light-thumbnail.png | Bin .../satellite-thumbnail.png | Bin .../shuttles-thumbnail.png | Bin .../tgpt-dark.svg | 0 .../tgpt-light.svg | 0 lib/ui/esrimap/esrimap.dart | 2442 ++++------------- .../models/esrimap_search_category.dart | 58 + lib/ui/esrimap/models/map_search_result.dart | 80 + .../services/esrimap_auth_handler.dart | 90 + .../services/esrimap_route_service.dart | 102 + .../services/esrimap_search_service.dart | 166 ++ .../widgets/esrimap_category_list_panel.dart | 197 ++ .../widgets/esrimap_detail_slide_over.dart | 459 ++++ .../esrimap/widgets/esrimap_search_bar.dart | 426 +++ .../widgets/esrimap_suggestions_panel.dart | 181 ++ 19 files changed, 2368 insertions(+), 1833 deletions(-) rename lib/ui/esrimap/{temp_assets => esri_map_assets}/construction-thumbnail.png (100%) rename lib/ui/esrimap/{temp_assets => esri_map_assets}/dark-thumbnail.png (100%) rename lib/ui/esrimap/{temp_assets => esri_map_assets}/default-thumbnail.png (100%) rename lib/ui/esrimap/{temp_assets => esri_map_assets}/districts-thumbnail.png (100%) rename lib/ui/esrimap/{temp_assets => esri_map_assets}/light-thumbnail.png (100%) rename lib/ui/esrimap/{temp_assets => esri_map_assets}/satellite-thumbnail.png (100%) rename lib/ui/esrimap/{temp_assets => esri_map_assets}/shuttles-thumbnail.png (100%) rename lib/ui/esrimap/{temp_assets => esri_map_assets}/tgpt-dark.svg (100%) rename lib/ui/esrimap/{temp_assets => esri_map_assets}/tgpt-light.svg (100%) create mode 100644 lib/ui/esrimap/models/esrimap_search_category.dart create mode 100644 lib/ui/esrimap/models/map_search_result.dart create mode 100644 lib/ui/esrimap/services/esrimap_auth_handler.dart create mode 100644 lib/ui/esrimap/services/esrimap_route_service.dart create mode 100644 lib/ui/esrimap/services/esrimap_search_service.dart create mode 100644 lib/ui/esrimap/widgets/esrimap_category_list_panel.dart create mode 100644 lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart create mode 100644 lib/ui/esrimap/widgets/esrimap_search_bar.dart create mode 100644 lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart diff --git a/lib/ui/esrimap/temp_assets/construction-thumbnail.png b/lib/ui/esrimap/esri_map_assets/construction-thumbnail.png similarity index 100% rename from lib/ui/esrimap/temp_assets/construction-thumbnail.png rename to lib/ui/esrimap/esri_map_assets/construction-thumbnail.png diff --git a/lib/ui/esrimap/temp_assets/dark-thumbnail.png b/lib/ui/esrimap/esri_map_assets/dark-thumbnail.png similarity index 100% rename from lib/ui/esrimap/temp_assets/dark-thumbnail.png rename to lib/ui/esrimap/esri_map_assets/dark-thumbnail.png diff --git a/lib/ui/esrimap/temp_assets/default-thumbnail.png b/lib/ui/esrimap/esri_map_assets/default-thumbnail.png similarity index 100% rename from lib/ui/esrimap/temp_assets/default-thumbnail.png rename to lib/ui/esrimap/esri_map_assets/default-thumbnail.png diff --git a/lib/ui/esrimap/temp_assets/districts-thumbnail.png b/lib/ui/esrimap/esri_map_assets/districts-thumbnail.png similarity index 100% rename from lib/ui/esrimap/temp_assets/districts-thumbnail.png rename to lib/ui/esrimap/esri_map_assets/districts-thumbnail.png diff --git a/lib/ui/esrimap/temp_assets/light-thumbnail.png b/lib/ui/esrimap/esri_map_assets/light-thumbnail.png similarity index 100% rename from lib/ui/esrimap/temp_assets/light-thumbnail.png rename to lib/ui/esrimap/esri_map_assets/light-thumbnail.png diff --git a/lib/ui/esrimap/temp_assets/satellite-thumbnail.png b/lib/ui/esrimap/esri_map_assets/satellite-thumbnail.png similarity index 100% rename from lib/ui/esrimap/temp_assets/satellite-thumbnail.png rename to lib/ui/esrimap/esri_map_assets/satellite-thumbnail.png diff --git a/lib/ui/esrimap/temp_assets/shuttles-thumbnail.png b/lib/ui/esrimap/esri_map_assets/shuttles-thumbnail.png similarity index 100% rename from lib/ui/esrimap/temp_assets/shuttles-thumbnail.png rename to lib/ui/esrimap/esri_map_assets/shuttles-thumbnail.png diff --git a/lib/ui/esrimap/temp_assets/tgpt-dark.svg b/lib/ui/esrimap/esri_map_assets/tgpt-dark.svg similarity index 100% rename from lib/ui/esrimap/temp_assets/tgpt-dark.svg rename to lib/ui/esrimap/esri_map_assets/tgpt-dark.svg diff --git a/lib/ui/esrimap/temp_assets/tgpt-light.svg b/lib/ui/esrimap/esri_map_assets/tgpt-light.svg similarity index 100% rename from lib/ui/esrimap/temp_assets/tgpt-light.svg rename to lib/ui/esrimap/esri_map_assets/tgpt-light.svg diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 823fef026..57e60eee7 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1,155 +1,36 @@ -import 'dart:convert'; -import 'dart:math' as math; +/// ============================================================================ +/// File: esrimap.dart +/// Description: Main campus Esri map screen widget. Integrates the 2D/3D map view, +/// location display, top search bar, floating action buttons, +/// basemap & operational layer controls, and bottom slide-over panels. +/// ============================================================================ + import 'dart:async'; import 'package:arcgis_maps/arcgis_maps.dart'; import 'package:flutter/material.dart'; -import 'package:http/http.dart' as http; -import 'package:shared_preferences/shared_preferences.dart'; import 'package:url_launcher/url_launcher.dart'; +import 'esrimap_ai_search.dart'; import 'esrimap_basemaps.dart'; +import 'esrimap_config.dart'; import 'esrimap_fab.dart'; import 'esrimap_layers_panel.dart'; import 'esrimap_scene.dart'; -import 'esrimap_config.dart'; -import 'esrimap_ai_search.dart'; - -// ----------------------------------------------------------------------------- -// Model -// ----------------------------------------------------------------------------- - -/// Unified search result model for both Buildings and POIs. -class MapSearchResult { - final String name; - final String subtitle; - final double latitude; - final double longitude; - final MapSearchSource source; - final String address; - final String description; - final String? websiteUrl; - - const MapSearchResult({ - required this.name, - required this.subtitle, - required this.latitude, - required this.longitude, - required this.source, - this.address = '', - this.description = '', - this.websiteUrl, - }); - - /// Serialize to JSON for SharedPreferences storage. - Map toJson() => { - 'name': name, - 'subtitle': subtitle, - 'latitude': latitude, - 'longitude': longitude, - 'source': source.index, - 'address': address, - 'description': description, - 'websiteUrl': websiteUrl, - }; - - /// Deserialize from JSON. - factory MapSearchResult.fromJson(Map json) { - return MapSearchResult( - name: json['name'] as String? ?? '', - subtitle: json['subtitle'] as String? ?? '', - latitude: (json['latitude'] as num?)?.toDouble() ?? 0.0, - longitude: (json['longitude'] as num?)?.toDouble() ?? 0.0, - source: MapSearchSource.values[json['source'] as int? ?? 0], - address: json['address'] as String? ?? '', - description: json['description'] as String? ?? '', - websiteUrl: json['websiteUrl'] as String?, - ); - } -} - -enum MapSearchSource { building, poi } - -// ----------------------------------------------------------------------------- -// Category definitions -// ----------------------------------------------------------------------------- - -class _SearchCategory { - final String label; - final IconData icon; - final String poiClassValue; - final Color color; - - const _SearchCategory({ - required this.label, - required this.icon, - required this.poiClassValue, - this.color = const Color(0xFFF5F0E6), - }); -} - -IconData _iconDataForName(String name) { - switch (name) { - case 'restaurant': - return Icons.restaurant; - case 'menu_book': - return Icons.menu_book; - case 'local_parking': - return Icons.local_parking; - case 'fitness_center': - return Icons.fitness_center; - case 'directions_bus': - return Icons.directions_bus; - default: - return Icons.place; - } -} - -Color _colorFromHex(String? hex) { - final isHexEmpty = hex == null || hex.isEmpty; - if (isHexEmpty) return const Color(0xFFF5F0E6); - final stripped = hex.replaceFirst('#', ''); - final value = int.tryParse(stripped, radix: 16); - if (value == null) return const Color(0xFFF5F0E6); - return Color(0xFF000000 | value); -} - -// ----------------------------------------------------------------------------- -// Slide-over header delegate -// ----------------------------------------------------------------------------- - -class _SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { - final Widget child; - final double height; - final Color backgroundColor; - - _SlideOverHeaderDelegate({required this.child, required this.height, required this.backgroundColor}); - - @override - double get minExtent => height; - @override - double get maxExtent => height; - - @override - Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) { - return Container( - height: height, - decoration: BoxDecoration( - color: backgroundColor, - borderRadius: shrinkOffset == 0 ? const BorderRadius.vertical(top: Radius.circular(16)) : null, - ), - child: child, - ); - } - - @override - bool shouldRebuild(covariant _SlideOverHeaderDelegate oldDelegate) => - child != oldDelegate.child || height != oldDelegate.height || backgroundColor != oldDelegate.backgroundColor; -} - -// ----------------------------------------------------------------------------- -// Widget -// ----------------------------------------------------------------------------- - +import 'models/esrimap_search_category.dart'; +import 'models/map_search_result.dart'; +import 'services/esrimap_auth_handler.dart'; +import 'services/esrimap_route_service.dart'; +import 'services/esrimap_search_service.dart'; +import 'widgets/esrimap_category_list_panel.dart'; +import 'widgets/esrimap_detail_slide_over.dart'; +import 'widgets/esrimap_search_bar.dart'; +import 'widgets/esrimap_suggestions_panel.dart'; + +// Re-export MapSearchResult so callers importing esrimap.dart retain access +export 'models/map_search_result.dart' show MapSearchResult, MapSearchSource; + +/// Primary StatefulWidget for the interactive Esri Campus Map screen. class EsriMap extends StatefulWidget { + /// Constructs an [EsriMap] instance. const EsriMap({Key? key}) : super(key: key); @override @@ -157,121 +38,108 @@ class EsriMap extends StatefulWidget { } class _EsriMapState extends State with AutomaticKeepAliveClientMixin { + // --------------------------------------------------------------------------- + // Controllers & Overlay Graphics + // --------------------------------------------------------------------------- final _mapViewController = ArcGISMapView.createController(); late final ArcGISMap _map; final _graphicsOverlay = GraphicsOverlay(); + final _routeGraphicsOverlay = GraphicsOverlay(); + final _searchController = TextEditingController(); + final _fromController = TextEditingController(); + final _toController = TextEditingController(); + final _focusNode = FocusNode(); + final _fromFocusNode = FocusNode(); + final _toFocusNode = FocusNode(); - // Slide-over controllers final _categorySheetController = DraggableScrollableController(); final _detailSheetController = DraggableScrollableController(); - // Service base URL - static const _BASE_URL = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; - - // Config -- loaded on init, gates map setup + // --------------------------------------------------------------------------- + // Map State & Services + // --------------------------------------------------------------------------- EsriMapConfig? _config; + final _locationDataSource = SystemLocationDataSource(); + bool _locationStarted = false; - // SharedPreferences key for recent searches - static const _RECENT_SEARCHES_KEY = 'esri_map_recent_searches'; - static const _MAX_RECENT_SEARCHES = 5; - - // Search state + // Search State List _searchResults = []; - List _allPoiClasses = []; // all distinct Class values from the server - List _matchingPoiClasses = []; // live-filtered subset while typing + List _allPoiClasses = []; + List _matchingPoiClasses = []; bool _showResults = false; bool _isSearching = false; bool _showSuggestions = false; - - // Recent searches List _recentSearches = []; - // Detail slide-over state + // Active Category & Pin Plotting State MapSearchResult? _selectedResult; MapSearchResult? _lastSelectedResult; - - // Results currently plotted as pins on the map (from category search) List _mappedResults = []; - - // Full unfiltered result set for the active category (used by "See All") List _allCategoryResults = []; - - // Whether to show the full category list panel bool _showCategoryList = false; + EsriSearchCategory? _activeCategory; - // The active category (for display in the "See All" label) - _SearchCategory? _activeCategory; - - // FAB active-button highlight state + // FAB & Viewpoint State bool _isLocationActive = false; bool _isRecenterActive = false; bool _ignoreViewpointReset = false; + double _mapRotation = 0.0; + StreamSubscription? _viewpointChangedSubscription; - // Location display - final _locationDataSource = SystemLocationDataSource(); - bool _locationStarted = false; - - // Routing - final _routeGraphicsOverlay = GraphicsOverlay(); + // Routing State bool _isRouting = false; bool _hasRoute = false; - Envelope? _routePaddedExtent; bool _routeFailed = false; String _travelMode = 'Walking'; double _routeTravelTimeMinutes = 0; List _routeManeuvers = []; bool _showRouteFields = false; - final _fromController = TextEditingController(); - final _toController = TextEditingController(); - final _fromFocusNode = FocusNode(); - final _toFocusNode = FocusNode(); String? _activeRouteField; (double, double)? _fromLatLng; MapSearchResult? _routeDestination; - // Basemap switcher + // Basemaps & Operational Layers State BasemapType _currentBasemapType = BasemapType.defaultMap; final Map _basemaps = {}; bool _showLayersPanel = false; - - // Operational layers — keyed by config layer key final Map _layerVisible = {}; final Map _layerLoading = {}; final Map> _layerInstances = {}; final Map _layerTimers = {}; - // Compass - double _mapRotation = 0.0; - StreamSubscription? _viewpointChangedSubscription; + // 3D Scene Widgets & Keys + String _sceneMode = 'default'; + EsriSceneWidget? _scene3DWidget; + EsriSceneWidget? _sceneDroneWidget; + final _scene3DKey = GlobalKey(); + final _sceneDroneKey = GlobalKey(); final _mapReadyCompleter = Completer(); - List<_SearchCategory> get _categories { + /// Returns list of mapped search categories constructed from server configuration. + List get _categories { if (_config == null) return []; return _config!.searchCategories .map( - (c) => _SearchCategory( + (c) => EsriSearchCategory( label: c.label, - icon: _iconDataForName(c.icon), + icon: iconDataForName(c.icon), poiClassValue: c.poiClass, - color: _colorFromHex(c.color), + color: colorFromHex(c.color), ), ) .toList(); } - // Scene mode key — matches keys in config.scenes ('default' | 'building3d' | 'droneView') - String _sceneMode = 'default'; - EsriSceneWidget? _scene3DWidget; - EsriSceneWidget? _sceneDroneWidget; - final _scene3DKey = GlobalKey(); - final _sceneDroneKey = GlobalKey(); - @override bool get wantKeepAlive => true; + // --------------------------------------------------------------------------- + // Lifecycle & Initialization + // --------------------------------------------------------------------------- + @override void initState() { super.initState(); @@ -282,6 +150,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _toFocusNode.addListener(_onToFocusChanged); } + /// Fetches remote configuration JSON before initializing the map. Future _fetchConfigThenInit() async { try { final config = await EsriMapConfigService.instance.fetch(); @@ -295,29 +164,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } - @override - void dispose() { - _categorySheetController.dispose(); - _detailSheetController.dispose(); - _searchController.dispose(); - _fromController.dispose(); - _toController.dispose(); - _fromFocusNode.dispose(); - _toFocusNode.dispose(); - _focusNode.dispose(); - for (final timer in _layerTimers.values) { - timer.cancel(); - } - _viewpointChangedSubscription?.cancel(); - super.dispose(); - } - - void _setupAgeAuthChallengeHandler() { - ArcGISEnvironment.authenticationManager.arcGISAuthenticationChallengeHandler = _AgeAuthChallengeHandler( - EsriMapConfigService.instance.tokensUrl, - ); - } - + /// Constructs initial basemaps and sets initial campus viewpoint. void _initMap(EsriMapConfig config) { for (final type in BasemapType.values) { _basemaps[type] = buildBasemap(type, config); @@ -331,23 +178,28 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapReadyCompleter.complete(); } + /// Configures map view controller, auth handlers, graphics overlays, and viewpoint listeners when ready. void _onMapViewReady() async { await _mapReadyCompleter.future; _setupAgeAuthChallengeHandler(); _mapViewController.arcGISMap = _map; _mapViewController.interactionOptions.rotateEnabled = true; - if (!_mapViewController.graphicsOverlays.contains(_graphicsOverlay)) + + if (!_mapViewController.graphicsOverlays.contains(_graphicsOverlay)) { _mapViewController.graphicsOverlays.add(_graphicsOverlay); - if (!_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay)) + } + if (!_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay)) { _mapViewController.graphicsOverlays.add(_routeGraphicsOverlay); + } - // Wire up location display — blue dot, no auto-pan on start + // Configure location display settings _mapViewController.locationDisplay.dataSource = _locationDataSource; _mapViewController.locationDisplay.autoPanMode = LocationDisplayAutoPanMode.off; _startLocationDisplay(); _preloadAlternateBasemaps(); + // Track map heading rotation changes _viewpointChangedSubscription = _mapViewController.onViewpointChanged.listen((_) { final vp = _mapViewController.getCurrentViewpoint(ViewpointType.centerAndScale); if (vp != null && mounted) { @@ -363,19 +215,47 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); } - void _snapToNorth() { - if (_sceneMode != 'default') { - if (_sceneMode == 'building3d') { - _scene3DKey.currentState?.snapToNorth(); - } else { - _sceneDroneKey.currentState?.snapToNorth(); - } - return; + /// Sets authentication manager challenge handler for Enterprise token retrieval. + void _setupAgeAuthChallengeHandler() { + ArcGISEnvironment.authenticationManager.arcGISAuthenticationChallengeHandler = AgeAuthChallengeHandler( + EsriMapConfigService.instance.tokensUrl, + ); + } + + @override + void dispose() { + _categorySheetController.dispose(); + _detailSheetController.dispose(); + _searchController.dispose(); + _fromController.dispose(); + _toController.dispose(); + _fromFocusNode.dispose(); + _toFocusNode.dispose(); + _focusNode.dispose(); + for (final timer in _layerTimers.values) { + timer.cancel(); + } + _viewpointChangedSubscription?.cancel(); + super.dispose(); + } + + // --------------------------------------------------------------------------- + // Location & Basemaps Helpers + // --------------------------------------------------------------------------- + + /// Starts the device location data source. + Future _startLocationDisplay() async { + try { + await _locationDataSource.start(); + setState(() => _locationStarted = true); + } on ArcGISException catch (e) { + debugPrint('Location error: ${e.message}'); + } catch (e) { + debugPrint('Location error: $e'); } - _mapViewController.setViewpointRotation(angleDegrees: 0); } - ///Loads metadata and style sheets; tile content still fetches lazily once the basemap is applied to the MapView. + /// Preloads non-active basemaps into memory. void _preloadAlternateBasemaps() { for (final entry in _basemaps.entries) { if (entry.key == _currentBasemapType) continue; @@ -385,18 +265,19 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } + /// Switches active basemap without resetting viewpoint frame. void _switchBasemap(BasemapType newType) { if (newType == _currentBasemapType) return; final newBasemap = _basemaps[newType]; if (newBasemap == null) return; - // Setting Map.basemap swaps the underlying layers without changing the current Viewpoint, so the user's view frame is preserved. setState(() { _map.basemap = newBasemap; _currentBasemapType = newType; }); } + /// Switches between 2D map view and 3D portal scene views. void _setSceneMode(String key) { if (key == _sceneMode) return; setState(() { @@ -404,11 +285,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (key != 'default') _showLayersPanel = false; if (_config == null) return; final scene = _config!.scenes[key]; - final isInvalidScene = scene == null || scene.type != 'scene'; - if (isInvalidScene) return; + if (scene == null || scene.type != 'scene') return; final portalUrl = scene.portalKey != null ? _config!.portals[scene.portalKey!] : null; - final isMissingPortalItem = portalUrl == null || scene.itemId == null; - if (isMissingPortalItem) return; + if (portalUrl == null || scene.itemId == null) return; + if (key == 'building3d' && _scene3DWidget == null) { _scene3DWidget = EsriSceneWidget( key: _scene3DKey, @@ -416,8 +296,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { itemId: scene.itemId!, onHeadingChanged: (h) => setState(() { _mapRotation = h; - final shouldResetVP3D = !_ignoreViewpointReset && (_isLocationActive || _isRecenterActive); - if (shouldResetVP3D) { + if (!_ignoreViewpointReset && (_isLocationActive || _isRecenterActive)) { _isLocationActive = false; _isRecenterActive = false; } @@ -430,8 +309,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { itemId: scene.itemId!, onHeadingChanged: (h) => setState(() { _mapRotation = h; - final shouldResetVPDrone = !_ignoreViewpointReset && (_isLocationActive || _isRecenterActive); - if (shouldResetVPDrone) { + if (!_ignoreViewpointReset && (_isLocationActive || _isRecenterActive)) { _isLocationActive = false; _isRecenterActive = false; } @@ -441,6 +319,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); } + /// Toggles visibility of operational layers configured in map settings. void _toggleLayer(String key) async { final entry = _config?.layers[key]; if (entry == null) return; @@ -457,7 +336,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } setState(() => _layerLoading[key] = true); - final instances = _buildLayerInstances(entry); _layerInstances[key] = instances; @@ -486,8 +364,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } Layer? _layerFromSublayer(SublayerEntry sub) { - final isUrlSub = sub.source == 'url' && sub.url != null; - if (isUrlSub) { + if (sub.source == 'url' && sub.url != null) { return sub.url!.contains('FeatureServer') ? FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse(sub.url!))) : ArcGISMapImageLayer.withUri(Uri.parse(sub.url!)); @@ -496,8 +373,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } Layer? _layerFromEntry(LayerEntry entry) { - final isUrlEntry = entry.source == 'url' && entry.url != null; - if (isUrlEntry) { + if (entry.source == 'url' && entry.url != null) { return entry.url!.contains('FeatureServer') ? FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse(entry.url!))) : ArcGISMapImageLayer.withUri(Uri.parse(entry.url!)); @@ -506,10 +382,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _applyLayerSpecialCases(String key, List instances) { - // campusDistricts: show only sublayer id 4 - final isCampusDistricts = - key == 'campusDistricts' && instances.isNotEmpty && instances.first is ArcGISMapImageLayer; - if (isCampusDistricts) { + if (key == 'campusDistricts' && instances.isNotEmpty && instances.first is ArcGISMapImageLayer) { final imageLayer = instances.first as ArcGISMapImageLayer; for (final sub in imageLayer.mapImageSublayers) { sub.isVisible = sub.id == 4; @@ -538,8 +411,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _layerTimers[key] = Timer.periodic(Duration(seconds: interval), (_) async { if (!mounted) return; final instances = _layerInstances[key]; - final isInvalidIndex = instances == null || idx >= instances.length; - if (isInvalidIndex) return; + if (instances == null || idx >= instances.length) return; final oldLayer = instances[idx]; if (oldLayer != null) _map.operationalLayers.remove(oldLayer); @@ -557,191 +429,44 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); } - Future _startLocationDisplay() async { - try { - await _locationDataSource.start(); - setState(() => _locationStarted = true); - } on ArcGISException catch (e) { - debugPrint('Location error: ${e.message}'); - } catch (e) { - debugPrint('Location error: $e'); - } - } - - void _onFocusChanged() { - final isSearchFocusEmpty = _focusNode.hasFocus && _searchController.text.isEmpty; - if (isSearchFocusEmpty) { - setState(() { - _showSuggestions = true; - _showResults = false; - }); - } - } - - void _onFromFocusChanged() { - if (_fromFocusNode.hasFocus) { - setState(() { - _activeRouteField = 'from'; - if (_fromController.text.isEmpty) { - _showSuggestions = true; - _showResults = false; - } - }); - if (_detailSheetController.isAttached) - _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } - } - - void _onToFocusChanged() { - if (_toFocusNode.hasFocus) { - setState(() { - _activeRouteField = 'to'; - if (_toController.text.isEmpty) { - _showSuggestions = true; - _showResults = false; - } - }); - if (_detailSheetController.isAttached) - _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } - } - // --------------------------------------------------------------------------- - // Recent searches persistence + // Search & Recent History Operations // --------------------------------------------------------------------------- Future _loadRecentSearches() async { - final prefs = await SharedPreferences.getInstance(); - final jsonStr = prefs.getString(_RECENT_SEARCHES_KEY); - if (jsonStr != null) { - try { - final list = jsonDecode(jsonStr) as List; - setState(() { - _recentSearches = list.map((e) => MapSearchResult.fromJson(e as Map)).toList(); - }); - } catch (_) { - // ignore corrupted data - } - } - } - - Future _saveRecentSearches() async { - final prefs = await SharedPreferences.getInstance(); - final jsonStr = jsonEncode(_recentSearches.map((r) => r.toJson()).toList()); - await prefs.setString(_RECENT_SEARCHES_KEY, jsonStr); + final searches = await EsriMapSearchService.loadRecentSearches(); + if (mounted) setState(() => _recentSearches = searches); } void _addToRecentSearches(MapSearchResult result) { - // Remove duplicate if exists (match by name + source) _recentSearches.removeWhere((r) => r.name == result.name && r.source == result.source); - // Insert at front _recentSearches.insert(0, result); - // Trim to max - final hasMaxSearches = _recentSearches.length > _MAX_RECENT_SEARCHES; - if (hasMaxSearches) _recentSearches = _recentSearches.sublist(0, _MAX_RECENT_SEARCHES); - _saveRecentSearches(); + if (_recentSearches.length > EsriMapSearchService.maxRecentSearches) { + _recentSearches = _recentSearches.sublist(0, EsriMapSearchService.maxRecentSearches); + } + EsriMapSearchService.saveRecentSearches(_recentSearches); } void _removeFromRecentSearches(int index) { - setState(() { - _recentSearches.removeAt(index); - }); - _saveRecentSearches(); - } - - // --------------------------------------------------------------------------- - // Query helpers - // --------------------------------------------------------------------------- - - /// GET from the REST API. - Future> _apiGet(String path, [Map? params]) async { - final uri = Uri.parse('$_BASE_URL/$path').replace(queryParameters: params); - final response = await http.get(uri); - final isResNotOk = response.statusCode != 200; - if (isResNotOk) throw Exception('API error ${response.statusCode}: ${response.body}'); - return jsonDecode(response.body) as Map; - } - - Future> _apiPost(String path, Map body) async { - final response = await http.post( - Uri.parse('$_BASE_URL/$path'), - headers: {'Content-Type': 'application/json'}, - body: jsonEncode(body), - ); - final isResNotOk = response.statusCode != 200; - if (isResNotOk) throw Exception('API error ${response.statusCode}: ${response.body}'); - return jsonDecode(response.body) as Map; - } - - Future> _queryBuildings(String query) async { - final data = await _apiGet('buildings', {'q': query}); - return (data['results'] as List? ?? []) - .map((r) { - return MapSearchResult( - name: r['name'] as String? ?? 'Unknown Building', - subtitle: r['subtitle'] as String? ?? 'Building', - latitude: (r['latitude'] as num?)?.toDouble() ?? 0.0, - longitude: (r['longitude'] as num?)?.toDouble() ?? 0.0, - source: MapSearchSource.building, - address: r['address'] as String? ?? '', - ); - }) - .where((r) => r.latitude != 0.0 && r.longitude != 0.0) - .toList(); + setState(() => _recentSearches.removeAt(index)); + EsriMapSearchService.saveRecentSearches(_recentSearches); } Future _fetchAllPoiClasses() async { - try { - final data = await _apiGet('poi/classes'); - final classes = (data['classes'] as List? ?? []).map((c) => c as String).toList(); - setState(() => _allPoiClasses = classes); - } catch (e) { - debugPrint('Failed to fetch POI classes: $e'); - } - } - - Future> _queryPOIs(String query) async { - final data = await _apiGet('poi', {'q': query}); - return _parsePOIResults(data); - } - - Future> _queryPOIsByClass(String classValue) async { - final data = await _apiGet('poi', {'class': classValue, 'limit': '100'}); - return _parsePOIResults(data); - } - - List _parsePOIResults(Map data) { - return (data['results'] as List? ?? []) - .map((r) { - return MapSearchResult( - name: r['name'] as String? ?? 'Unknown POI', - subtitle: r['subtitle'] as String? ?? '', - latitude: (r['latitude'] as num?)?.toDouble() ?? 0.0, - longitude: (r['longitude'] as num?)?.toDouble() ?? 0.0, - source: MapSearchSource.poi, - description: r['description'] as String? ?? '', - websiteUrl: r['websiteUrl'] as String?, - ); - }) - .where((r) => r.latitude != 0.0 && r.longitude != 0.0) - .toList(); + final classes = await EsriMapSearchService.fetchAllPoiClasses(); + if (mounted) setState(() => _allPoiClasses = classes); } - // --------------------------------------------------------------------------- - // Search actions - // --------------------------------------------------------------------------- - - /// Text search: query both buildings and POIs in parallel. + /// Text search: queries buildings and POIs concurrently. Future _performSearch(String query) async { if (query.trim().isEmpty) return; - // Recompute category matches on submit final q = query.toLowerCase(); final matched = _allPoiClasses.where((c) => c.toLowerCase().contains(q)).toList(); for (final cat in _categories) { - final matchesCategory = cat.poiClassValue.toLowerCase().contains(q) && !matched.contains(cat.poiClassValue); - if (matchesCategory) matched.insert(0, cat.poiClassValue); + final matchesCat = cat.poiClassValue.toLowerCase().contains(q) && !matched.contains(cat.poiClassValue); + if (matchesCat) matched.insert(0, cat.poiClassValue); } setState(() { @@ -753,62 +478,76 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); try { - final results = await Future.wait([_queryBuildings(query), _queryPOIs(query)]); + final results = await Future.wait([ + EsriMapSearchService.queryBuildings(query), + EsriMapSearchService.queryPOIs(query), + ]); final merged = [...results[0], ...results[1]]; - setState(() { - _searchResults = merged; - _isSearching = false; - }); + if (mounted) { + setState(() { + _searchResults = merged; + _isSearching = false; + }); + } } catch (e) { - print('Search error: $e'); - setState(() { - _searchResults = []; - _isSearching = false; - }); + debugPrint('Search error: $e'); + if (mounted) { + setState(() { + _searchResults = []; + _isSearching = false; + }); + } } } - /// Returns the current visible map extent projected to WGS84. - Envelope? _getViewportEnvelopeWGS84() { - final vp = _mapViewController.getCurrentViewpoint(ViewpointType.boundingGeometry); - if (vp == null) return null; - final geom = vp.targetGeometry; - if (geom == null) return null; - final projected = GeometryEngine.project(geom, outputSpatialReference: SpatialReference.wgs84); - return projected as Envelope?; - } - - /// Filters a result list to only those within the current map viewport. - /// Returns the full list unchanged if the envelope can't be determined. - List _filterToViewport(List results) { - final env = _getViewportEnvelopeWGS84(); - if (env == null) return results; - return results.where((r) { - return r.latitude >= env.yMin && r.latitude <= env.yMax && r.longitude >= env.xMin && r.longitude <= env.xMax; - }).toList(); - } - - /// distance in meters between two WGS84 points - double _distanceMeters(double lat1, double lng1, double lat2, double lng2) { - const r = 6371000.0; - final dLat = (lat2 - lat1) * math.pi / 180; - final dLng = (lng2 - lng1) * math.pi / 180; - final a = - math.sin(dLat / 2) * math.sin(dLat / 2) + - math.cos(lat1 * math.pi / 180) * math.cos(lat2 * math.pi / 180) * math.sin(dLng / 2) * math.sin(dLng / 2); - return r * 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a)); - } - - /// Returns the user's current WGS84 lat/lng, or null if unavailable. - (double lat, double lng)? _getUserLatLng() { - final pos = _mapViewController.locationDisplay.location?.position; - if (pos == null) return null; - final wgs = GeometryEngine.project(pos, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; - if (wgs == null) return null; - return (wgs.y, wgs.x); + /// Category search: queries POIs filtered by class and plots pins on the map. + Future _performCategorySearch(EsriSearchCategory category) async { + setState(() { + _isSearching = true; + _showResults = false; + _showSuggestions = false; + _matchingPoiClasses = []; + _selectedResult = null; + _showCategoryList = false; + _activeCategory = category; + _searchController.text = category.label; + }); + _focusNode.unfocus(); + _fromFocusNode.unfocus(); + _toFocusNode.unfocus(); + + try { + final allResults = await EsriMapSearchService.queryPOIsByClass(category.poiClassValue); + _plotResultsOnMap(allResults); + + setState(() { + _allCategoryResults = allResults; + _showCategoryList = allResults.isNotEmpty; + _isSearching = false; + }); + } catch (e) { + debugPrint('Category search error: $e'); + setState(() { + _mappedResults = []; + _allCategoryResults = []; + _isSearching = false; + }); + } + } + + Future _performClassSearch(String classValue) async { + final category = EsriSearchCategory( + label: _labelForClass(classValue), + icon: _iconForClass(classValue), + poiClassValue: classValue, + ); + await _performCategorySearch(category); } - /// Plot a list of results as pins on the map. + // --------------------------------------------------------------------------- + // Map Graphics & Pin Plotting + // --------------------------------------------------------------------------- + void _plotResultsOnMap(List results) { _graphicsOverlay.graphics.clear(); _mappedResults = results; @@ -819,13 +558,11 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { geometry: point, symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.red, size: 14), ); - // Store the list index so we can retrieve the result on tap graphic.attributes['resultIndex'] = i; _graphicsOverlay.graphics.add(graphic); } } - /// Zoom the map to fit all mapped results, with padding. void _zoomToResults(List results) { if (results.isEmpty) return; @@ -856,63 +593,12 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(envelope)); } - /// Category search: query POIs filtered by Class. - /// Category search: query POIs filtered by Class and plot all as map pins. - Future _performCategorySearch(_SearchCategory category) async { - setState(() { - _isSearching = true; - _showResults = false; - _showSuggestions = false; - _matchingPoiClasses = []; - _selectedResult = null; - _showCategoryList = false; - _activeCategory = category; - _searchController.text = category.label; - }); - _focusNode.unfocus(); - _fromFocusNode.unfocus(); - _toFocusNode.unfocus(); - - try { - final allResults = await _queryPOIsByClass(category.poiClassValue); - - // Always plot ALL pins — no zoom, no viewport filtering. - // The user pans/zooms freely to discover them. - _plotResultsOnMap(allResults); - - setState(() { - _allCategoryResults = allResults; - _showCategoryList = allResults.isNotEmpty; - _isSearching = false; - }); - } catch (e) { - print('Category search error: $e'); - setState(() { - _mappedResults = []; - _allCategoryResults = []; - _isSearching = false; - }); - } - } - - /// Triggers a category-style search from a raw POI class string. - Future _performClassSearch(String classValue) async { - final category = _SearchCategory( - label: _labelForClass(classValue), - icon: _iconForClass(classValue), - poiClassValue: classValue, - ); - await _performCategorySearch(category); - } - - /// Plots all results for the active category void _seeAllCategoryResults() { if (_allCategoryResults.isEmpty) return; _zoomToResults(_allCategoryResults); } void _selectResult(MapSearchResult result) { - // Handle result selection within route fields if (_showRouteFields && _activeRouteField != null) { if (_activeRouteField == 'from') { _fromController.text = result.name; @@ -927,7 +613,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _activeCategory = null; }); _fromFocusNode.unfocus(); - // Re-solve route if we already have a destination if (_routeDestination != null) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); } else if (_activeRouteField == 'to') { _toController.text = result.name; @@ -951,9 +636,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } _graphicsOverlay.graphics.clear(); - final point = ArcGISPoint(x: result.longitude, y: result.latitude, spatialReference: SpatialReference.wgs84); - final graphic = Graphic( geometry: point, symbol: SimpleMarkerSymbol( @@ -974,15 +657,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _lastSelectedResult = result; }); _focusNode.unfocus(); - - // Save to recent searches _addToRecentSearches(result); } - /// Called when the ArcGISMapView is tapped - /// Identifies any graphic at the tap location and shows its detail panel Future _onMapTap(Offset screenPoint) async { - // Dismiss any open dropdowns first if (_showSuggestions || _showResults) { setState(() { _showSuggestions = false; @@ -992,7 +670,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return; } - // Only attempt identify when pins are on the map if (_mappedResults.isEmpty) { if (_selectedResult != null) _closeDetail(); return; @@ -1009,21 +686,18 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (identifyResult.graphics.isNotEmpty) { final tappedGraphic = identifyResult.graphics.first; final index = tappedGraphic.attributes['resultIndex'] as int?; - final isValidResultIndex = index != null && index >= 0 && index < _mappedResults.length; - if (isValidResultIndex) _selectResultFromPin(_mappedResults[index]); + if (index != null && index >= 0 && index < _mappedResults.length) { + _selectResultFromPin(_mappedResults[index]); + } } else { - // Tapped empty space — close detail if open if (_selectedResult != null) _closeDetail(); } } catch (e) { - print('Identify error: $e'); + debugPrint('Identify error: $e'); } } - /// Select a result from a map pin tap - /// keeps all existing category pins visible void _selectResultFromPin(MapSearchResult result) { - // In routing mode, treat pin tap based on active route field if (_showRouteFields) { if (_activeRouteField == 'from') { _fromController.text = result.name; @@ -1061,7 +735,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } final point = ArcGISPoint(x: result.longitude, y: result.latitude, spatialReference: SpatialReference.wgs84); - _mapViewController.setViewpointAnimated(Viewpoint.fromCenter(point, scale: 5000)); setState(() { @@ -1077,7 +750,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _closeDetail() { - // If a category search is active and not in routing mode, reopen the list view final canShowCategoryResults = _allCategoryResults.isNotEmpty && !_showRouteFields && !_hasRoute && !_routeFailed; if (canShowCategoryResults) { setState(() { @@ -1097,7 +769,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final loc = _mapViewController.locationDisplay.location; if (loc == null) return; - // Briefly snap to recenter mode, then release back to free pan _mapViewController.locationDisplay.autoPanMode = LocationDisplayAutoPanMode.recenter; _ignoreViewpointReset = true; setState(() => _isLocationActive = true); @@ -1123,7 +794,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } return; } - final hasLastResultNoMapped = _lastSelectedResult != null && _mappedResults.isEmpty; + if (_selectedResult != null) { _mapViewController.setViewpointAnimated( Viewpoint.fromCenter( @@ -1135,8 +806,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { scale: 5000, ), ); - } else if (hasLastResultNoMapped) { - // Single pin on map, slide-over closed + } else if (_lastSelectedResult != null && _mappedResults.isEmpty) { _mapViewController.setViewpointAnimated( Viewpoint.fromCenter( ArcGISPoint( @@ -1148,7 +818,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), ); } else if (_mappedResults.isNotEmpty) { - // Category pins on map _zoomToResults(_mappedResults); } else { _mapViewController.setViewpointAnimated( @@ -1160,6 +829,18 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } + void _snapToNorth() { + if (_sceneMode != 'default') { + if (_sceneMode == 'building3d') { + _scene3DKey.currentState?.snapToNorth(); + } else { + _sceneDroneKey.currentState?.snapToNorth(); + } + return; + } + _mapViewController.setViewpointRotation(angleDegrees: 0); + } + void _clearSearch() { _searchController.clear(); _fromController.clear(); @@ -1189,29 +870,47 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); } - Future _launchWebsite(String url) async { - final uri = Uri.parse(url); - if (await canLaunchUrl(uri)) await launchUrl(uri, mode: LaunchMode.externalApplication); + void _clearRoute() { + _routeGraphicsOverlay.graphics.clear(); + final destination = _selectedResult; + if (destination != null) { + final point = ArcGISPoint( + x: destination.longitude, + y: destination.latitude, + spatialReference: SpatialReference.wgs84, + ); + _graphicsOverlay.graphics.clear(); + _graphicsOverlay.graphics.add( + Graphic( + geometry: point, + symbol: SimpleMarkerSymbol( + style: SimpleMarkerSymbolStyle.circle, + color: destination.source == MapSearchSource.building ? Colors.blue : Colors.red, + size: 14, + ), + ), + ); + _mapViewController.setViewpointAnimated(Viewpoint.fromCenter(point, scale: 5000)); + } + + setState(() { + _hasRoute = false; + _routeFailed = false; + _travelMode = 'Walking'; + _routeTravelTimeMinutes = 0; + _routeManeuvers = []; + _showRouteFields = false; + _activeRouteField = null; + _fromLatLng = null; + _routeDestination = null; + }); } // --------------------------------------------------------------------------- - // Routing + // Route Navigation Solver // --------------------------------------------------------------------------- - /* Future _launchDirections(MapSearchResult result) async { - final uri = Uri.parse( - 'https://www.google.com/maps/dir/?api=1' - '&destination=${result.latitude},${result.longitude}', - ); - if (await canLaunchUrl(uri)) await launchUrl(uri, mode: LaunchMode.externalApplication); - } */ - - static const _ROUTE_SERVICE_URL = - 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/' - 'Wayfinding/Campus_Wayfinding_Network/NAServer/Route'; - Future _solveRoute(MapSearchResult destination, {String? travelMode, (double, double)? originLatLng}) async { - // Use provided origin or fall back to GPS final userLatLng = originLatLng ?? _getUserLatLng(); if (userLatLng == null) { setState(() => _isRouting = false); @@ -1219,118 +918,122 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } final mode = travelMode ?? _travelMode; - setState(() { _isRouting = true; _routeFailed = false; _travelMode = mode; }); - try { - final routeTask = RouteTask.withUri(Uri.parse(_ROUTE_SERVICE_URL)); - await routeTask.load(); - - final params = await routeTask.createDefaultParameters(); - params.returnDirections = true; - final taskInfo = routeTask.getRouteTaskInfo(); - final matchingMode = taskInfo.travelModes.where((m) => m.name == mode).firstOrNull; - if (matchingMode != null) params.travelMode = matchingMode; - - final origin = Stop(ArcGISPoint(x: userLatLng.$2, y: userLatLng.$1, spatialReference: SpatialReference.wgs84)); - final dest = Stop( - ArcGISPoint(x: destination.longitude, y: destination.latitude, spatialReference: SpatialReference.wgs84), - ); - params.setStops([origin, dest]); + final routeRes = await EsriMapRouteService.solveRoute( + originLatLng: userLatLng, + destination: destination, + travelMode: mode, + ); - final result = await routeTask.solveRoute(params); - if (result.routes.isEmpty) { + if (routeRes == null) { + if (mounted) { setState(() { _isRouting = false; _routeFailed = true; }); - return; } + return; + } - final route = result.routes.first; - _routeTravelTimeMinutes = route.totalTime; - _routeManeuvers = route.directionManeuvers; - - final routeGeometry = route.routeGeometry; - if (routeGeometry == null) { - setState(() { - _isRouting = false; - _routeFailed = true; - }); - return; - } + _routeTravelTimeMinutes = routeRes.travelTimeMinutes; + _routeManeuvers = routeRes.directionManeuvers; - _routeGraphicsOverlay.graphics.clear(); - final routeGraphic = Graphic( - geometry: routeGeometry, - symbol: SimpleLineSymbol(style: SimpleLineSymbolStyle.solid, color: Colors.blue, width: 4), + _routeGraphicsOverlay.graphics.clear(); + if (routeRes.routeGeometry != null) { + _routeGraphicsOverlay.graphics.add( + Graphic( + geometry: routeRes.routeGeometry!, + symbol: SimpleLineSymbol(style: SimpleLineSymbolStyle.solid, color: Colors.blue, width: 4), + ), ); - _routeGraphicsOverlay.graphics.add(routeGraphic); + } - // End point marker - final whiteOutline = SimpleLineSymbol(style: SimpleLineSymbolStyle.solid, color: Colors.white, width: 2); + final whiteOutline = SimpleLineSymbol(style: SimpleLineSymbolStyle.solid, color: Colors.white, width: 2); + _routeGraphicsOverlay.graphics.add( + Graphic( + geometry: ArcGISPoint( + x: destination.longitude, + y: destination.latitude, + spatialReference: SpatialReference.wgs84, + ), + symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.red, size: 12) + ..outline = whiteOutline, + ), + ); + + if (originLatLng != null) { _routeGraphicsOverlay.graphics.add( Graphic( - geometry: ArcGISPoint( - x: destination.longitude, - y: destination.latitude, - spatialReference: SpatialReference.wgs84, - ), - symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.red, size: 12) + geometry: ArcGISPoint(x: originLatLng.$2, y: originLatLng.$1, spatialReference: SpatialReference.wgs84), + symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.blue, size: 12) ..outline = whiteOutline, ), ); + } - // Start point marker (only when origin is not GPS) - if (originLatLng != null) { - _routeGraphicsOverlay.graphics.add( - Graphic( - geometry: ArcGISPoint(x: originLatLng.$2, y: originLatLng.$1, spatialReference: SpatialReference.wgs84), - symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.blue, size: 12) - ..outline = whiteOutline, - ), - ); - } + if (routeRes.paddedExtent != null) { + _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(routeRes.paddedExtent!)); + } - // Zoom to the route extent with extra bottom padding so the line - // stays centred in the visible map area above the detail slide-over. - final extent = routeGeometry.extent; - final dx = extent.width * 0.2; - final dyTop = extent.height * 0.5; - final dyBottom = extent.height * 0.75; - final paddedExtent = Envelope.fromXY( - xMin: extent.xMin - dx, - yMin: extent.yMin - dyBottom, - xMax: extent.xMax + dx, - yMax: extent.yMax + dyTop, - spatialReference: extent.spatialReference, - ); - _routePaddedExtent = paddedExtent; - _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(paddedExtent)); + _graphicsOverlay.graphics.clear(); + _mappedResults = []; + _allCategoryResults = []; - _graphicsOverlay.graphics.clear(); - _mappedResults = []; - _allCategoryResults = []; + setState(() { + _isRouting = false; + _hasRoute = true; + _showCategoryList = false; + _activeCategory = null; + _selectedResult = destination; + _lastSelectedResult = destination; + }); + } - setState(() { - _isRouting = false; - _hasRoute = true; - _showCategoryList = false; - _activeCategory = null; - _selectedResult = destination; - _lastSelectedResult = destination; - }); - } catch (e) { - debugPrint('Route solve error: $e'); - setState(() { - _isRouting = false; - _routeFailed = true; - }); - } + // --------------------------------------------------------------------------- + // Helper getters & AI callbacks + // --------------------------------------------------------------------------- + + (double lat, double lng)? _getUserLatLng() { + final pos = _mapViewController.locationDisplay.location?.position; + if (pos == null) return null; + final wgs = GeometryEngine.project(pos, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; + if (wgs == null) return null; + return (wgs.y, wgs.x); + } + + Envelope? _getViewportEnvelopeWGS84() { + final vp = _mapViewController.getCurrentViewpoint(ViewpointType.boundingGeometry); + final geom = vp?.targetGeometry; + if (geom == null) return null; + final projected = GeometryEngine.project(geom, outputSpatialReference: SpatialReference.wgs84); + return projected as Envelope?; + } + + IconData _iconForResult(MapSearchResult result) => + result.source == MapSearchSource.building ? Icons.business : Icons.place; + + IconData _iconForClass(String classValue) { + return _categories + .firstWhere( + (c) => c.poiClassValue.toLowerCase() == classValue.toLowerCase(), + orElse: () => const EsriSearchCategory(label: '', icon: Icons.place, poiClassValue: ''), + ) + .icon; + } + + String _labelForClass(String classValue) { + final match = _categories.where((c) => c.poiClassValue.toLowerCase() == classValue.toLowerCase()); + return match.isNotEmpty ? match.first.label : classValue; + } + + Future _launchWebsite(String url) async { + final uri = Uri.parse(url); + if (await canLaunchUrl(uri)) await launchUrl(uri, mode: LaunchMode.externalApplication); } void _onAiLocationSelected(AiSearchResult result) { @@ -1353,772 +1056,110 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { address: result.address, ); setState(() { - _selectedResult = mapResult; - _lastSelectedResult = mapResult; _showResults = false; _showSuggestions = false; + _selectedResult = mapResult; + _lastSelectedResult = mapResult; }); + _addToRecentSearches(mapResult); } void _onAiRouteRequested(List stops) { - if (stops.length < 2) return; - final first = stops.first; - final last = stops.last; - final destination = MapSearchResult( - name: last.name, - subtitle: last.subtitle, - latitude: last.latitude, - longitude: last.longitude, + if (stops.isEmpty) return; + + final AiSearchResult destination = stops.last; + final AiSearchResult? origin = stops.length >= 2 ? stops.first : null; + + final destResult = MapSearchResult( + name: destination.name, + subtitle: destination.subtitle, + latitude: destination.latitude, + longitude: destination.longitude, source: MapSearchSource.poi, - address: last.address, + address: destination.address, ); + + if (origin != null) { + _fromController.text = origin.name; + _fromLatLng = (origin.latitude, origin.longitude); + } else { + final gps = _getUserLatLng(); + _fromController.text = gps != null ? 'My Location' : ''; + _fromLatLng = gps; + } + _toController.text = destination.name; - _routeDestination = destination; - final gps = _getUserLatLng(); - _fromController.text = gps != null ? 'My Location' : first.name; - _fromLatLng = gps ?? (first.latitude, first.longitude); + _routeDestination = destResult; _graphicsOverlay.graphics.clear(); setState(() { _showRouteFields = true; - _selectedResult = destination; - _lastSelectedResult = destination; + _selectedResult = null; _mappedResults = []; _allCategoryResults = []; _showCategoryList = false; _activeCategory = null; }); - _solveRoute(destination, originLatLng: _fromLatLng); + _solveRoute(destResult, originLatLng: _fromLatLng); } - void _clearRoute() { - _routeGraphicsOverlay.graphics.clear(); - _fromController.clear(); - _toController.clear(); - _routePaddedExtent = null; - - // Re-add destination pin and center on it if a result is still selected - final destination = _selectedResult; - if (destination != null) { - final point = ArcGISPoint( - x: destination.longitude, - y: destination.latitude, - spatialReference: SpatialReference.wgs84, - ); - _graphicsOverlay.graphics.clear(); - _graphicsOverlay.graphics.add( - Graphic( - geometry: point, - symbol: SimpleMarkerSymbol( - style: SimpleMarkerSymbolStyle.circle, - color: destination.source == MapSearchSource.building ? Colors.blue : Colors.red, - size: 14, - ), - ), - ); - _mapViewController.setViewpointAnimated(Viewpoint.fromCenter(point, scale: 5000)); + void _onFocusChanged() { + if (_focusNode.hasFocus && _searchController.text.isEmpty) { + setState(() { + _showSuggestions = true; + _showResults = false; + }); } - - setState(() { - _hasRoute = false; - _routeFailed = false; - _travelMode = 'Walking'; - _routeTravelTimeMinutes = 0; - _routeManeuvers = []; - _showRouteFields = false; - _activeRouteField = null; - _fromLatLng = null; - _routeDestination = null; - }); - } - - IconData _iconForResult(MapSearchResult result) => - result.source == MapSearchSource.building ? Icons.business : Icons.place; - - /// Returns the icon for a POI class — uses the hardcoded category icon if one - /// exists, otherwise falls back to a generic place icon. - IconData _iconForClass(String classValue) { - return _categories - .firstWhere( - (c) => c.poiClassValue.toLowerCase() == classValue.toLowerCase(), - orElse: () => const _SearchCategory(label: '', icon: Icons.place, poiClassValue: ''), - ) - .icon; - } - - /// Converts a raw class value like "Food and Beverage" into a display label. - /// Uses the hardcoded category label if available, otherwise returns as-is. - String _labelForClass(String classValue) { - final match = _categories.where((c) => c.poiClassValue.toLowerCase() == classValue.toLowerCase()); - return match.isNotEmpty ? match.first.label : classValue; } - // --------------------------------------------------------------------------- - // Suggestions panel (categories + recent searches) - // --------------------------------------------------------------------------- - - Widget _buildSuggestionsPanel(BuildContext context) { - final isDark = Theme.of(context).brightness == Brightness.dark; - final bgColor = isDark ? Colors.grey[850] : Colors.white; - - return Material( - elevation: 4, - borderRadius: BorderRadius.circular(8), - color: bgColor, - child: Padding( - padding: EdgeInsets.only(top: (_showRouteFields && _activeRouteField == 'from') ? 0 : 12, bottom: 12), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // user location from from field in routing mode - if (_showRouteFields && _activeRouteField == 'from') ...[ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - final gps = _getUserLatLng(); - if (gps == null) return; - _fromController.text = 'My Location'; - _fromLatLng = gps; - setState(() { - _showSuggestions = false; - _showResults = false; - }); - _fromFocusNode.unfocus(); - if (_routeDestination != null) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); - }, - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 16, vertical: 20), - child: Row( - children: [ - Icon( - Icons.my_location, - size: 20, - color: isDark ? Colors.grey[500] : Theme.of(context).colorScheme.primary, - ), - SizedBox(width: 12), - Text( - 'Current Location', - style: TextStyle( - fontSize: 15, - fontWeight: FontWeight.w500, - color: isDark ? Colors.white : Theme.of(context).colorScheme.primary, - ), - ), - ], - ), - ), - ), - Divider(height: 1), - SizedBox(height: 12), - ], - // Category section header - Padding( - padding: EdgeInsets.symmetric(horizontal: 16), - child: Text( - 'Suggested', - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w600, - color: isDark ? Colors.grey[400] : Colors.grey[600], - ), - ), - ), - SizedBox(height: 12), - - // Category icons row - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: _categories.map((cat) => _buildCategoryChip(context, cat)).toList(), - ), - ), - - // Recent searches section - if (_recentSearches.isNotEmpty) ...[ - SizedBox(height: 16), - Divider(height: 1), - SizedBox(height: 8), - Padding( - padding: EdgeInsets.symmetric(horizontal: 16), - child: Text( - 'Recently viewed', - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w600, - color: isDark ? Colors.grey[400] : Colors.grey[600], - ), - ), - ), - SizedBox(height: 4), - ...List.generate(_recentSearches.length, (index) { - final recent = _recentSearches[index]; - return ListTile( - splashColor: Colors.transparent, - dense: true, - leading: Icon(Icons.history, size: 20, color: isDark ? Colors.grey[500] : Colors.grey[400]), - title: Text(recent.name, maxLines: 1, overflow: TextOverflow.ellipsis), - trailing: GestureDetector( - onTap: () => _removeFromRecentSearches(index), - child: Icon(Icons.close, size: 16, color: isDark ? Colors.grey[500] : Colors.grey[400]), - ), - onTap: () => _selectResult(recent), - ); - }), - ], - ], - ), - ), - ); + void _onFromFocusChanged() { + if (_fromFocusNode.hasFocus) { + setState(() { + _activeRouteField = 'from'; + if (_fromController.text.isEmpty) { + _showSuggestions = true; + _showResults = false; + } + }); + if (_detailSheetController.isAttached) { + _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + } + } } - Widget _buildCategoryChip(BuildContext context, _SearchCategory category) { - final isDark = Theme.of(context).brightness == Brightness.dark; - - return GestureDetector( - onTap: () => _performCategorySearch(category), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Container( - width: 56, - height: 56, - decoration: BoxDecoration(color: category.color, shape: BoxShape.circle), - child: Icon(category.icon, size: 24, color: Colors.black), - ), - SizedBox(height: 6), - Text(category.label, style: TextStyle(fontSize: 13, color: isDark ? Colors.grey[400] : Colors.grey[600])), - ], - ), - ); + void _onToFocusChanged() { + if (_toFocusNode.hasFocus) { + setState(() { + _activeRouteField = 'to'; + if (_toController.text.isEmpty) { + _showSuggestions = true; + _showResults = false; + } + }); + if (_detailSheetController.isAttached) { + _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + } + } } - // --------------------------------------------------------------------------- - // Map interaction → collapse slideover - // --------------------------------------------------------------------------- - void _onMapPointerDown(PointerDownEvent _) { - // Close layers panel when user touches the map if (_showLayersPanel) { setState(() => _showLayersPanel = false); return; } - // Collapse whichever sheet is active to the minimum snap - if (_showCategoryList && _selectedResult == null) - if (_categorySheetController.isAttached) + if (_showCategoryList && _selectedResult == null) { + if (_categorySheetController.isAttached) { _categorySheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - if (_selectedResult != null) - if (_detailSheetController.isAttached) + } + } + if (_selectedResult != null) { + if (_detailSheetController.isAttached) { _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } - - // --------------------------------------------------------------------------- - // Shared slide-over template - // --------------------------------------------------------------------------- - - /// Builds a consistent DraggableScrollableSheet with a pinned header. - /// [headerTitle] and [headerIcon] are shown in the header row. - /// [onClose] is called when the X button is tapped. - /// [trailing] is an optional widget shown before the close button (e.g. "Search here"). - /// [sliverBody] is the scrollable content below the header. - static const _SLIDE_OVER_HEADER_HEIGHT = 80.0; - - Widget _buildSlideOverContent({ - required BuildContext context, - required ScrollController scrollController, - required String headerTitle, - IconData? headerIcon, - required VoidCallback onClose, - Widget? trailing, - required List sliverBody, - }) { - final isDark = Theme.of(context).brightness == Brightness.dark; - final bgColor = isDark ? Colors.grey[900]! : Colors.white; - - return Material( - elevation: 8, - color: bgColor, - borderRadius: const BorderRadius.vertical(top: Radius.circular(16)), - clipBehavior: Clip.antiAlias, - child: CustomScrollView( - controller: scrollController, - slivers: [ - SliverPersistentHeader( - pinned: true, - delegate: _SlideOverHeaderDelegate( - height: _SLIDE_OVER_HEADER_HEIGHT, - backgroundColor: bgColor, - child: Column( - children: [ - // Drag handle - Padding( - padding: const EdgeInsets.only(top: 10, bottom: 4), - child: Container( - width: 36, - height: 4, - decoration: BoxDecoration( - color: isDark ? Colors.grey[700] : Colors.grey[300], - borderRadius: BorderRadius.circular(2), - ), - ), - ), - // Header row - Padding( - padding: const EdgeInsets.fromLTRB(20, 6, 20, 8), - child: Row( - children: [ - if (headerIcon != null) ...[ - Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), - const SizedBox(width: 8), - ], - Expanded( - child: Text( - headerTitle, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - color: isDark ? Colors.white : Colors.grey[900], - ), - ), - ), - if (trailing != null) trailing!, - GestureDetector( - onTap: onClose, - child: Container( - width: 34, - height: 34, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: isDark ? Colors.grey[800] : Colors.grey[200], - ), - child: Icon(Icons.close, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), - ), - ), - ], - ), - ), - ], - ), - ), - ), - // Divider below header - SliverToBoxAdapter(child: Divider(height: 1)), - ...sliverBody, - ], - ), - ); - } - - // --------------------------------------------------------------------------- - // List view - // --------------------------------------------------------------------------- - Widget _buildCategoryListPanel(BuildContext context) { - final isDark = Theme.of(context).brightness == Brightness.dark; - final label = _activeCategory?.label ?? 'Results'; - - final viewport = _filterToViewport(_allCategoryResults); - final userPos = _getUserLatLng(); - final results = List.from(viewport); - if (userPos != null) { - results.sort( - (a, b) => _distanceMeters( - userPos.$1, - userPos.$2, - a.latitude, - a.longitude, - ).compareTo(_distanceMeters(userPos.$1, userPos.$2, b.latitude, b.longitude)), - ); + } } - - // Content-aware sizing: estimate content height as fraction of screen - final screenHeight = MediaQuery.of(context).size.height; - // Each list tile ~56px + header ~80px + divider - final contentHeight = _SLIDE_OVER_HEADER_HEIGHT + (results.length * 56.0).clamp(56.0, 600.0); - final contentFraction = (contentHeight / screenHeight).clamp(0.15, 0.80); - final initialSize = contentFraction < 0.45 ? contentFraction : 0.45; - final maxSize = contentFraction < 0.80 ? contentFraction.clamp(0.45, 0.80) : 0.80; - // Snap sizes must be strictly increasing and within [min, max] - final snaps = [0.15]; - if (initialSize > 0.15 + 0.01) snaps.add(initialSize); - - return DraggableScrollableSheet( - controller: _categorySheetController, - initialChildSize: initialSize, - minChildSize: 0.15, - maxChildSize: maxSize, - snap: true, - snapSizes: snaps, - builder: (context, scrollController) { - final headerTitle = results.isEmpty ? '$label - None in view' : '$label - ${results.length} in view'; - - return _buildSlideOverContent( - context: context, - scrollController: scrollController, - headerTitle: headerTitle, - headerIcon: _activeCategory?.icon ?? Icons.place, - onClose: _clearSearch, - trailing: _allCategoryResults.length > results.length - ? TextButton.icon( - icon: Icon(Icons.layers_outlined, size: 16, color: isDark ? Colors.white54 : Colors.grey[600]), - label: Text( - 'See all ${_allCategoryResults.length} results', - style: TextStyle(fontSize: 13, color: isDark ? Colors.white54 : Colors.grey[600]), - ), - style: TextButton.styleFrom( - tapTargetSize: MaterialTapTargetSize.shrinkWrap, - minimumSize: Size.zero, - padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), - ), - onPressed: _seeAllCategoryResults, - ) - : null, - sliverBody: results.isEmpty - ? [ - SliverToBoxAdapter( - child: Padding( - padding: const EdgeInsets.all(24), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Icon(Icons.location_off, size: 32, color: isDark ? Colors.grey[600] : Colors.grey[400]), - const SizedBox(height: 8), - Text( - 'No $label in current view.\nPan the map to see results.', - textAlign: TextAlign.center, - style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[500] : Colors.grey[600]), - ), - ], - ), - ), - ), - ] - : [ - SliverList( - delegate: SliverChildBuilderDelegate((context, index) { - final r = results[index]; - final dist = userPos != null - ? _distanceMeters(userPos.$1, userPos.$2, r.latitude, r.longitude) - : null; - final distLabel = dist == null - ? null - : dist < 1000 - ? '${dist.round()} m away' - : '${(dist / 1000).toStringAsFixed(1)} km away'; - final isNotLastResult = index < results.length - 1; - return Column( - children: [ - ListTile( - splashColor: Colors.transparent, - leading: Icon( - _iconForResult(r), - size: 20, - color: isDark ? Colors.grey[400] : Colors.grey[600], - ), - title: Text( - r.name, - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: const TextStyle(fontSize: 16), - ), - subtitle: distLabel != null - ? Text(distLabel, style: TextStyle(fontSize: 13, color: Colors.grey[500])) - : (r.subtitle.isNotEmpty - ? Text( - r.subtitle, - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle(fontSize: 13, color: Colors.grey[500]), - ) - : null), - dense: true, - onTap: () => _selectResultFromPin(r), - ), - if (isNotLastResult) const Divider(height: 1), - ], - ); - }, childCount: results.length), - ), - ], - ); - }, - ); - } - - // --------------------------------------------------------------------------- - // Detail slide-over - // --------------------------------------------------------------------------- - - Widget _buildDetailSlideOver(BuildContext context, MapSearchResult result) { - final isDark = Theme.of(context).brightness == Brightness.dark; - final isRouting = _showRouteFields || _hasRoute || _routeFailed; - - final detailText = result.source == MapSearchSource.building ? result.address : result.description; - final categoryLabel = result.source == MapSearchSource.building ? 'Building' : result.subtitle; - - // Content-aware sizing: estimate how tall the detail content is - final screenHeight = MediaQuery.of(context).size.height; - // header ~80 + name ~30 + detail ~20 + buttons ~48 + padding ~40 - double contentEst = _SLIDE_OVER_HEADER_HEIGHT + 30 + 48 + 40; - if (detailText.isNotEmpty) contentEst += 60; - final hasRouteManeuvers = _hasRoute && _routeManeuvers.isNotEmpty; - if (hasRouteManeuvers) contentEst += _routeManeuvers.length * 52.0; - final contentFraction = (contentEst / screenHeight).clamp(0.15, 0.80); - final initialSize = _hasRoute ? 0.35 : (contentFraction < 0.30 ? contentFraction : 0.30); - final maxSize = _hasRoute ? 0.80 : (contentFraction < 0.80 ? contentFraction.clamp(0.30, 0.80) : 0.80); - // Snap sizes must be strictly increasing and within [min, max] - final snaps = [0.15]; - if (initialSize > 0.15 + 0.01) snaps.add(initialSize); - - return DraggableScrollableSheet( - controller: _detailSheetController, - initialChildSize: initialSize, - minChildSize: 0.15, - maxChildSize: maxSize, - snap: true, - snapSizes: snaps, - builder: (context, scrollController) { - final shouldShowDetailText = !isRouting && detailText.isNotEmpty; - return _buildSlideOverContent( - context: context, - scrollController: scrollController, - headerTitle: isRouting ? 'Directions to ${result.name}' : result.name, - headerIcon: _iconForResult(result), - onClose: isRouting ? _clearRoute : _closeDetail, - sliverBody: [ - SliverToBoxAdapter( - child: Padding( - padding: const EdgeInsets.fromLTRB(20, 8, 20, 12), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // Category label (hidden in routing mode) - if (!isRouting) - Text( - categoryLabel, - style: TextStyle(fontSize: 14, color: isDark ? Colors.grey[400] : Colors.grey[600]), - ), - - // Detail text (hidden in routing mode) - if (shouldShowDetailText) ...[ - const SizedBox(height: 8), - Text( - detailText, - style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[400] : Colors.grey[600]), - maxLines: 3, - overflow: TextOverflow.ellipsis, - ), - ], - if (!isRouting) const SizedBox(height: 16), - - // Action buttons - if (_routeFailed) ...[ - Text( - 'No route available from your current location.', - style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[400] : Colors.grey[600]), - ), - const SizedBox(height: 12), - SizedBox( - width: double.infinity, - child: FilledButton.icon( - onPressed: () => _launchWebsite( - 'https://www.google.com/maps/dir/?api=1' - '&destination=${_routeDestination?.latitude ?? result.latitude},${_routeDestination?.longitude ?? result.longitude}' - '&travelmode=walking' - '${_fromLatLng != null ? '&origin=${_fromLatLng!.$1},${_fromLatLng!.$2}' : ''}', - ), - icon: const Icon(Icons.map_outlined, size: 18), - label: const Text('Navigate in Google Maps'), - style: FilledButton.styleFrom( - padding: const EdgeInsets.symmetric(vertical: 12), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), - ), - ), - ), - ] else if (_hasRoute) ...[ - // Travel time - Row( - children: [ - Icon(Icons.schedule, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), - const SizedBox(width: 6), - Text( - _routeTravelTimeMinutes < 1 ? '< 1 min' : '${_routeTravelTimeMinutes.ceil()} min', - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - color: isDark ? Colors.white : Colors.grey[900], - ), - ), - ], - ), - const SizedBox(height: 12), - - // Travel mode toggle chips - Row( - children: [ - for (final mode in ['Walking', 'Accessible']) ...[ - if (mode != 'Walking') const SizedBox(width: 8), - GestureDetector( - onTap: _isRouting || mode == _travelMode - ? null - : () => _solveRoute(result, travelMode: mode, originLatLng: _fromLatLng), - child: Container( - padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8), - decoration: BoxDecoration( - color: mode == _travelMode - ? (isDark ? Colors.white : Colors.grey[900]) - : (isDark ? Colors.grey[800] : Colors.grey[100]), - borderRadius: BorderRadius.circular(16), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Icon( - mode == 'Walking' ? Icons.directions_walk : Icons.accessible, - size: 16, - color: mode == _travelMode - ? (isDark ? Colors.grey[900] : Colors.white) - : (isDark ? Colors.white70 : Colors.grey[700]), - ), - const SizedBox(width: 6), - Text( - mode, - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w500, - color: mode == _travelMode - ? (isDark ? Colors.grey[900] : Colors.white) - : (isDark ? Colors.white70 : Colors.grey[700]), - ), - ), - ], - ), - ), - ), - ], - ], - ), - const SizedBox(height: 12), - - // Navigate in Google Maps button - SizedBox( - width: double.infinity, - child: OutlinedButton.icon( - onPressed: () => _launchWebsite( - 'https://www.google.com/maps/dir/?api=1' - '&destination=${_routeDestination?.latitude ?? result.latitude},${_routeDestination?.longitude ?? result.longitude}' - '&travelmode=walking' - '${_fromLatLng != null ? '&origin=${_fromLatLng!.$1},${_fromLatLng!.$2}' : ''}', - ), - icon: const Icon(Icons.map_outlined, size: 18), - label: const Text('Navigate in Google Maps'), - style: OutlinedButton.styleFrom( - foregroundColor: isDark ? const Color(0xFFFFCD00) : null, - side: isDark ? const BorderSide(color: Color(0xFFFFCD00)) : null, - padding: const EdgeInsets.symmetric(vertical: 12), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), - ), - ), - ), - ] else - Row( - children: [ - if (result.websiteUrl != null) ...[ - Expanded( - child: OutlinedButton.icon( - onPressed: () => _launchWebsite(result.websiteUrl!), - icon: const Icon(Icons.language, size: 18), - label: const Text('View website'), - style: OutlinedButton.styleFrom( - foregroundColor: isDark ? const Color(0xFFFFCD00) : null, - side: isDark ? const BorderSide(color: Color(0xFFFFCD00)) : null, - padding: const EdgeInsets.symmetric(vertical: 12), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), - ), - ), - ), - const SizedBox(width: 12), - ], - Expanded( - child: FilledButton.icon( - onPressed: _isRouting - ? null - : () { - final gps = _getUserLatLng(); - _fromController.text = gps != null ? 'My Location' : ''; - _toController.text = result.name; - _routeDestination = result; - _graphicsOverlay.graphics.clear(); - setState(() { - _showRouteFields = true; - _selectedResult = null; - _mappedResults = []; - _allCategoryResults = []; - _showCategoryList = false; - _activeCategory = null; - }); - _solveRoute(result); - }, - icon: _isRouting - ? const SizedBox( - width: 18, - height: 18, - child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white), - ) - : const Icon(Icons.directions, size: 18), - label: Text(_isRouting ? 'Routing...' : 'Get Directions'), - style: FilledButton.styleFrom( - padding: const EdgeInsets.symmetric(vertical: 12), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), - ), - ), - ), - ], - ), - ], - ), - ), - ), - // Direction maneuver steps (when route is active) - if (hasRouteManeuvers) - SliverList( - delegate: SliverChildBuilderDelegate((context, index) { - final step = _routeManeuvers[index]; - final distMeters = step.length; - final distLabel = distMeters < 1000 - ? '${distMeters.round()} m' - : '${(distMeters / 1000).toStringAsFixed(1)} km'; - final isNotLastManeuver = index < _routeManeuvers.length - 1; - return Column( - children: [ - if (index == 0) const Divider(height: 1), - ListTile( - leading: Icon( - Icons.subdirectory_arrow_right, - size: 20, - color: isDark ? Colors.grey[400] : Colors.grey[600], - ), - title: Text(step.directionText, style: const TextStyle(fontSize: 14)), - trailing: distMeters > 0 - ? Text( - distLabel, - style: TextStyle(fontSize: 13, color: isDark ? Colors.grey[500] : Colors.grey[500]), - ) - : null, - dense: true, - ), - if (isNotLastManeuver) const Divider(height: 1), - ], - ); - }, childCount: _routeManeuvers.length), - ), - ], - ); - }, - ); } // --------------------------------------------------------------------------- - // Build + // Build Method // --------------------------------------------------------------------------- @override @@ -2126,13 +1167,12 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { super.build(context); final isDark = Theme.of(context).brightness == Brightness.dark; final keyboardVisible = MediaQuery.of(context).viewInsets.bottom > 0; - final shouldShowResultsDivider = _showResults && (_isSearching || _searchResults.isNotEmpty); final shouldShowCatListPanel = _showCategoryList && _selectedResult == null && _allCategoryResults.isNotEmpty; return Scaffold( body: Stack( children: [ - // Map — swaps between 2D ArcGISMapView and 3D ArcGISSceneView + // Map View Stack (2D Map View vs 3D Scene View) Column( children: [ Expanded( @@ -2159,7 +1199,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ], ), - // Floating search bar + dropdown — hidden in 3D/Drone View modes + // Floating top search bar & suggestion panel if (_sceneMode == 'default') Positioned( top: 8, @@ -2167,410 +1207,211 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { right: 12, child: Column( children: [ - // Search bar / route fields - if (_showRouteFields) - Material( - elevation: 4, - borderRadius: BorderRadius.circular(8), - color: isDark ? Colors.grey[850] : Colors.white, - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 4), - child: Row( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - // Left dot column - Padding( - padding: const EdgeInsets.only(left: 14), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Icon(Icons.circle_outlined, size: 12, color: Colors.blue), - Container( - width: 1.5, - height: 24, - color: isDark ? Colors.grey[600] : Colors.grey[300], - ), - Icon(Icons.circle, size: 12, color: Colors.red), - ], - ), - ), - // Text fields - Expanded( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Row( - children: [ - Expanded( - child: TextField( - controller: _fromController, - focusNode: _fromFocusNode, - style: const TextStyle(fontSize: 16), - decoration: const InputDecoration( - border: InputBorder.none, - contentPadding: EdgeInsets.symmetric(horizontal: 10, vertical: 14), - hintText: 'From', - isDense: true, - ), - onTap: () { - setState(() { - _activeRouteField = 'from'; - _showSuggestions = true; - _showResults = false; - }); - }, - onChanged: (text) { - _fromLatLng = null; - if (text.length >= 3) { - _performSearch(text); - } else if (text.isEmpty) { - setState(() { - _showResults = false; - _showSuggestions = true; - }); - } else { - setState(() { - _showResults = false; - _showSuggestions = false; - }); - } - }, - ), - ), - if (_fromController.text.isNotEmpty) - SizedBox( - width: 28, - height: 28, - child: IconButton( - padding: EdgeInsets.zero, - icon: Icon( - Icons.close, - size: 16, - color: isDark ? Colors.white70 : Colors.grey[600], - ), - onPressed: () { - _fromController.clear(); - _fromLatLng = null; - setState(() => _showSuggestions = true); - }, - ), - ), - ], - ), - Divider(height: 1, indent: 10, endIndent: 10), - Row( - children: [ - Expanded( - child: TextField( - controller: _toController, - focusNode: _toFocusNode, - style: const TextStyle(fontSize: 16), - decoration: const InputDecoration( - border: InputBorder.none, - contentPadding: EdgeInsets.symmetric(horizontal: 10, vertical: 14), - hintText: 'To', - isDense: true, - ), - onTap: () { - setState(() { - _activeRouteField = 'to'; - _showSuggestions = true; - _showResults = false; - }); - }, - onChanged: (text) { - if (text.length >= 3) { - _performSearch(text); - } else if (text.isEmpty) { - setState(() { - _showResults = false; - _showSuggestions = true; - }); - } else { - setState(() { - _showResults = false; - _showSuggestions = false; - }); - } - }, - ), - ), - if (_toController.text.isNotEmpty) - SizedBox( - width: 28, - height: 28, - child: IconButton( - padding: EdgeInsets.zero, - icon: Icon( - Icons.close, - size: 16, - color: isDark ? Colors.white70 : Colors.grey[600], - ), - onPressed: () { - _toController.clear(); - setState(() => _showSuggestions = true); - }, - ), - ), - ], - ), - ], - ), - ), - // Close + Swap buttons - Column( - mainAxisSize: MainAxisSize.min, - children: [ - SizedBox( - width: 36, - height: 36, - child: IconButton( - padding: EdgeInsets.zero, - icon: Icon(Icons.close, size: 20, color: Colors.redAccent), - onPressed: _clearRoute, - ), - ), - SizedBox( - width: 36, - height: 36, - child: IconButton( - padding: EdgeInsets.zero, - icon: Icon( - Icons.swap_vert, - size: 20, - color: isDark ? Colors.white70 : Colors.grey[600], - ), - onPressed: () { - final tmpText = _fromController.text; - final tmpLatLng = _fromLatLng; - _fromController.text = _toController.text; - _toController.text = tmpText; - setState(() { - _fromLatLng = _routeDestination != null - ? (_routeDestination!.latitude, _routeDestination!.longitude) - : null; - _routeDestination = tmpLatLng != null - ? MapSearchResult( - name: tmpText, - subtitle: '', - latitude: tmpLatLng.$1, - longitude: tmpLatLng.$2, - source: MapSearchSource.building, - ) - : null; - }); - if (_routeDestination != null && _fromLatLng != null) - _solveRoute(_routeDestination!, originLatLng: _fromLatLng); - }, - ), - ), - ], - ), - const SizedBox(width: 4), - ], - ), - ), - ) - else - Material( - elevation: 4, - borderRadius: BorderRadius.circular(8), - color: isDark ? Colors.grey[850] : Colors.white, - child: Row( - children: [ - Padding( - padding: EdgeInsets.only(left: 12), - child: Icon(Icons.search, color: isDark ? Colors.white70 : Colors.grey[600]), - ), - Expanded( - child: TextField( - controller: _searchController, - focusNode: _focusNode, - textInputAction: TextInputAction.search, - onSubmitted: _performSearch, - onChanged: (text) { - if (text.isEmpty) { - setState(() { - _showResults = false; - _searchResults = []; - _matchingPoiClasses = []; - _showSuggestions = _focusNode.hasFocus; - }); - } else { - final q = text.toLowerCase(); - // Match against server-fetched classes - final matched = _allPoiClasses.where((c) => c.toLowerCase().contains(q)).toList(); - - // Always include hardcoded category class values as a fallback - // so chips appear even if the server fetch is still in flight - for (final cat in _categories) { - final isCatMatched = - cat.poiClassValue.toLowerCase().contains(q) && - !matched.contains(cat.poiClassValue); - if (isCatMatched) matched.insert(0, cat.poiClassValue); - } - - setState(() { - _showSuggestions = false; - _matchingPoiClasses = matched; - }); - } - }, - onTap: () { - // Close detail panel when user taps search bar - if (_selectedResult != null) { - setState(() { - _selectedResult = null; - }); - } - // Show suggestions if text is empty - if (_searchController.text.isEmpty) { - setState(() { - _showSuggestions = true; - _showResults = false; - }); - } - }, - style: TextStyle(fontSize: 16), - decoration: InputDecoration( - border: InputBorder.none, - contentPadding: EdgeInsets.symmetric(horizontal: 12, vertical: 16), - hintText: 'Search buildings, places...', - ), - ), - ), - if (_searchController.text.isNotEmpty) - IconButton(icon: Icon(Icons.clear), onPressed: _clearSearch), - if (_config?.features.aiSearch ?? false) - IconButton( - icon: Icon( - Icons.auto_awesome, - color: isDark ? Colors.amber[300] : Theme.of(context).colorScheme.primary, - size: 20, - ), - onPressed: () => showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (_) => EsriAiSearchSheet( - userLat: _getUserLatLng()?.$1, - userLon: _getUserLatLng()?.$2, - onLocationSelected: _onAiLocationSelected, - onRouteRequested: _onAiRouteRequested, - ), - ), - ), - ], + EsriMapSearchBar( + config: _config, + showRouteFields: _showRouteFields, + searchController: _searchController, + focusNode: _focusNode, + fromController: _fromController, + fromFocusNode: _fromFocusNode, + toController: _toController, + toFocusNode: _toFocusNode, + showSuggestions: _showSuggestions, + showResults: _showResults, + isSearching: _isSearching, + searchResults: _searchResults, + matchingPoiClasses: _matchingPoiClasses, + onPerformSearch: _performSearch, + onPerformClassSearch: _performClassSearch, + onSelectResult: _selectResult, + onClearSearch: _clearSearch, + onClearRoute: _clearRoute, + onSwapRouteFields: () { + final tmpText = _fromController.text; + final tmpLatLng = _fromLatLng; + _fromController.text = _toController.text; + _toController.text = tmpText; + setState(() { + _fromLatLng = _routeDestination != null + ? (_routeDestination!.latitude, _routeDestination!.longitude) + : null; + _routeDestination = tmpLatLng != null + ? MapSearchResult( + name: tmpText, + subtitle: '', + latitude: tmpLatLng.$1, + longitude: tmpLatLng.$2, + source: MapSearchSource.building, + ) + : null; + }); + if (_routeDestination != null && _fromLatLng != null) { + _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + } + }, + onTapSearchField: () { + if (_selectedResult != null) setState(() => _selectedResult = null); + if (_searchController.text.isEmpty) { + setState(() { + _showSuggestions = true; + _showResults = false; + }); + } + }, + onTapFromField: () { + setState(() { + _activeRouteField = 'from'; + _showSuggestions = true; + _showResults = false; + }); + }, + onTapToField: () { + setState(() { + _activeRouteField = 'to'; + _showSuggestions = true; + _showResults = false; + }); + }, + onChangedFromField: (text) { + _fromLatLng = null; + if (text.length >= 3) { + _performSearch(text); + } else if (text.isEmpty) { + setState(() { + _showResults = false; + _showSuggestions = true; + }); + } else { + setState(() { + _showResults = false; + _showSuggestions = false; + }); + } + }, + onChangedToField: (text) { + if (text.length >= 3) { + _performSearch(text); + } else if (text.isEmpty) { + setState(() { + _showResults = false; + _showSuggestions = true; + }); + } else { + setState(() { + _showResults = false; + _showSuggestions = false; + }); + } + }, + onClearFromField: () { + _fromController.clear(); + _fromLatLng = null; + setState(() => _showSuggestions = true); + }, + onClearToField: () { + _toController.clear(); + setState(() => _showSuggestions = true); + }, + onOpenAiSearch: () => showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (_) => EsriAiSearchSheet( + userLat: _getUserLatLng()?.$1, + userLon: _getUserLatLng()?.$2, + onLocationSelected: _onAiLocationSelected, + onRouteRequested: _onAiRouteRequested, ), ), + iconForClass: _iconForClass, + labelForClass: _labelForClass, + iconForResult: _iconForResult, + ), - SizedBox(height: 4), - - // Suggestions panel (categories + recents) - if (_showSuggestions && !_showResults) _buildSuggestionsPanel(context), - - // Search results dropdown - if (_showResults || - (_matchingPoiClasses.isNotEmpty && _searchController.text.isNotEmpty && !_showSuggestions)) - Material( - elevation: 4, - borderRadius: BorderRadius.circular(8), - color: isDark ? Colors.grey[850] : Colors.white, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - // ── Category matches (always at top) ────────────────────────── - if (_matchingPoiClasses.isNotEmpty) ...[ - Padding( - padding: const EdgeInsets.fromLTRB(16, 10, 16, 4), - child: Row( - children: [ - Icon( - Icons.category_outlined, - size: 13, - color: isDark ? Colors.grey[500] : Colors.grey[500], - ), - const SizedBox(width: 6), - Text( - 'CATEGORIES', - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w700, - letterSpacing: 0.6, - color: isDark ? Colors.grey[500] : Colors.grey[500], - ), - ), - ], - ), - ), - ..._matchingPoiClasses.map( - (classValue) => ListTile( - splashColor: Colors.transparent, - leading: Icon( - _iconForClass(classValue), - size: 20, - color: isDark ? Colors.white70 : Colors.grey[700], - ), - title: Text(_labelForClass(classValue)), - subtitle: Text( - classValue, - style: TextStyle(fontSize: 13, color: isDark ? Colors.grey[500] : Colors.grey[500]), - ), - dense: true, - onTap: () => _performClassSearch(classValue), - ), - ), - if (shouldShowResultsDivider) const Divider(height: 1), - ], - - // ── POI / building results ───────────────────────────────────── - if (_showResults) - _isSearching - ? const Padding( - padding: EdgeInsets.all(16), - child: Center(child: CircularProgressIndicator()), - ) - : _searchResults.isEmpty - // Only show "no results" if there are also no category matches - ? (_matchingPoiClasses.isEmpty - ? const Padding(padding: EdgeInsets.all(16), child: Text('No results found')) - : const SizedBox.shrink()) - : ConstrainedBox( - constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.4), - child: ListView.separated( - shrinkWrap: true, - padding: EdgeInsets.zero, - itemCount: _searchResults.length, - separatorBuilder: (_, __) => const Divider(height: 1), - itemBuilder: (context, index) { - final result = _searchResults[index]; - return ListTile( - splashColor: Colors.transparent, - leading: Icon(_iconForResult(result)), - title: Text(result.name, maxLines: 1, overflow: TextOverflow.ellipsis), - subtitle: result.subtitle.isNotEmpty - ? Text(result.subtitle, maxLines: 1, overflow: TextOverflow.ellipsis) - : null, - dense: true, - onTap: () => _selectResult(result), - ); - }, - ), - ), - ], + // Suggestions panel (Category icons + Recent Search History) + if (_showSuggestions && !_showResults) + Padding( + padding: const EdgeInsets.only(top: 4), + child: EsriMapSuggestionsPanel( + categories: _categories, + recentSearches: _recentSearches, + showRouteFields: _showRouteFields, + activeRouteField: _activeRouteField, + onSelectCurrentLocation: () { + final gps = _getUserLatLng(); + if (gps == null) return; + _fromController.text = 'My Location'; + _fromLatLng = gps; + setState(() { + _showSuggestions = false; + _showResults = false; + }); + _fromFocusNode.unfocus(); + if (_routeDestination != null) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + }, + onSelectCategory: _performCategorySearch, + onSelectRecent: _selectResult, + onRemoveRecent: _removeFromRecentSearches, ), ), ], ), ), - // Category list panel — shown when list button is toggled - if (shouldShowCatListPanel) _buildCategoryListPanel(context), + // Category results list panel + if (shouldShowCatListPanel) + EsriMapCategoryListPanel( + controller: _categorySheetController, + activeCategory: _activeCategory, + allCategoryResults: _allCategoryResults, + viewportResults: EsriMapSearchService.filterToViewport(_allCategoryResults, _getViewportEnvelopeWGS84()), + userLocation: _getUserLatLng(), + onClearSearch: _clearSearch, + onSeeAllResults: _seeAllCategoryResults, + onSelectResult: _selectResultFromPin, + iconForResult: _iconForResult, + ), - // Detail slide-over - if (_selectedResult != null) _buildDetailSlideOver(context, _selectedResult!), + // Selected Result Detail Slide-over + if (_selectedResult != null) + EsriMapDetailSlideOver( + controller: _detailSheetController, + result: _selectedResult!, + resultIcon: _iconForResult(_selectedResult!), + isRoutingMode: _isRouting, + hasRoute: _hasRoute, + routeFailed: _routeFailed, + travelMode: _travelMode, + routeTravelTimeMinutes: _routeTravelTimeMinutes, + routeManeuvers: _routeManeuvers, + fromLatLng: _fromLatLng, + onGetDirections: (res) { + final gps = _getUserLatLng(); + _fromController.text = gps != null ? 'My Location' : ''; + _toController.text = res.name; + _routeDestination = res; + _graphicsOverlay.graphics.clear(); + setState(() { + _showRouteFields = true; + _selectedResult = null; + _mappedResults = []; + _allCategoryResults = []; + _showCategoryList = false; + _activeCategory = null; + }); + _solveRoute(res); + }, + onTravelModeChanged: (mode) { + if (_selectedResult != null) { + _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); + } + }, + onLaunchWebsite: _launchWebsite, + onClose: _closeDetail, + onClearRoute: _clearRoute, + ), - // Top-right FAB cluster — hidden when keyboard or layers panel is active + // Top-right FAB cluster (Compass, Recenter, Location, Layers) if (!keyboardVisible && !_focusNode.hasFocus && !_fromFocusNode.hasFocus && @@ -2592,7 +1433,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), ), - // Layers/display panel + // Basemap & Operational Layer Selector Panel if (_showLayersPanel && _config != null) EsriMapLayersPanel( config: _config!, @@ -2611,68 +1452,3 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ); } } - -class _AgeAuthChallengeHandler implements ArcGISAuthenticationChallengeHandler { - final String tokensUrl; - - String? _cachedAgeToken; - DateTime? _ageTokenExpiry; - - String? _cachedAgoToken; - DateTime? _agoTokenExpiry; - - _AgeAuthChallengeHandler(this.tokensUrl); - - Future<(String?, DateTime?)> _getTokenForHost(String host) async { - final isAgo = host.contains('arcgis.com'); - - if (isAgo) { - if (_cachedAgoToken != null && - _agoTokenExpiry != null && - DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) - return (_cachedAgoToken, _agoTokenExpiry); - } else { - if (_cachedAgeToken != null && - _ageTokenExpiry != null && - DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) - return (_cachedAgeToken, _ageTokenExpiry); - } - - final response = await http.get(Uri.parse(tokensUrl)); - final isTokenFetchNotOk = response.statusCode != 200; - if (isTokenFetchNotOk) throw Exception('Token fetch failed: ${response.statusCode}'); - final data = jsonDecode(response.body) as Map; - - _cachedAgeToken = data['age']?['token'] as String?; - final ageExpiresIn = data['age']?['expires_in'] as int? ?? 7200; - _ageTokenExpiry = DateTime.now().add(Duration(seconds: ageExpiresIn)); - - _cachedAgoToken = data['ago']?['token'] as String?; - final agoExpiresIn = data['ago']?['expires_in'] as int? ?? 7200; - _agoTokenExpiry = DateTime.now().add(Duration(seconds: agoExpiresIn)); - - return isAgo ? (_cachedAgoToken, _agoTokenExpiry) : (_cachedAgeToken, _ageTokenExpiry); - } - - @override - Future handleArcGISAuthenticationChallenge(ArcGISAuthenticationChallenge challenge) async { - try { - final host = challenge.requestUri.host; - final (token, expiry) = await _getTokenForHost(host); - if (token == null || expiry == null) { - challenge.continueAndFail(); - return; - } - final tokenInfo = TokenInfo.create(accessToken: token, expirationDate: expiry, isSslRequired: true); - if (tokenInfo == null) { - challenge.continueAndFail(); - return; - } - final credential = PregeneratedTokenCredential(uri: challenge.requestUri, tokenInfo: tokenInfo, referer: ''); - challenge.continueWithCredential(credential); - } catch (e) { - debugPrint('Auth challenge failed: $e'); - challenge.continueAndFail(); - } - } -} diff --git a/lib/ui/esrimap/models/esrimap_search_category.dart b/lib/ui/esrimap/models/esrimap_search_category.dart new file mode 100644 index 000000000..66773dd10 --- /dev/null +++ b/lib/ui/esrimap/models/esrimap_search_category.dart @@ -0,0 +1,58 @@ +/// ============================================================================ +/// File: esrimap_search_category.dart +/// Description: Model and utility helpers representing search categories +/// (e.g., Dining, Parking, Library) shown in suggestions. +/// ============================================================================ + +import 'package:flutter/material.dart'; + +/// Data class representing a quick search category chip shown on the map UI. +class EsriSearchCategory { + /// Display label for the category (e.g. "Dining", "Parking"). + final String label; + + /// Icon visual representation for the category. + final IconData icon; + + /// Underlying POI class string value used for filtering server queries. + final String poiClassValue; + + /// Accent or background color associated with the category. + final Color color; + + /// Constructs an [EsriSearchCategory] instance. + const EsriSearchCategory({ + required this.label, + required this.icon, + required this.poiClassValue, + this.color = const Color(0xFFF5F0E6), + }); +} + +/// Utility function mapping string icon names from config to [IconData] constants. +IconData iconDataForName(String name) { + switch (name) { + case 'restaurant': + return Icons.restaurant; + case 'menu_book': + return Icons.menu_book; + case 'local_parking': + return Icons.local_parking; + case 'fitness_center': + return Icons.fitness_center; + case 'directions_bus': + return Icons.directions_bus; + default: + return Icons.place; + } +} + +/// Utility function converting hexadecimal color strings (e.g., "#FFCD00") to Flutter [Color] objects. +Color colorFromHex(String? hex) { + final isHexEmpty = hex == null || hex.isEmpty; + if (isHexEmpty) return const Color(0xFFF5F0E6); + final stripped = hex.replaceFirst('#', ''); + final value = int.tryParse(stripped, radix: 16); + if (value == null) return const Color(0xFFF5F0E6); + return Color(0xFF000000 | value); +} diff --git a/lib/ui/esrimap/models/map_search_result.dart b/lib/ui/esrimap/models/map_search_result.dart new file mode 100644 index 000000000..ca2e06667 --- /dev/null +++ b/lib/ui/esrimap/models/map_search_result.dart @@ -0,0 +1,80 @@ +/// ============================================================================ +/// File: map_search_result.dart +/// Description: Represents a unified search result for both campus buildings +/// and points of interest (POIs) in the Esri Map widget. +/// ============================================================================ + +/// Identifies the origin/type of search result. +enum MapSearchSource { + /// Result represents a physical building on campus. + building, + + /// Result represents a Point of Interest (POI) such as dining, parking, etc. + poi, +} + +/// Unified search result model encapsulating location details, coordinates, +/// description, and serialization logic for recent search persistence. +class MapSearchResult { + /// Name or title of the building or POI. + final String name; + + /// Subtitle or secondary detail string (e.g. building code or category). + final String subtitle; + + /// Latitude coordinate of the location. + final double latitude; + + /// Longitude coordinate of the location. + final double longitude; + + /// Source classification indicating whether this is a building or a POI. + final MapSearchSource source; + + /// Physical address string of the location. + final String address; + + /// Detailed textual description or additional metadata. + final String description; + + /// Optional website URL associated with this location. + final String? websiteUrl; + + /// Constructs a [MapSearchResult] instance. + const MapSearchResult({ + required this.name, + required this.subtitle, + required this.latitude, + required this.longitude, + required this.source, + this.address = '', + this.description = '', + this.websiteUrl, + }); + + /// Serializes the search result into a JSON-compatible map for storage in SharedPreferences. + Map toJson() => { + 'name': name, + 'subtitle': subtitle, + 'latitude': latitude, + 'longitude': longitude, + 'source': source.index, + 'address': address, + 'description': description, + 'websiteUrl': websiteUrl, + }; + + /// Factory constructor to deserialize a [MapSearchResult] from a JSON map. + factory MapSearchResult.fromJson(Map json) { + return MapSearchResult( + name: json['name'] as String? ?? '', + subtitle: json['subtitle'] as String? ?? '', + latitude: (json['latitude'] as num?)?.toDouble() ?? 0.0, + longitude: (json['longitude'] as num?)?.toDouble() ?? 0.0, + source: MapSearchSource.values[json['source'] as int? ?? 0], + address: json['address'] as String? ?? '', + description: json['description'] as String? ?? '', + websiteUrl: json['websiteUrl'] as String?, + ); + } +} diff --git a/lib/ui/esrimap/services/esrimap_auth_handler.dart b/lib/ui/esrimap/services/esrimap_auth_handler.dart new file mode 100644 index 000000000..548b6f838 --- /dev/null +++ b/lib/ui/esrimap/services/esrimap_auth_handler.dart @@ -0,0 +1,90 @@ +/// ============================================================================ +/// File: esrimap_auth_handler.dart +/// Description: Custom ArcGIS Authentication Challenge Handler that fetches and +/// caches access tokens for secure ArcGIS Online / Enterprise services. +/// ============================================================================ + +import 'dart:convert'; +import 'package:arcgis_maps/arcgis_maps.dart'; +import 'package:flutter/material.dart'; +import 'package:http/http.dart' as http; + +/// Challenge handler implementation for authenticating protected ArcGIS REST services. +class AgeAuthChallengeHandler implements ArcGISAuthenticationChallengeHandler { + /// Endpoint URL used to retrieve authorization tokens. + final String tokensUrl; + + /// Cached token for ArcGIS Enterprise server hosts. + String? _cachedAgeToken; + DateTime? _ageTokenExpiry; + + /// Cached token for ArcGIS Online (arcgis.com) hosts. + String? _cachedAgoToken; + DateTime? _agoTokenExpiry; + + /// Creates an instance of [AgeAuthChallengeHandler] with the specified [tokensUrl]. + AgeAuthChallengeHandler(this.tokensUrl); + + /// Internal helper to retrieve an active token for the requested [host], reusing cached tokens if valid. + Future<(String?, DateTime?)> _getTokenForHost(String host) async { + final isAgo = host.contains('arcgis.com'); + + // Return cached token if valid and not expiring within 5 minutes + if (isAgo) { + if (_cachedAgoToken != null && + _agoTokenExpiry != null && + DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) { + return (_cachedAgoToken, _agoTokenExpiry); + } + } else { + if (_cachedAgeToken != null && + _ageTokenExpiry != null && + DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) { + return (_cachedAgeToken, _ageTokenExpiry); + } + } + + // Request fresh authentication tokens from server endpoint + final response = await http.get(Uri.parse(tokensUrl)); + final isTokenFetchNotOk = response.statusCode != 200; + if (isTokenFetchNotOk) throw Exception('Token fetch failed: ${response.statusCode}'); + final data = jsonDecode(response.body) as Map; + + // Cache Enterprise token + _cachedAgeToken = data['age']?['token'] as String?; + final ageExpiresIn = data['age']?['expires_in'] as int? ?? 7200; + _ageTokenExpiry = DateTime.now().add(Duration(seconds: ageExpiresIn)); + + // Cache ArcGIS Online token + _cachedAgoToken = data['ago']?['token'] as String?; + final agoExpiresIn = data['ago']?['expires_in'] as int? ?? 7200; + _agoTokenExpiry = DateTime.now().add(Duration(seconds: agoExpiresIn)); + + return isAgo ? (_cachedAgoToken, _agoTokenExpiry) : (_cachedAgeToken, _ageTokenExpiry); + } + + /// Handles incoming ArcGIS authentication challenges by attaching pregenerated token credentials. + @override + Future handleArcGISAuthenticationChallenge(ArcGISAuthenticationChallenge challenge) async { + try { + final host = challenge.requestUri.host; + final (token, expiry) = await _getTokenForHost(host); + if (token == null || expiry == null) { + challenge.continueAndFail(); + return; + } + + final tokenInfo = TokenInfo.create(accessToken: token, expirationDate: expiry, isSslRequired: true); + if (tokenInfo == null) { + challenge.continueAndFail(); + return; + } + + final credential = PregeneratedTokenCredential(uri: challenge.requestUri, tokenInfo: tokenInfo, referer: ''); + challenge.continueWithCredential(credential); + } catch (e) { + debugPrint('Auth challenge failed: $e'); + challenge.continueAndFail(); + } + } +} diff --git a/lib/ui/esrimap/services/esrimap_route_service.dart b/lib/ui/esrimap/services/esrimap_route_service.dart new file mode 100644 index 000000000..f4bd6e662 --- /dev/null +++ b/lib/ui/esrimap/services/esrimap_route_service.dart @@ -0,0 +1,102 @@ +/// ============================================================================ +/// File: esrimap_route_service.dart +/// Description: Service handling route calculation via the ArcGIS Campus +/// Wayfinding Network NAServer. +/// ============================================================================ + +import 'package:arcgis_maps/arcgis_maps.dart'; +import 'package:flutter/material.dart'; +import '../models/map_search_result.dart'; + +/// Result data structure holding the outcome of a solved route calculation. +class EsriRouteResult { + /// Travel duration in minutes. + final double travelTimeMinutes; + + /// List of direction maneuver instructions (turn-by-turn steps). + final List directionManeuvers; + + /// Visual geometry polyline representing the calculated route. + final Geometry? routeGeometry; + + /// Envelope bounding box centered with padding for map viewpoint framing. + final Envelope? paddedExtent; + + /// Constructs an [EsriRouteResult] instance. + const EsriRouteResult({ + required this.travelTimeMinutes, + required this.directionManeuvers, + this.routeGeometry, + this.paddedExtent, + }); +} + +/// Service class encapsulating ArcGIS Route Task execution. +class EsriMapRouteService { + /// Endpoint URL for the UCSD Campus Wayfinding Network service. + static const String routeServiceUrl = + 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/' + 'Wayfinding/Campus_Wayfinding_Network/NAServer/Route'; + + /// Solves a network route between [originLatLng] and [destination] for the given [travelMode]. + static Future solveRoute({ + required (double lat, double lng) originLatLng, + required MapSearchResult destination, + required String travelMode, + }) async { + try { + final routeTask = RouteTask.withUri(Uri.parse(routeServiceUrl)); + await routeTask.load(); + + final params = await routeTask.createDefaultParameters(); + params.returnDirections = true; + + // Match requested travel mode ('Walking', 'Accessible', etc.) + final taskInfo = routeTask.getRouteTaskInfo(); + final matchingMode = taskInfo.travelModes.where((m) => m.name == travelMode).firstOrNull; + if (matchingMode != null) { + params.travelMode = matchingMode; + } + + // Configure origin and destination stops + final origin = Stop( + ArcGISPoint(x: originLatLng.$2, y: originLatLng.$1, spatialReference: SpatialReference.wgs84), + ); + final dest = Stop( + ArcGISPoint(x: destination.longitude, y: destination.latitude, spatialReference: SpatialReference.wgs84), + ); + params.setStops([origin, dest]); + + // Solve route + final result = await routeTask.solveRoute(params); + if (result.routes.isEmpty) return null; + + final route = result.routes.first; + final routeGeometry = route.routeGeometry; + if (routeGeometry == null) return null; + + // Compute padded extent so the route line stays visible above bottom sheets + final extent = routeGeometry.extent; + final dx = extent.width * 0.2; + final dyTop = extent.height * 0.5; + final dyBottom = extent.height * 0.75; + final paddedExtent = Envelope.fromXY( + xMin: extent.xMin - dx, + yMin: extent.yMin - dyBottom, + xMax: extent.xMax + dx, + yMax: extent.yMax + dyTop, + spatialReference: extent.spatialReference, + ); + + return EsriRouteResult( + travelTimeMinutes: route.totalTime, + directionManeuvers: route.directionManeuvers, + routeGeometry: routeGeometry, + paddedExtent: paddedExtent, + ); + } catch (e) { + debugPrint('Route solve error: $e'); + return null; + } + } +} diff --git a/lib/ui/esrimap/services/esrimap_search_service.dart b/lib/ui/esrimap/services/esrimap_search_service.dart new file mode 100644 index 000000000..7e41a7f2b --- /dev/null +++ b/lib/ui/esrimap/services/esrimap_search_service.dart @@ -0,0 +1,166 @@ +/// ============================================================================ +/// File: esrimap_search_service.dart +/// Description: Service handling REST API requests for campus buildings & POIs, +/// as well as persisting recent search history to SharedPreferences. +/// ============================================================================ + +import 'dart:convert'; +import 'dart:math' as math; +import 'package:arcgis_maps/arcgis_maps.dart'; +import 'package:flutter/material.dart'; +import 'package:http/http.dart' as http; +import 'package:shared_preferences/shared_preferences.dart'; +import '../models/map_search_result.dart'; + +/// Service class managing location queries, POI class lookup, and local search history. +class EsriMapSearchService { + /// Base API URL endpoint. + static const String baseUrl = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; + + /// SharedPreferences key used to persist recent searches. + static const String recentSearchesKey = 'esri_map_recent_searches'; + + /// Maximum number of recent searches retained. + static const int maxRecentSearches = 5; + + // --------------------------------------------------------------------------- + // REST API Helpers + // --------------------------------------------------------------------------- + + /// Performs an HTTP GET request to the specified [path] with optional query [params]. + static Future> apiGet(String path, [Map? params]) async { + final uri = Uri.parse('$baseUrl/$path').replace(queryParameters: params); + final response = await http.get(uri); + if (response.statusCode != 200) { + throw Exception('API error ${response.statusCode}: ${response.body}'); + } + return jsonDecode(response.body) as Map; + } + + /// Performs an HTTP POST request to the specified [path] with a JSON [body]. + static Future> apiPost(String path, Map body) async { + final response = await http.post( + Uri.parse('$baseUrl/$path'), + headers: {'Content-Type': 'application/json'}, + body: jsonEncode(body), + ); + if (response.statusCode != 200) { + throw Exception('API error ${response.statusCode}: ${response.body}'); + } + return jsonDecode(response.body) as Map; + } + + // --------------------------------------------------------------------------- + // Queries + // --------------------------------------------------------------------------- + + /// Queries campus buildings matching the search string [query]. + static Future> queryBuildings(String query) async { + final data = await apiGet('buildings', {'q': query}); + return (data['results'] as List? ?? []) + .map((r) { + return MapSearchResult( + name: r['name'] as String? ?? 'Unknown Building', + subtitle: r['subtitle'] as String? ?? 'Building', + latitude: (r['latitude'] as num?)?.toDouble() ?? 0.0, + longitude: (r['longitude'] as num?)?.toDouble() ?? 0.0, + source: MapSearchSource.building, + address: r['address'] as String? ?? '', + ); + }) + .where((r) => r.latitude != 0.0 && r.longitude != 0.0) + .toList(); + } + + /// Fetches all available POI class strings from the backend. + static Future> fetchAllPoiClasses() async { + try { + final data = await apiGet('poi/classes'); + return (data['classes'] as List? ?? []).map((c) => c as String).toList(); + } catch (e) { + debugPrint('Failed to fetch POI classes: $e'); + return []; + } + } + + /// Queries POIs matching the search string [query]. + static Future> queryPOIs(String query) async { + final data = await apiGet('poi', {'q': query}); + return parsePOIResults(data); + } + + /// Queries POIs belonging to a specific [classValue] (e.g. "Dining", "Parking"). + static Future> queryPOIsByClass(String classValue) async { + final data = await apiGet('poi', {'class': classValue, 'limit': '100'}); + return parsePOIResults(data); + } + + /// Parses raw JSON response maps into a list of [MapSearchResult] objects. + static List parsePOIResults(Map data) { + return (data['results'] as List? ?? []) + .map((r) { + return MapSearchResult( + name: r['name'] as String? ?? 'Unknown POI', + subtitle: r['subtitle'] as String? ?? '', + latitude: (r['latitude'] as num?)?.toDouble() ?? 0.0, + longitude: (r['longitude'] as num?)?.toDouble() ?? 0.0, + source: MapSearchSource.poi, + description: r['description'] as String? ?? '', + websiteUrl: r['websiteUrl'] as String?, + ); + }) + .where((r) => r.latitude != 0.0 && r.longitude != 0.0) + .toList(); + } + + // --------------------------------------------------------------------------- + // Viewport & Geographic Helpers + // --------------------------------------------------------------------------- + + /// Filters a list of [results] down to those located within the specified [envelope]. + static List filterToViewport(List results, Envelope? envelope) { + if (envelope == null) return results; + return results.where((r) { + return r.latitude >= envelope.yMin && + r.latitude <= envelope.yMax && + r.longitude >= envelope.xMin && + r.longitude <= envelope.xMax; + }).toList(); + } + + /// Calculates the Haversine distance in meters between two geographical WGS84 coordinates. + static double distanceMeters(double lat1, double lng1, double lat2, double lng2) { + const r = 6371000.0; // Earth radius in meters + final dLat = (lat2 - lat1) * math.pi / 180; + final dLng = (lng2 - lng1) * math.pi / 180; + final a = math.sin(dLat / 2) * math.sin(dLat / 2) + + math.cos(lat1 * math.pi / 180) * math.cos(lat2 * math.pi / 180) * math.sin(dLng / 2) * math.sin(dLng / 2); + return r * 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a)); + } + + // --------------------------------------------------------------------------- + // Recent Searches Persistence + // --------------------------------------------------------------------------- + + /// Loads stored recent searches from [SharedPreferences]. + static Future> loadRecentSearches() async { + final prefs = await SharedPreferences.getInstance(); + final jsonStr = prefs.getString(recentSearchesKey); + if (jsonStr != null) { + try { + final list = jsonDecode(jsonStr) as List; + return list.map((e) => MapSearchResult.fromJson(e as Map)).toList(); + } catch (_) { + // Return empty on corrupt stored data + } + } + return []; + } + + /// Saves the current list of [searches] to [SharedPreferences]. + static Future saveRecentSearches(List searches) async { + final prefs = await SharedPreferences.getInstance(); + final jsonStr = jsonEncode(searches.map((r) => r.toJson()).toList()); + await prefs.setString(recentSearchesKey, jsonStr); + } +} diff --git a/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart b/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart new file mode 100644 index 000000000..c79c8db2e --- /dev/null +++ b/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart @@ -0,0 +1,197 @@ +/// ============================================================================ +/// File: esrimap_category_list_panel.dart +/// Description: Draggable scrollable bottom sheet displaying all plotted POI +/// results for an active category search, sorted by distance. +/// ============================================================================ + +import 'package:flutter/material.dart'; +import '../models/esrimap_search_category.dart'; +import '../models/map_search_result.dart'; +import '../services/esrimap_search_service.dart'; +import 'esrimap_detail_slide_over.dart'; + +/// Bottom sheet widget rendering plotted category search results in a list. +class EsriMapCategoryListPanel extends StatelessWidget { + /// Controller managing draggable sheet height. + final DraggableScrollableController controller; + + /// Active search category being displayed. + final EsriSearchCategory? activeCategory; + + /// Unfiltered list of all results for this category. + final List allCategoryResults; + + /// Results currently within the visible map viewport. + final List viewportResults; + + /// User's current location coordinates for distance sorting, if available. + final (double lat, double lng)? userLocation; + + /// Callback to clear search and close panel. + final VoidCallback onClearSearch; + + /// Callback when "See all results" button is tapped. + final VoidCallback onSeeAllResults; + + /// Callback when a item in the list is tapped. + final void Function(MapSearchResult result) onSelectResult; + + /// Helper function mapping results to appropriate icon. + final IconData Function(MapSearchResult result) iconForResult; + + /// Constructs an [EsriMapCategoryListPanel] instance. + const EsriMapCategoryListPanel({ + Key? key, + required this.controller, + required this.activeCategory, + required this.allCategoryResults, + required this.viewportResults, + required this.userLocation, + required this.onClearSearch, + required this.onSeeAllResults, + required this.onSelectResult, + required this.iconForResult, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + final isDark = Theme.of(context).brightness == Brightness.dark; + final label = activeCategory?.label ?? 'Results'; + + // Sort results by distance from user if position is available + final results = List.from(viewportResults); + if (userLocation != null) { + results.sort( + (a, b) => EsriMapSearchService.distanceMeters( + userLocation!.$1, + userLocation!.$2, + a.latitude, + a.longitude, + ).compareTo( + EsriMapSearchService.distanceMeters( + userLocation!.$1, + userLocation!.$2, + b.latitude, + b.longitude, + ), + ), + ); + } + + // Content-aware sizing calculation + final screenHeight = MediaQuery.of(context).size.height; + final contentHeight = 80.0 + (results.length * 56.0).clamp(56.0, 600.0); + final contentFraction = (contentHeight / screenHeight).clamp(0.15, 0.80); + final initialSize = contentFraction < 0.45 ? contentFraction : 0.45; + final maxSize = contentFraction < 0.80 ? contentFraction.clamp(0.45, 0.80) : 0.80; + final snaps = [0.15]; + if (initialSize > 0.15 + 0.01) snaps.add(initialSize); + + return DraggableScrollableSheet( + controller: controller, + initialChildSize: initialSize, + minChildSize: 0.15, + maxChildSize: maxSize, + snap: true, + snapSizes: snaps, + builder: (context, scrollController) { + final headerTitle = results.isEmpty ? '$label - None in view' : '$label - ${results.length} in view'; + + return buildSlideOverContent( + context: context, + scrollController: scrollController, + headerTitle: headerTitle, + headerIcon: activeCategory?.icon ?? Icons.place, + onClose: onClearSearch, + trailing: allCategoryResults.length > results.length + ? TextButton.icon( + icon: Icon(Icons.layers_outlined, size: 16, color: isDark ? Colors.white54 : Colors.grey[600]), + label: Text( + 'See all ${allCategoryResults.length} results', + style: TextStyle(fontSize: 13, color: isDark ? Colors.white54 : Colors.grey[600]), + ), + style: TextButton.styleFrom( + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + minimumSize: Size.zero, + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), + ), + onPressed: onSeeAllResults, + ) + : null, + sliverBody: results.isEmpty + ? [ + SliverToBoxAdapter( + child: Padding( + padding: const EdgeInsets.all(24), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Icon(Icons.location_off, size: 32, color: isDark ? Colors.grey[600] : Colors.grey[400]), + const SizedBox(height: 8), + Text( + 'No $label in current view.\nPan the map to see results.', + textAlign: TextAlign.center, + style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[500] : Colors.grey[600]), + ), + ], + ), + ), + ), + ] + : [ + SliverList( + delegate: SliverChildBuilderDelegate((context, index) { + final r = results[index]; + final dist = userLocation != null + ? EsriMapSearchService.distanceMeters( + userLocation!.$1, + userLocation!.$2, + r.latitude, + r.longitude, + ) + : null; + final distLabel = dist == null + ? null + : dist < 1000 + ? '${dist.round()} m away' + : '${(dist / 1000).toStringAsFixed(1)} km away'; + final isNotLastResult = index < results.length - 1; + return Column( + children: [ + ListTile( + splashColor: Colors.transparent, + leading: Icon( + iconForResult(r), + size: 20, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + title: Text( + r.name, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: const TextStyle(fontSize: 16), + ), + subtitle: distLabel != null + ? Text(distLabel, style: TextStyle(fontSize: 13, color: Colors.grey[500])) + : (r.subtitle.isNotEmpty + ? Text( + r.subtitle, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle(fontSize: 13, color: Colors.grey[500]), + ) + : null), + dense: true, + onTap: () => onSelectResult(r), + ), + if (isNotLastResult) const Divider(height: 1), + ], + ); + }, childCount: results.length), + ), + ], + ); + }, + ); + } +} diff --git a/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart new file mode 100644 index 000000000..6f8f31507 --- /dev/null +++ b/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart @@ -0,0 +1,459 @@ +/// ============================================================================ +/// File: esrimap_detail_slide_over.dart +/// Description: Draggable slide-over sheet displaying building/POI details, +/// travel time, navigation buttons, and turn-by-turn directions. +/// ============================================================================ + +import 'package:arcgis_maps/arcgis_maps.dart'; +import 'package:flutter/material.dart'; +import '../models/map_search_result.dart'; + +/// Persistent header delegate for pinned slide-over bottom sheet headers. +class SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { + /// Header widget content. + final Widget child; + + /// Fixed height of the persistent header. + final double height; + + /// Background color matching dark/light mode. + final Color backgroundColor; + + /// Constructs a [SlideOverHeaderDelegate] instance. + SlideOverHeaderDelegate({ + required this.child, + required this.height, + required this.backgroundColor, + }); + + @override + double get minExtent => height; + + @override + double get maxExtent => height; + + @override + Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) { + return Container( + height: height, + decoration: BoxDecoration( + color: backgroundColor, + borderRadius: shrinkOffset == 0 ? const BorderRadius.vertical(top: Radius.circular(16)) : null, + ), + child: child, + ); + } + + @override + bool shouldRebuild(covariant SlideOverHeaderDelegate oldDelegate) => + child != oldDelegate.child || height != oldDelegate.height || backgroundColor != oldDelegate.backgroundColor; +} + +/// Helper function building a consistent DraggableScrollableSheet template with a pinned header. +Widget buildSlideOverContent({ + required BuildContext context, + required ScrollController scrollController, + required String headerTitle, + IconData? headerIcon, + required VoidCallback onClose, + Widget? trailing, + required List sliverBody, + double headerHeight = 80.0, +}) { + final isDark = Theme.of(context).brightness == Brightness.dark; + final bgColor = isDark ? Colors.grey[900]! : Colors.white; + + return Material( + elevation: 8, + color: bgColor, + borderRadius: const BorderRadius.vertical(top: Radius.circular(16)), + clipBehavior: Clip.antiAlias, + child: CustomScrollView( + controller: scrollController, + slivers: [ + SliverPersistentHeader( + pinned: true, + delegate: SlideOverHeaderDelegate( + height: headerHeight, + backgroundColor: bgColor, + child: Column( + children: [ + // Drag handle bar + Padding( + padding: const EdgeInsets.only(top: 10, bottom: 4), + child: Container( + width: 36, + height: 4, + decoration: BoxDecoration( + color: isDark ? Colors.grey[700] : Colors.grey[300], + borderRadius: BorderRadius.circular(2), + ), + ), + ), + // Header title row with icon & close button + Padding( + padding: const EdgeInsets.fromLTRB(20, 6, 20, 8), + child: Row( + children: [ + if (headerIcon != null) ...[ + Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), + const SizedBox(width: 8), + ], + Expanded( + child: Text( + headerTitle, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: isDark ? Colors.white : Colors.grey[900], + ), + ), + ), + if (trailing != null) trailing, + GestureDetector( + onTap: onClose, + child: Container( + width: 34, + height: 34, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: isDark ? Colors.grey[800] : Colors.grey[200], + ), + child: Icon(Icons.close, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), + ), + ), + ], + ), + ), + ], + ), + ), + ), + // Divider below header + const SliverToBoxAdapter(child: Divider(height: 1)), + ...sliverBody, + ], + ), + ); +} + +/// Slide-over drawer widget presenting location details, route options, and maneuvers. +class EsriMapDetailSlideOver extends StatelessWidget { + /// Controller for managing sheet drag height. + final DraggableScrollableController controller; + + /// Selected location search result. + final MapSearchResult result; + + /// Icon visual representation for the location. + final IconData resultIcon; + + /// Whether routing or direction mode is active. + final bool isRoutingMode; + + /// Whether a calculated route is currently active. + final bool hasRoute; + + /// Whether route calculation failed. + final bool routeFailed; + + /// Selected travel mode (e.g. 'Walking', 'Accessible'). + final String travelMode; + + /// Estimated route travel duration in minutes. + final double routeTravelTimeMinutes; + + /// Turn-by-turn direction maneuvers. + final List routeManeuvers; + + /// Origin coordinates for route navigation, if custom. + final (double, double)? fromLatLng; + + /// Callback when "Get Directions" is tapped. + final void Function(MapSearchResult result) onGetDirections; + + /// Callback when travel mode toggle chip is tapped. + final void Function(String mode) onTravelModeChanged; + + /// Callback when external website button is tapped. + final void Function(String url) onLaunchWebsite; + + /// Callback when clear/close button is tapped. + final VoidCallback onClose; + + /// Callback when route is cleared. + final VoidCallback onClearRoute; + + /// Constructs an [EsriMapDetailSlideOver] instance. + const EsriMapDetailSlideOver({ + Key? key, + required this.controller, + required this.result, + required this.resultIcon, + required this.isRoutingMode, + required this.hasRoute, + required this.routeFailed, + required this.travelMode, + required this.routeTravelTimeMinutes, + required this.routeManeuvers, + required this.fromLatLng, + required this.onGetDirections, + required this.onTravelModeChanged, + required this.onLaunchWebsite, + required this.onClose, + required this.onClearRoute, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + final isDark = Theme.of(context).brightness == Brightness.dark; + final isRouting = isRoutingMode || hasRoute || routeFailed; + + final detailText = result.source == MapSearchSource.building ? result.address : result.description; + final categoryLabel = result.source == MapSearchSource.building ? 'Building' : result.subtitle; + + // Content-aware sheet sizing + final screenHeight = MediaQuery.of(context).size.height; + double contentEst = 80.0 + 30 + 48 + 40; + if (detailText.isNotEmpty) contentEst += 60; + final hasRouteManeuvers = hasRoute && routeManeuvers.isNotEmpty; + if (hasRouteManeuvers) contentEst += routeManeuvers.length * 52.0; + + final contentFraction = (contentEst / screenHeight).clamp(0.15, 0.80); + final initialSize = hasRoute ? 0.35 : (contentFraction < 0.30 ? contentFraction : 0.30); + final maxSize = hasRoute ? 0.80 : (contentFraction < 0.80 ? contentFraction.clamp(0.30, 0.80) : 0.80); + final snaps = [0.15]; + if (initialSize > 0.15 + 0.01) snaps.add(initialSize); + + return DraggableScrollableSheet( + controller: controller, + initialChildSize: initialSize, + minChildSize: 0.15, + maxChildSize: maxSize, + snap: true, + snapSizes: snaps, + builder: (context, scrollController) { + final shouldShowDetailText = !isRouting && detailText.isNotEmpty; + + return buildSlideOverContent( + context: context, + scrollController: scrollController, + headerTitle: isRouting ? 'Directions to ${result.name}' : result.name, + headerIcon: resultIcon, + onClose: isRouting ? onClearRoute : onClose, + sliverBody: [ + SliverToBoxAdapter( + child: Padding( + padding: const EdgeInsets.fromLTRB(20, 8, 20, 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Category label (hidden in routing mode) + if (!isRouting) + Text( + categoryLabel, + style: TextStyle(fontSize: 14, color: isDark ? Colors.grey[400] : Colors.grey[600]), + ), + + // Detail description text (hidden in routing mode) + if (shouldShowDetailText) ...[ + const SizedBox(height: 8), + Text( + detailText, + style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[400] : Colors.grey[600]), + maxLines: 3, + overflow: TextOverflow.ellipsis, + ), + ], + if (!isRouting) const SizedBox(height: 16), + + // Routing or Action Buttons + if (routeFailed) ...[ + Text( + 'No route available from your current location.', + style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[400] : Colors.grey[600]), + ), + const SizedBox(height: 12), + SizedBox( + width: double.infinity, + child: FilledButton.icon( + onPressed: () => onLaunchWebsite( + 'https://www.google.com/maps/dir/?api=1' + '&destination=${result.latitude},${result.longitude}' + '&travelmode=walking' + '${fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''}', + ), + icon: const Icon(Icons.map_outlined, size: 18), + label: const Text('Navigate in Google Maps'), + style: FilledButton.styleFrom( + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ), + ), + ), + ] else if (hasRoute) ...[ + // Travel time estimate + Row( + children: [ + Icon(Icons.schedule, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), + const SizedBox(width: 6), + Text( + routeTravelTimeMinutes < 1 ? '< 1 min' : '${routeTravelTimeMinutes.ceil()} min', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: isDark ? Colors.white : Colors.grey[900], + ), + ), + ], + ), + const SizedBox(height: 12), + + // Travel mode toggle chips + Row( + children: [ + for (final mode in ['Walking', 'Accessible']) ...[ + if (mode != 'Walking') const SizedBox(width: 8), + GestureDetector( + onTap: mode == travelMode ? null : () => onTravelModeChanged(mode), + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8), + decoration: BoxDecoration( + color: mode == travelMode + ? (isDark ? Colors.white : Colors.grey[900]) + : (isDark ? Colors.grey[800] : Colors.grey[100]), + borderRadius: BorderRadius.circular(16), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + mode == 'Walking' ? Icons.directions_walk : Icons.accessible, + size: 16, + color: mode == travelMode + ? (isDark ? Colors.grey[900] : Colors.white) + : (isDark ? Colors.white70 : Colors.grey[700]), + ), + const SizedBox(width: 6), + Text( + mode, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w500, + color: mode == travelMode + ? (isDark ? Colors.grey[900] : Colors.white) + : (isDark ? Colors.white70 : Colors.grey[700]), + ), + ), + ], + ), + ), + ), + ], + ], + ), + const SizedBox(height: 12), + + // Google Maps fallback button + SizedBox( + width: double.infinity, + child: OutlinedButton.icon( + onPressed: () => onLaunchWebsite( + 'https://www.google.com/maps/dir/?api=1' + '&destination=${result.latitude},${result.longitude}' + '&travelmode=walking' + '${fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''}', + ), + icon: const Icon(Icons.map_outlined, size: 18), + label: const Text('Navigate in Google Maps'), + style: OutlinedButton.styleFrom( + foregroundColor: isDark ? const Color(0xFFFFCD00) : null, + side: isDark ? const BorderSide(color: Color(0xFFFFCD00)) : null, + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ), + ), + ), + ] else + // Directions + Website buttons + Row( + children: [ + if (result.websiteUrl != null) ...[ + Expanded( + child: OutlinedButton.icon( + onPressed: () => onLaunchWebsite(result.websiteUrl!), + icon: const Icon(Icons.language, size: 18), + label: const Text('View website'), + style: OutlinedButton.styleFrom( + foregroundColor: isDark ? const Color(0xFFFFCD00) : null, + side: isDark ? const BorderSide(color: Color(0xFFFFCD00)) : null, + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ), + ), + ), + const SizedBox(width: 12), + ], + Expanded( + child: FilledButton.icon( + onPressed: isRoutingMode ? null : () => onGetDirections(result), + icon: isRoutingMode + ? const SizedBox( + width: 18, + height: 18, + child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white), + ) + : const Icon(Icons.directions, size: 18), + label: Text(isRoutingMode ? 'Routing...' : 'Get Directions'), + style: FilledButton.styleFrom( + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ), + ), + ), + ], + ), + ], + ), + ), + ), + + // Turn-by-turn maneuver list + if (hasRouteManeuvers) + SliverList( + delegate: SliverChildBuilderDelegate((context, index) { + final step = routeManeuvers[index]; + final distMeters = step.length; + final distLabel = distMeters < 1000 + ? '${distMeters.round()} m' + : '${(distMeters / 1000).toStringAsFixed(1)} km'; + final isNotLastManeuver = index < routeManeuvers.length - 1; + return Column( + children: [ + if (index == 0) const Divider(height: 1), + ListTile( + leading: Icon( + Icons.subdirectory_arrow_right, + size: 20, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + title: Text(step.directionText, style: const TextStyle(fontSize: 14)), + trailing: distMeters > 0 + ? Text( + distLabel, + style: TextStyle(fontSize: 13, color: isDark ? Colors.grey[500] : Colors.grey[500]), + ) + : null, + dense: true, + ), + if (isNotLastManeuver) const Divider(height: 1), + ], + ); + }, childCount: routeManeuvers.length), + ), + ], + ); + }, + ); + } +} diff --git a/lib/ui/esrimap/widgets/esrimap_search_bar.dart b/lib/ui/esrimap/widgets/esrimap_search_bar.dart new file mode 100644 index 000000000..3b040c87e --- /dev/null +++ b/lib/ui/esrimap/widgets/esrimap_search_bar.dart @@ -0,0 +1,426 @@ +/// ============================================================================ +/// File: esrimap_search_bar.dart +/// Description: Floating search input bar and route field selector widget, +/// including AI search trigger and dropdown results list. +/// ============================================================================ + +import 'package:flutter/material.dart'; +import '../esrimap_config.dart'; +import '../models/map_search_result.dart'; + +/// Search input bar and route directions header widget. +class EsriMapSearchBar extends StatelessWidget { + /// Map configuration object gating AI search features. + final EsriMapConfig? config; + + /// Whether route input fields ('From' and 'To') are active. + final bool showRouteFields; + + /// Main search input controller. + final TextEditingController searchController; + + /// Main search focus node. + final FocusNode focusNode; + + /// 'From' origin input controller. + final TextEditingController fromController; + + /// 'From' origin focus node. + final FocusNode fromFocusNode; + + /// 'To' destination input controller. + final TextEditingController toController; + + /// 'To' destination focus node. + final FocusNode toFocusNode; + + /// Whether search suggestions are currently visible. + final bool showSuggestions; + + /// Whether search results are currently visible. + final bool showResults; + + /// Whether a search operation is currently in progress. + final bool isSearching; + + /// Search results returned from backend query. + final List searchResults; + + /// Live matching POI class values. + final List matchingPoiClasses; + + /// Callback when main search text is submitted or changed. + final void Function(String query) onPerformSearch; + + /// Callback when a matching class category item is selected. + final void Function(String classValue) onPerformClassSearch; + + /// Callback when a search result is selected. + final void Function(MapSearchResult result) onSelectResult; + + /// Callback when search bar clear button is tapped. + final VoidCallback onClearSearch; + + /// Callback when route calculation fields are cleared. + final VoidCallback onClearRoute; + + /// Callback when 'From' and 'To' locations are swapped. + final VoidCallback onSwapRouteFields; + + /// Callback when search input field is tapped. + final VoidCallback onTapSearchField; + + /// Callback when 'From' input field focus/tap occurs. + final VoidCallback onTapFromField; + + /// Callback when 'To' input field focus/tap occurs. + final VoidCallback onTapToField; + + /// Callback when 'From' field text changes. + final void Function(String text) onChangedFromField; + + /// Callback when 'To' field text changes. + final void Function(String text) onChangedToField; + + /// Callback when 'From' field clear button is pressed. + final VoidCallback onClearFromField; + + /// Callback when 'To' field clear button is pressed. + final VoidCallback onClearToField; + + /// Callback when AI Search sheet trigger is pressed. + final VoidCallback onOpenAiSearch; + + /// Helper function getting icon for POI class. + final IconData Function(String classValue) iconForClass; + + /// Helper function getting label for POI class. + final String Function(String classValue) labelForClass; + + /// Helper function getting icon for MapSearchResult. + final IconData Function(MapSearchResult result) iconForResult; + + /// Constructs an [EsriMapSearchBar] instance. + const EsriMapSearchBar({ + Key? key, + required this.config, + required this.showRouteFields, + required this.searchController, + required this.focusNode, + required this.fromController, + required this.fromFocusNode, + required this.toController, + required this.toFocusNode, + required this.showSuggestions, + required this.showResults, + required this.isSearching, + required this.searchResults, + required this.matchingPoiClasses, + required this.onPerformSearch, + required this.onPerformClassSearch, + required this.onSelectResult, + required this.onClearSearch, + required this.onClearRoute, + required this.onSwapRouteFields, + required this.onTapSearchField, + required this.onTapFromField, + required this.onTapToField, + required this.onChangedFromField, + required this.onChangedToField, + required this.onClearFromField, + required this.onClearToField, + required this.onOpenAiSearch, + required this.iconForClass, + required this.labelForClass, + required this.iconForResult, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + final isDark = Theme.of(context).brightness == Brightness.dark; + final shouldShowResultsDivider = showResults && (isSearching || searchResults.isNotEmpty); + + return Column( + children: [ + // Direction Route Fields ('From' + 'To') + if (showRouteFields) + Material( + elevation: 4, + borderRadius: BorderRadius.circular(8), + color: isDark ? Colors.grey[850] : Colors.white, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 4), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + // Left route connection indicator dots + Padding( + padding: const EdgeInsets.only(left: 14), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + const Icon(Icons.circle_outlined, size: 12, color: Colors.blue), + Container( + width: 1.5, + height: 24, + color: isDark ? Colors.grey[600] : Colors.grey[300], + ), + const Icon(Icons.circle, size: 12, color: Colors.red), + ], + ), + ), + // Text input fields column + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + // 'From' field + Row( + children: [ + Expanded( + child: TextField( + controller: fromController, + focusNode: fromFocusNode, + style: const TextStyle(fontSize: 16), + decoration: const InputDecoration( + border: InputBorder.none, + contentPadding: EdgeInsets.symmetric(horizontal: 10, vertical: 14), + hintText: 'From', + isDense: true, + ), + onTap: onTapFromField, + onChanged: onChangedFromField, + ), + ), + if (fromController.text.isNotEmpty) + SizedBox( + width: 28, + height: 28, + child: IconButton( + padding: EdgeInsets.zero, + icon: Icon( + Icons.close, + size: 16, + color: isDark ? Colors.white70 : Colors.grey[600], + ), + onPressed: onClearFromField, + ), + ), + ], + ), + const Divider(height: 1, indent: 10, endIndent: 10), + // 'To' field + Row( + children: [ + Expanded( + child: TextField( + controller: toController, + focusNode: toFocusNode, + style: const TextStyle(fontSize: 16), + decoration: const InputDecoration( + border: InputBorder.none, + contentPadding: EdgeInsets.symmetric(horizontal: 10, vertical: 14), + hintText: 'To', + isDense: true, + ), + onTap: onTapToField, + onChanged: onChangedToField, + ), + ), + if (toController.text.isNotEmpty) + SizedBox( + width: 28, + height: 28, + child: IconButton( + padding: EdgeInsets.zero, + icon: Icon( + Icons.close, + size: 16, + color: isDark ? Colors.white70 : Colors.grey[600], + ), + onPressed: onClearToField, + ), + ), + ], + ), + ], + ), + ), + // Close route + Swap locations action buttons + Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + width: 36, + height: 36, + child: IconButton( + padding: EdgeInsets.zero, + icon: const Icon(Icons.close, size: 20, color: Colors.redAccent), + onPressed: onClearRoute, + ), + ), + SizedBox( + width: 36, + height: 36, + child: IconButton( + padding: EdgeInsets.zero, + icon: Icon( + Icons.swap_vert, + size: 20, + color: isDark ? Colors.white70 : Colors.grey[600], + ), + onPressed: onSwapRouteFields, + ), + ), + ], + ), + const SizedBox(width: 4), + ], + ), + ), + ) + else + // Single Search Bar + Material( + elevation: 4, + borderRadius: BorderRadius.circular(8), + color: isDark ? Colors.grey[850] : Colors.white, + child: Row( + children: [ + Padding( + padding: const EdgeInsets.only(left: 12), + child: Icon(Icons.search, color: isDark ? Colors.white70 : Colors.grey[600]), + ), + Expanded( + child: TextField( + controller: searchController, + focusNode: focusNode, + textInputAction: TextInputAction.search, + onSubmitted: onPerformSearch, + onChanged: (text) { + if (text.isEmpty) { + onClearSearch(); + } else { + onPerformSearch(text); + } + }, + onTap: onTapSearchField, + style: const TextStyle(fontSize: 16), + decoration: const InputDecoration( + border: InputBorder.none, + contentPadding: EdgeInsets.symmetric(horizontal: 12, vertical: 16), + hintText: 'Search buildings, places...', + ), + ), + ), + if (searchController.text.isNotEmpty) + IconButton(icon: const Icon(Icons.clear), onPressed: onClearSearch), + if (config?.features.aiSearch ?? false) + IconButton( + icon: Icon( + Icons.auto_awesome, + color: isDark ? Colors.amber[300] : Theme.of(context).colorScheme.primary, + size: 20, + ), + onPressed: onOpenAiSearch, + ), + ], + ), + ), + + // Search Results Dropdown List + if (showResults || (matchingPoiClasses.isNotEmpty && searchController.text.isNotEmpty && !showSuggestions)) + Padding( + padding: const EdgeInsets.only(top: 4), + child: Material( + elevation: 4, + borderRadius: BorderRadius.circular(8), + color: isDark ? Colors.grey[850] : Colors.white, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + // Category matches + if (matchingPoiClasses.isNotEmpty) ...[ + Padding( + padding: const EdgeInsets.fromLTRB(16, 10, 16, 4), + child: Row( + children: [ + Icon( + Icons.category_outlined, + size: 13, + color: isDark ? Colors.grey[500] : Colors.grey[500], + ), + const SizedBox(width: 6), + Text( + 'CATEGORIES', + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w700, + letterSpacing: 0.6, + color: isDark ? Colors.grey[500] : Colors.grey[500], + ), + ), + ], + ), + ), + ...matchingPoiClasses.map( + (classValue) => ListTile( + splashColor: Colors.transparent, + leading: Icon( + iconForClass(classValue), + size: 20, + color: isDark ? Colors.white70 : Colors.grey[700], + ), + title: Text(labelForClass(classValue)), + subtitle: Text( + classValue, + style: TextStyle(fontSize: 13, color: isDark ? Colors.grey[500] : Colors.grey[500]), + ), + dense: true, + onTap: () => onPerformClassSearch(classValue), + ), + ), + if (shouldShowResultsDivider) const Divider(height: 1), + ], + + // Building & POI results list + if (showResults) + isSearching + ? const Padding( + padding: EdgeInsets.all(16), + child: Center(child: CircularProgressIndicator()), + ) + : searchResults.isEmpty + ? (matchingPoiClasses.isEmpty + ? const Padding(padding: EdgeInsets.all(16), child: Text('No results found')) + : const SizedBox.shrink()) + : ConstrainedBox( + constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.4), + child: ListView.separated( + shrinkWrap: true, + padding: EdgeInsets.zero, + itemCount: searchResults.length, + separatorBuilder: (_, __) => const Divider(height: 1), + itemBuilder: (context, index) { + final result = searchResults[index]; + return ListTile( + splashColor: Colors.transparent, + leading: Icon(iconForResult(result)), + title: Text(result.name, maxLines: 1, overflow: TextOverflow.ellipsis), + subtitle: result.subtitle.isNotEmpty + ? Text(result.subtitle, maxLines: 1, overflow: TextOverflow.ellipsis) + : null, + dense: true, + onTap: () => onSelectResult(result), + ); + }, + ), + ), + ], + ), + ), + ), + ], + ); + } +} diff --git a/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart b/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart new file mode 100644 index 000000000..21e6cc53a --- /dev/null +++ b/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart @@ -0,0 +1,181 @@ +/// ============================================================================ +/// File: esrimap_suggestions_panel.dart +/// Description: Dropdown card panel presenting suggested category quick-search +/// chips and recent search history items. +/// ============================================================================ + +import 'package:flutter/material.dart'; +import '../models/esrimap_search_category.dart'; +import '../models/map_search_result.dart'; + +/// Suggestions panel widget rendered below the search bar when focused. +class EsriMapSuggestionsPanel extends StatelessWidget { + /// List of category items to display as icon chips. + final List categories; + + /// List of recently viewed search results. + final List recentSearches; + + /// Whether route directions fields are currently active. + final bool showRouteFields; + + /// Which route field is active ('from' or 'to'). + final String? activeRouteField; + + /// Callback when "Current Location" option is tapped in routing mode. + final VoidCallback onSelectCurrentLocation; + + /// Callback when a category chip is selected. + final void Function(EsriSearchCategory category) onSelectCategory; + + /// Callback when a recent search item is tapped. + final void Function(MapSearchResult result) onSelectRecent; + + /// Callback when the clear 'X' button on a recent search item is tapped. + final void Function(int index) onRemoveRecent; + + /// Constructs an [EsriMapSuggestionsPanel] instance. + const EsriMapSuggestionsPanel({ + Key? key, + required this.categories, + required this.recentSearches, + required this.showRouteFields, + required this.activeRouteField, + required this.onSelectCurrentLocation, + required this.onSelectCategory, + required this.onSelectRecent, + required this.onRemoveRecent, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + final isDark = Theme.of(context).brightness == Brightness.dark; + final bgColor = isDark ? Colors.grey[850] : Colors.white; + + return Material( + elevation: 4, + borderRadius: BorderRadius.circular(8), + color: bgColor, + child: Padding( + padding: EdgeInsets.only( + top: (showRouteFields && activeRouteField == 'from') ? 0 : 12, + bottom: 12, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // "Current Location" shortcut option when 'From' field is active + if (showRouteFields && activeRouteField == 'from') ...[ + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: onSelectCurrentLocation, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 20), + child: Row( + children: [ + Icon( + Icons.my_location, + size: 20, + color: isDark ? Colors.grey[500] : Theme.of(context).colorScheme.primary, + ), + const SizedBox(width: 12), + Text( + 'Current Location', + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w500, + color: isDark ? Colors.white : Theme.of(context).colorScheme.primary, + ), + ), + ], + ), + ), + ), + const Divider(height: 1), + const SizedBox(height: 12), + ], + + // Suggested categories section header + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Text( + 'Suggested', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + ), + ), + const SizedBox(height: 12), + + // Category circular icon chips row + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: categories.map((cat) => _buildCategoryChip(context, cat)).toList(), + ), + ), + + // Recent searches history list + if (recentSearches.isNotEmpty) ...[ + const SizedBox(height: 16), + const Divider(height: 1), + const SizedBox(height: 8), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Text( + 'Recently viewed', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + ), + ), + const SizedBox(height: 4), + ...List.generate(recentSearches.length, (index) { + final recent = recentSearches[index]; + return ListTile( + splashColor: Colors.transparent, + dense: true, + leading: Icon(Icons.history, size: 20, color: isDark ? Colors.grey[500] : Colors.grey[400]), + title: Text(recent.name, maxLines: 1, overflow: TextOverflow.ellipsis), + trailing: GestureDetector( + onTap: () => onRemoveRecent(index), + child: Icon(Icons.close, size: 16, color: isDark ? Colors.grey[500] : Colors.grey[400]), + ), + onTap: () => onSelectRecent(recent), + ); + }), + ], + ], + ), + ), + ); + } + + /// Builds a single circular category quick-search chip. + Widget _buildCategoryChip(BuildContext context, EsriSearchCategory category) { + final isDark = Theme.of(context).brightness == Brightness.dark; + + return GestureDetector( + onTap: () => onSelectCategory(category), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + width: 56, + height: 56, + decoration: BoxDecoration(color: category.color, shape: BoxShape.circle), + child: Icon(category.icon, size: 24, color: Colors.black), + ), + const SizedBox(height: 6), + Text(category.label, style: TextStyle(fontSize: 13, color: isDark ? Colors.grey[400] : Colors.grey[600])), + ], + ), + ); + } +} From 904445f0b5835c1a7e0ea824e81d916180ed6cc6 Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Mon, 27 Jul 2026 23:24:56 +0000 Subject: [PATCH 013/139] style: auto fix formatting violations --- lib/ui/esrimap/esrimap.dart | 35 ++++++------------- lib/ui/esrimap/models/map_search_result.dart | 18 +++++----- .../services/esrimap_auth_handler.dart | 8 ++--- .../services/esrimap_route_service.dart | 4 +-- .../services/esrimap_search_service.dart | 11 +++--- .../widgets/esrimap_category_list_panel.dart | 9 +---- .../widgets/esrimap_detail_slide_over.dart | 6 +--- .../esrimap/widgets/esrimap_search_bar.dart | 30 +++------------- .../widgets/esrimap_suggestions_panel.dart | 5 +-- 9 files changed, 35 insertions(+), 91 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 57e60eee7..e89766b36 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -185,12 +185,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.arcGISMap = _map; _mapViewController.interactionOptions.rotateEnabled = true; - if (!_mapViewController.graphicsOverlays.contains(_graphicsOverlay)) { + if (!_mapViewController.graphicsOverlays.contains(_graphicsOverlay)) _mapViewController.graphicsOverlays.add(_graphicsOverlay); - } - if (!_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay)) { + if (!_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay)) _mapViewController.graphicsOverlays.add(_routeGraphicsOverlay); - } // Configure location display settings _mapViewController.locationDisplay.dataSource = _locationDataSource; @@ -441,9 +439,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { void _addToRecentSearches(MapSearchResult result) { _recentSearches.removeWhere((r) => r.name == result.name && r.source == result.source); _recentSearches.insert(0, result); - if (_recentSearches.length > EsriMapSearchService.maxRecentSearches) { + if (_recentSearches.length > EsriMapSearchService.maxRecentSearches) _recentSearches = _recentSearches.sublist(0, EsriMapSearchService.maxRecentSearches); - } EsriMapSearchService.saveRecentSearches(_recentSearches); } @@ -686,9 +683,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (identifyResult.graphics.isNotEmpty) { final tappedGraphic = identifyResult.graphics.first; final index = tappedGraphic.attributes['resultIndex'] as int?; - if (index != null && index >= 0 && index < _mappedResults.length) { - _selectResultFromPin(_mappedResults[index]); - } + if (index != null && index >= 0 && index < _mappedResults.length) _selectResultFromPin(_mappedResults[index]); } else { if (_selectedResult != null) _closeDetail(); } @@ -976,9 +971,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ); } - if (routeRes.paddedExtent != null) { + if (routeRes.paddedExtent != null) _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(routeRes.paddedExtent!)); - } _graphicsOverlay.graphics.clear(); _mappedResults = []; @@ -1120,9 +1114,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _showResults = false; } }); - if (_detailSheetController.isAttached) { + if (_detailSheetController.isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } } } @@ -1135,9 +1128,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _showResults = false; } }); - if (_detailSheetController.isAttached) { + if (_detailSheetController.isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } } } @@ -1147,14 +1139,12 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return; } if (_showCategoryList && _selectedResult == null) { - if (_categorySheetController.isAttached) { + if (_categorySheetController.isAttached) _categorySheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } } if (_selectedResult != null) { - if (_detailSheetController.isAttached) { + if (_detailSheetController.isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } } } @@ -1245,9 +1235,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ) : null; }); - if (_routeDestination != null && _fromLatLng != null) { + if (_routeDestination != null && _fromLatLng != null) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); - } }, onTapSearchField: () { if (_selectedResult != null) setState(() => _selectedResult = null); @@ -1402,9 +1391,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _solveRoute(res); }, onTravelModeChanged: (mode) { - if (_selectedResult != null) { - _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); - } + if (_selectedResult != null) _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); }, onLaunchWebsite: _launchWebsite, onClose: _closeDetail, diff --git a/lib/ui/esrimap/models/map_search_result.dart b/lib/ui/esrimap/models/map_search_result.dart index ca2e06667..c1f1213f1 100644 --- a/lib/ui/esrimap/models/map_search_result.dart +++ b/lib/ui/esrimap/models/map_search_result.dart @@ -54,15 +54,15 @@ class MapSearchResult { /// Serializes the search result into a JSON-compatible map for storage in SharedPreferences. Map toJson() => { - 'name': name, - 'subtitle': subtitle, - 'latitude': latitude, - 'longitude': longitude, - 'source': source.index, - 'address': address, - 'description': description, - 'websiteUrl': websiteUrl, - }; + 'name': name, + 'subtitle': subtitle, + 'latitude': latitude, + 'longitude': longitude, + 'source': source.index, + 'address': address, + 'description': description, + 'websiteUrl': websiteUrl, + }; /// Factory constructor to deserialize a [MapSearchResult] from a JSON map. factory MapSearchResult.fromJson(Map json) { diff --git a/lib/ui/esrimap/services/esrimap_auth_handler.dart b/lib/ui/esrimap/services/esrimap_auth_handler.dart index 548b6f838..baa750bc2 100644 --- a/lib/ui/esrimap/services/esrimap_auth_handler.dart +++ b/lib/ui/esrimap/services/esrimap_auth_handler.dart @@ -33,15 +33,11 @@ class AgeAuthChallengeHandler implements ArcGISAuthenticationChallengeHandler { if (isAgo) { if (_cachedAgoToken != null && _agoTokenExpiry != null && - DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) { - return (_cachedAgoToken, _agoTokenExpiry); - } + DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) => (_cachedAgoToken, _agoTokenExpiry); } else { if (_cachedAgeToken != null && _ageTokenExpiry != null && - DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) { - return (_cachedAgeToken, _ageTokenExpiry); - } + DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) => (_cachedAgeToken, _ageTokenExpiry); } // Request fresh authentication tokens from server endpoint diff --git a/lib/ui/esrimap/services/esrimap_route_service.dart b/lib/ui/esrimap/services/esrimap_route_service.dart index f4bd6e662..4230f8de7 100644 --- a/lib/ui/esrimap/services/esrimap_route_service.dart +++ b/lib/ui/esrimap/services/esrimap_route_service.dart @@ -54,9 +54,7 @@ class EsriMapRouteService { // Match requested travel mode ('Walking', 'Accessible', etc.) final taskInfo = routeTask.getRouteTaskInfo(); final matchingMode = taskInfo.travelModes.where((m) => m.name == travelMode).firstOrNull; - if (matchingMode != null) { - params.travelMode = matchingMode; - } + if (matchingMode != null) params.travelMode = matchingMode; // Configure origin and destination stops final origin = Stop( diff --git a/lib/ui/esrimap/services/esrimap_search_service.dart b/lib/ui/esrimap/services/esrimap_search_service.dart index 7e41a7f2b..d60dee293 100644 --- a/lib/ui/esrimap/services/esrimap_search_service.dart +++ b/lib/ui/esrimap/services/esrimap_search_service.dart @@ -31,9 +31,7 @@ class EsriMapSearchService { static Future> apiGet(String path, [Map? params]) async { final uri = Uri.parse('$baseUrl/$path').replace(queryParameters: params); final response = await http.get(uri); - if (response.statusCode != 200) { - throw Exception('API error ${response.statusCode}: ${response.body}'); - } + if (response.statusCode != 200) throw Exception('API error ${response.statusCode}: ${response.body}'); return jsonDecode(response.body) as Map; } @@ -44,9 +42,7 @@ class EsriMapSearchService { headers: {'Content-Type': 'application/json'}, body: jsonEncode(body), ); - if (response.statusCode != 200) { - throw Exception('API error ${response.statusCode}: ${response.body}'); - } + if (response.statusCode != 200) throw Exception('API error ${response.statusCode}: ${response.body}'); return jsonDecode(response.body) as Map; } @@ -133,7 +129,8 @@ class EsriMapSearchService { const r = 6371000.0; // Earth radius in meters final dLat = (lat2 - lat1) * math.pi / 180; final dLng = (lng2 - lng1) * math.pi / 180; - final a = math.sin(dLat / 2) * math.sin(dLat / 2) + + final a = + math.sin(dLat / 2) * math.sin(dLat / 2) + math.cos(lat1 * math.pi / 180) * math.cos(lat2 * math.pi / 180) * math.sin(dLng / 2) * math.sin(dLng / 2); return r * 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a)); } diff --git a/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart b/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart index c79c8db2e..b038ba51a 100644 --- a/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart +++ b/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart @@ -67,14 +67,7 @@ class EsriMapCategoryListPanel extends StatelessWidget { userLocation!.$2, a.latitude, a.longitude, - ).compareTo( - EsriMapSearchService.distanceMeters( - userLocation!.$1, - userLocation!.$2, - b.latitude, - b.longitude, - ), - ), + ).compareTo(EsriMapSearchService.distanceMeters(userLocation!.$1, userLocation!.$2, b.latitude, b.longitude)), ); } diff --git a/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart index 6f8f31507..4a25ee3ba 100644 --- a/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart @@ -20,11 +20,7 @@ class SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { final Color backgroundColor; /// Constructs a [SlideOverHeaderDelegate] instance. - SlideOverHeaderDelegate({ - required this.child, - required this.height, - required this.backgroundColor, - }); + SlideOverHeaderDelegate({required this.child, required this.height, required this.backgroundColor}); @override double get minExtent => height; diff --git a/lib/ui/esrimap/widgets/esrimap_search_bar.dart b/lib/ui/esrimap/widgets/esrimap_search_bar.dart index 3b040c87e..177e7c96e 100644 --- a/lib/ui/esrimap/widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/widgets/esrimap_search_bar.dart @@ -160,11 +160,7 @@ class EsriMapSearchBar extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ const Icon(Icons.circle_outlined, size: 12, color: Colors.blue), - Container( - width: 1.5, - height: 24, - color: isDark ? Colors.grey[600] : Colors.grey[300], - ), + Container(width: 1.5, height: 24, color: isDark ? Colors.grey[600] : Colors.grey[300]), const Icon(Icons.circle, size: 12, color: Colors.red), ], ), @@ -198,11 +194,7 @@ class EsriMapSearchBar extends StatelessWidget { height: 28, child: IconButton( padding: EdgeInsets.zero, - icon: Icon( - Icons.close, - size: 16, - color: isDark ? Colors.white70 : Colors.grey[600], - ), + icon: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[600]), onPressed: onClearFromField, ), ), @@ -233,11 +225,7 @@ class EsriMapSearchBar extends StatelessWidget { height: 28, child: IconButton( padding: EdgeInsets.zero, - icon: Icon( - Icons.close, - size: 16, - color: isDark ? Colors.white70 : Colors.grey[600], - ), + icon: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[600]), onPressed: onClearToField, ), ), @@ -264,11 +252,7 @@ class EsriMapSearchBar extends StatelessWidget { height: 36, child: IconButton( padding: EdgeInsets.zero, - icon: Icon( - Icons.swap_vert, - size: 20, - color: isDark ? Colors.white70 : Colors.grey[600], - ), + icon: Icon(Icons.swap_vert, size: 20, color: isDark ? Colors.white70 : Colors.grey[600]), onPressed: onSwapRouteFields, ), ), @@ -345,11 +329,7 @@ class EsriMapSearchBar extends StatelessWidget { padding: const EdgeInsets.fromLTRB(16, 10, 16, 4), child: Row( children: [ - Icon( - Icons.category_outlined, - size: 13, - color: isDark ? Colors.grey[500] : Colors.grey[500], - ), + Icon(Icons.category_outlined, size: 13, color: isDark ? Colors.grey[500] : Colors.grey[500]), const SizedBox(width: 6), Text( 'CATEGORIES', diff --git a/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart b/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart index 21e6cc53a..c91231135 100644 --- a/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart +++ b/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart @@ -57,10 +57,7 @@ class EsriMapSuggestionsPanel extends StatelessWidget { borderRadius: BorderRadius.circular(8), color: bgColor, child: Padding( - padding: EdgeInsets.only( - top: (showRouteFields && activeRouteField == 'from') ? 0 : 12, - bottom: 12, - ), + padding: EdgeInsets.only(top: (showRouteFields && activeRouteField == 'from') ? 0 : 12, bottom: 12), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, From 35053ea36e5609683c4a7e7234030042f75e1ea3 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 16:39:05 -0700 Subject: [PATCH 014/139] fix for pre-commit --- lib/ui/esrimap/esrimap.dart | 402 ++++++++++++------ .../services/esrimap_auth_handler.dart | 8 +- .../services/esrimap_route_service.dart | 12 +- .../services/esrimap_search_service.dart | 35 +- .../widgets/esrimap_category_list_panel.dart | 33 +- .../widgets/esrimap_detail_slide_over.dart | 62 ++- .../esrimap/widgets/esrimap_search_bar.dart | 48 ++- .../widgets/esrimap_suggestions_panel.dart | 13 +- 8 files changed, 409 insertions(+), 204 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index e89766b36..6a4353857 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -7,26 +7,26 @@ import 'dart:async'; import 'package:arcgis_maps/arcgis_maps.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esrimap_ai_search.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esrimap_basemaps.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esrimap_config.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esrimap_fab.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esrimap_layers_panel.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esrimap_scene.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_search_category.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_auth_handler.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_route_service.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_search_service.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_category_list_panel.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_detail_slide_over.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_search_bar.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_suggestions_panel.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; -import 'esrimap_ai_search.dart'; -import 'esrimap_basemaps.dart'; -import 'esrimap_config.dart'; -import 'esrimap_fab.dart'; -import 'esrimap_layers_panel.dart'; -import 'esrimap_scene.dart'; -import 'models/esrimap_search_category.dart'; -import 'models/map_search_result.dart'; -import 'services/esrimap_auth_handler.dart'; -import 'services/esrimap_route_service.dart'; -import 'services/esrimap_search_service.dart'; -import 'widgets/esrimap_category_list_panel.dart'; -import 'widgets/esrimap_detail_slide_over.dart'; -import 'widgets/esrimap_search_bar.dart'; -import 'widgets/esrimap_suggestions_panel.dart'; // Re-export MapSearchResult so callers importing esrimap.dart retain access -export 'models/map_search_result.dart' show MapSearchResult, MapSearchSource; +export 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart' show MapSearchResult, MapSearchSource; /// Primary StatefulWidget for the interactive Esri Campus Map screen. class EsriMap extends StatefulWidget { @@ -120,7 +120,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Returns list of mapped search categories constructed from server configuration. List get _categories { - if (_config == null) return []; + final isConfigNull = _config == null; + if (isConfigNull) return []; return _config!.searchCategories .map( (c) => EsriSearchCategory( @@ -154,7 +155,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Future _fetchConfigThenInit() async { try { final config = await EsriMapConfigService.instance.fetch(); - if (!mounted) return; + final isNotMounted = !mounted; + if (isNotMounted) return; setState(() => _config = config); _initMap(config); _fetchAllPoiClasses(); @@ -185,10 +187,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.arcGISMap = _map; _mapViewController.interactionOptions.rotateEnabled = true; - if (!_mapViewController.graphicsOverlays.contains(_graphicsOverlay)) + final isGraphicsOverlayMissing = !_mapViewController.graphicsOverlays.contains(_graphicsOverlay); + if (isGraphicsOverlayMissing) { _mapViewController.graphicsOverlays.add(_graphicsOverlay); - if (!_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay)) + } + final isRouteOverlayMissing = !_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay); + if (isRouteOverlayMissing) { _mapViewController.graphicsOverlays.add(_routeGraphicsOverlay); + } // Configure location display settings _mapViewController.locationDisplay.dataSource = _locationDataSource; @@ -200,7 +206,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Track map heading rotation changes _viewpointChangedSubscription = _mapViewController.onViewpointChanged.listen((_) { final vp = _mapViewController.getCurrentViewpoint(ViewpointType.centerAndScale); - if (vp != null && mounted) { + final isVpValid = vp != null && mounted; + if (isVpValid) { setState(() { _mapRotation = vp.rotation; final shouldResetVP = !_ignoreViewpointReset && (_isLocationActive || _isRecenterActive); @@ -256,7 +263,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Preloads non-active basemaps into memory. void _preloadAlternateBasemaps() { for (final entry in _basemaps.entries) { - if (entry.key == _currentBasemapType) continue; + final isCurrent = entry.key == _currentBasemapType; + if (isCurrent) continue; entry.value.load().catchError((Object e) { debugPrint('Failed to preload basemap ${entry.key}: $e'); }); @@ -265,9 +273,11 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Switches active basemap without resetting viewpoint frame. void _switchBasemap(BasemapType newType) { - if (newType == _currentBasemapType) return; + final isSameType = newType == _currentBasemapType; + if (isSameType) return; final newBasemap = _basemaps[newType]; - if (newBasemap == null) return; + final isBasemapNull = newBasemap == null; + if (isBasemapNull) return; setState(() { _map.basemap = newBasemap; @@ -277,37 +287,49 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Switches between 2D map view and 3D portal scene views. void _setSceneMode(String key) { - if (key == _sceneMode) return; + final isSameMode = key == _sceneMode; + if (isSameMode) return; setState(() { _sceneMode = key; - if (key != 'default') _showLayersPanel = false; - if (_config == null) return; + final isNotDefault = key != 'default'; + if (isNotDefault) _showLayersPanel = false; + final isConfigNull = _config == null; + if (isConfigNull) return; + final scene = _config!.scenes[key]; - if (scene == null || scene.type != 'scene') return; + final isInvalidScene = scene == null || scene.type != 'scene'; + if (isInvalidScene) return; + final portalUrl = scene.portalKey != null ? _config!.portals[scene.portalKey!] : null; - if (portalUrl == null || scene.itemId == null) return; + final isMissingPortalItem = portalUrl == null || scene.itemId == null; + if (isMissingPortalItem) return; + + final isBuilding3DMode = key == 'building3d' && _scene3DWidget == null; + final isDroneViewMode = key == 'droneView' && _sceneDroneWidget == null; - if (key == 'building3d' && _scene3DWidget == null) { + if (isBuilding3DMode) { _scene3DWidget = EsriSceneWidget( key: _scene3DKey, portalUri: portalUrl, itemId: scene.itemId!, onHeadingChanged: (h) => setState(() { _mapRotation = h; - if (!_ignoreViewpointReset && (_isLocationActive || _isRecenterActive)) { + final shouldResetVP3D = !_ignoreViewpointReset && (_isLocationActive || _isRecenterActive); + if (shouldResetVP3D) { _isLocationActive = false; _isRecenterActive = false; } }), ); - } else if (key == 'droneView' && _sceneDroneWidget == null) { + } else if (isDroneViewMode) { _sceneDroneWidget = EsriSceneWidget( key: _sceneDroneKey, portalUri: portalUrl, itemId: scene.itemId!, onHeadingChanged: (h) => setState(() { _mapRotation = h; - if (!_ignoreViewpointReset && (_isLocationActive || _isRecenterActive)) { + final shouldResetVPDrone = !_ignoreViewpointReset && (_isLocationActive || _isRecenterActive); + if (shouldResetVPDrone) { _isLocationActive = false; _isRecenterActive = false; } @@ -320,13 +342,16 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Toggles visibility of operational layers configured in map settings. void _toggleLayer(String key) async { final entry = _config?.layers[key]; - if (entry == null) return; + final isEntryNull = entry == null; + if (isEntryNull) return; - if (_layerVisible[key] == true) { + final isAlreadyVisible = _layerVisible[key] == true; + if (isAlreadyVisible) { _layerTimers[key]?.cancel(); _layerTimers.remove(key); for (final layer in _layerInstances[key] ?? []) { - if (layer != null) _map.operationalLayers.remove(layer); + final isLayerNotNull = layer != null; + if (isLayerNotNull) _map.operationalLayers.remove(layer); } _layerInstances.remove(key); setState(() => _layerVisible[key] = false); @@ -338,7 +363,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _layerInstances[key] = instances; for (final layer in instances) { - if (layer != null) _map.operationalLayers.add(layer); + final isLayerNotNull = layer != null; + if (isLayerNotNull) _map.operationalLayers.add(layer); } try { @@ -362,8 +388,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } Layer? _layerFromSublayer(SublayerEntry sub) { - if (sub.source == 'url' && sub.url != null) { - return sub.url!.contains('FeatureServer') + final isUrlSub = sub.source == 'url' && sub.url != null; + if (isUrlSub) { + final isFeatureServer = sub.url!.contains('FeatureServer'); + return isFeatureServer ? FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse(sub.url!))) : ArcGISMapImageLayer.withUri(Uri.parse(sub.url!)); } @@ -371,8 +399,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } Layer? _layerFromEntry(LayerEntry entry) { - if (entry.source == 'url' && entry.url != null) { - return entry.url!.contains('FeatureServer') + final isUrlEntry = entry.source == 'url' && entry.url != null; + if (isUrlEntry) { + final isFeatureServer = entry.url!.contains('FeatureServer'); + return isFeatureServer ? FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse(entry.url!))) : ArcGISMapImageLayer.withUri(Uri.parse(entry.url!)); } @@ -380,43 +410,52 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _applyLayerSpecialCases(String key, List instances) { - if (key == 'campusDistricts' && instances.isNotEmpty && instances.first is ArcGISMapImageLayer) { + final isCampusDistricts = key == 'campusDistricts' && instances.isNotEmpty && instances.first is ArcGISMapImageLayer; + if (isCampusDistricts) { final imageLayer = instances.first as ArcGISMapImageLayer; for (final sub in imageLayer.mapImageSublayers) { - sub.isVisible = sub.id == 4; + final isSublayerFour = sub.id == 4; + sub.isVisible = isSublayerFour; } } } void _startLayerRefreshTimer(String key, LayerEntry entry) { final subs = entry.sublayers; - if (subs == null) return; + final isSubsNull = subs == null; + if (isSubsNull) return; int? capturedIdx; int? interval; for (int i = 0; i < subs.length; i++) { - if (subs[i].refreshInterval > 0) { + final hasRefresh = subs[i].refreshInterval > 0; + if (hasRefresh) { capturedIdx = i; interval = subs[i].refreshInterval; break; } } - if (capturedIdx == null || interval == null) return; + final isInvalidRefreshConfig = capturedIdx == null || interval == null; + if (isInvalidRefreshConfig) return; final idx = capturedIdx; final sub = subs[idx]; _layerTimers[key] = Timer.periodic(Duration(seconds: interval), (_) async { - if (!mounted) return; + final isNotMounted = !mounted; + if (isNotMounted) return; final instances = _layerInstances[key]; - if (instances == null || idx >= instances.length) return; + final isInvalidInstances = instances == null || idx >= instances.length; + if (isInvalidInstances) return; final oldLayer = instances[idx]; - if (oldLayer != null) _map.operationalLayers.remove(oldLayer); + final isOldLayerNotNull = oldLayer != null; + if (isOldLayerNotNull) _map.operationalLayers.remove(oldLayer); final newLayer = _layerFromSublayer(sub); instances[idx] = newLayer; - if (newLayer != null) { + final isNewLayerNotNull = newLayer != null; + if (isNewLayerNotNull) { _map.operationalLayers.add(newLayer); try { await newLayer.load(); @@ -439,8 +478,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { void _addToRecentSearches(MapSearchResult result) { _recentSearches.removeWhere((r) => r.name == result.name && r.source == result.source); _recentSearches.insert(0, result); - if (_recentSearches.length > EsriMapSearchService.maxRecentSearches) - _recentSearches = _recentSearches.sublist(0, EsriMapSearchService.maxRecentSearches); + final isExceedingMax = _recentSearches.length > EsriMapSearchService.MAX_RECENT_SEARCHES; + if (isExceedingMax) { + _recentSearches = _recentSearches.sublist(0, EsriMapSearchService.MAX_RECENT_SEARCHES); + } EsriMapSearchService.saveRecentSearches(_recentSearches); } @@ -456,7 +497,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Text search: queries buildings and POIs concurrently. Future _performSearch(String query) async { - if (query.trim().isEmpty) return; + final isQueryEmpty = query.trim().isEmpty; + if (isQueryEmpty) return; final q = query.toLowerCase(); final matched = _allPoiClasses.where((c) => c.toLowerCase().contains(q)).toList(); @@ -551,9 +593,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { for (int i = 0; i < results.length; i++) { final result = results[i]; final point = ArcGISPoint(x: result.longitude, y: result.latitude, spatialReference: SpatialReference.wgs84); + final isBuilding = result.source == MapSearchSource.building; final graphic = Graphic( geometry: point, - symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.red, size: 14), + symbol: SimpleMarkerSymbol( + style: SimpleMarkerSymbolStyle.circle, + color: isBuilding ? Colors.blue : Colors.red, + size: 14, + ), ); graphic.attributes['resultIndex'] = i; _graphicsOverlay.graphics.add(graphic); @@ -561,9 +608,11 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _zoomToResults(List results) { - if (results.isEmpty) return; + final isResultsEmpty = results.isEmpty; + if (isResultsEmpty) return; - if (results.length == 1) { + final isSingleResult = results.length == 1; + if (isSingleResult) { final r = results.first; _mapViewController.setViewpointAnimated( Viewpoint.fromCenter( @@ -591,13 +640,17 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _seeAllCategoryResults() { - if (_allCategoryResults.isEmpty) return; + final isAllCategoryResultsEmpty = _allCategoryResults.isEmpty; + if (isAllCategoryResultsEmpty) return; _zoomToResults(_allCategoryResults); } void _selectResult(MapSearchResult result) { - if (_showRouteFields && _activeRouteField != null) { - if (_activeRouteField == 'from') { + final isRouteModeActive = _showRouteFields && _activeRouteField != null; + if (isRouteModeActive) { + final isFromActive = _activeRouteField == 'from'; + final isToActive = _activeRouteField == 'to'; + if (isFromActive) { _fromController.text = result.name; _fromLatLng = (result.latitude, result.longitude); _graphicsOverlay.graphics.clear(); @@ -610,8 +663,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _activeCategory = null; }); _fromFocusNode.unfocus(); - if (_routeDestination != null) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); - } else if (_activeRouteField == 'to') { + final hasRouteDestination = _routeDestination != null; + if (hasRouteDestination) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + } else if (isToActive) { _toController.text = result.name; _routeDestination = result; _graphicsOverlay.graphics.clear(); @@ -634,11 +688,12 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _graphicsOverlay.graphics.clear(); final point = ArcGISPoint(x: result.longitude, y: result.latitude, spatialReference: SpatialReference.wgs84); + final isBuilding = result.source == MapSearchSource.building; final graphic = Graphic( geometry: point, symbol: SimpleMarkerSymbol( style: SimpleMarkerSymbolStyle.circle, - color: result.source == MapSearchSource.building ? Colors.blue : Colors.red, + color: isBuilding ? Colors.blue : Colors.red, size: 14, ), ); @@ -658,7 +713,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } Future _onMapTap(Offset screenPoint) async { - if (_showSuggestions || _showResults) { + final isDropdownVisible = _showSuggestions || _showResults; + if (isDropdownVisible) { setState(() { _showSuggestions = false; _showResults = false; @@ -667,8 +723,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return; } - if (_mappedResults.isEmpty) { - if (_selectedResult != null) _closeDetail(); + final isMappedResultsEmpty = _mappedResults.isEmpty; + if (isMappedResultsEmpty) { + final isSelectedResultNotNull = _selectedResult != null; + if (isSelectedResultNotNull) _closeDetail(); return; } @@ -680,12 +738,17 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { maximumResults: 1, ); - if (identifyResult.graphics.isNotEmpty) { + final hasGraphics = identifyResult.graphics.isNotEmpty; + if (hasGraphics) { final tappedGraphic = identifyResult.graphics.first; final index = tappedGraphic.attributes['resultIndex'] as int?; - if (index != null && index >= 0 && index < _mappedResults.length) _selectResultFromPin(_mappedResults[index]); + final isValidResultIndex = index != null && index >= 0 && index < _mappedResults.length; + if (isValidResultIndex) { + _selectResultFromPin(_mappedResults[index]); + } } else { - if (_selectedResult != null) _closeDetail(); + final isSelectedResultNotNull = _selectedResult != null; + if (isSelectedResultNotNull) _closeDetail(); } } catch (e) { debugPrint('Identify error: $e'); @@ -694,7 +757,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { void _selectResultFromPin(MapSearchResult result) { if (_showRouteFields) { - if (_activeRouteField == 'from') { + final isFromActive = _activeRouteField == 'from'; + if (isFromActive) { _fromController.text = result.name; _fromLatLng = (result.latitude, result.longitude); _graphicsOverlay.graphics.clear(); @@ -707,7 +771,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _activeCategory = null; }); _fromFocusNode.unfocus(); - if (_routeDestination != null) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + final hasRouteDestination = _routeDestination != null; + if (hasRouteDestination) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); } else { _toController.text = result.name; _routeDestination = result; @@ -757,12 +822,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _recenterOnUser() { - if (!_locationStarted) { + final isLocationNotStarted = !_locationStarted; + if (isLocationNotStarted) { _startLocationDisplay(); return; } final loc = _mapViewController.locationDisplay.location; - if (loc == null) return; + final isLocationNull = loc == null; + if (isLocationNull) return; _mapViewController.locationDisplay.autoPanMode = LocationDisplayAutoPanMode.recenter; _ignoreViewpointReset = true; @@ -781,16 +848,23 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Future.delayed(const Duration(milliseconds: 1500), () { if (mounted) _ignoreViewpointReset = false; }); - if (_sceneMode != 'default') { - if (_sceneMode == 'building3d') { - _scene3DKey.currentState?.resetCamera(); + + final isNotDefaultScene = _sceneMode != 'default'; + if (isNotDefaultScene) { + final isBuilding3D = _sceneMode == 'building3d'; + if (isBuilding3D) { + _scene3DKey.currentState?.snapToNorth(); } else { - _sceneDroneKey.currentState?.resetCamera(); + _sceneDroneKey.currentState?.snapToNorth(); } return; } - if (_selectedResult != null) { + final isSelectedResultNotNull = _selectedResult != null; + final hasLastResultNoMapped = _lastSelectedResult != null && _mappedResults.isEmpty; + final hasMappedResults = _mappedResults.isNotEmpty; + + if (isSelectedResultNotNull) { _mapViewController.setViewpointAnimated( Viewpoint.fromCenter( ArcGISPoint( @@ -801,7 +875,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { scale: 5000, ), ); - } else if (_lastSelectedResult != null && _mappedResults.isEmpty) { + } else if (hasLastResultNoMapped) { _mapViewController.setViewpointAnimated( Viewpoint.fromCenter( ArcGISPoint( @@ -812,7 +886,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { scale: 5000, ), ); - } else if (_mappedResults.isNotEmpty) { + } else if (hasMappedResults) { _zoomToResults(_mappedResults); } else { _mapViewController.setViewpointAnimated( @@ -825,8 +899,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _snapToNorth() { - if (_sceneMode != 'default') { - if (_sceneMode == 'building3d') { + final isNotDefaultScene = _sceneMode != 'default'; + if (isNotDefaultScene) { + final isBuilding3D = _sceneMode == 'building3d'; + if (isBuilding3D) { _scene3DKey.currentState?.snapToNorth(); } else { _sceneDroneKey.currentState?.snapToNorth(); @@ -868,19 +944,21 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { void _clearRoute() { _routeGraphicsOverlay.graphics.clear(); final destination = _selectedResult; - if (destination != null) { + final isDestinationNotNull = destination != null; + if (isDestinationNotNull) { final point = ArcGISPoint( x: destination.longitude, y: destination.latitude, spatialReference: SpatialReference.wgs84, ); + final isBuilding = destination.source == MapSearchSource.building; _graphicsOverlay.graphics.clear(); _graphicsOverlay.graphics.add( Graphic( geometry: point, symbol: SimpleMarkerSymbol( style: SimpleMarkerSymbolStyle.circle, - color: destination.source == MapSearchSource.building ? Colors.blue : Colors.red, + color: isBuilding ? Colors.blue : Colors.red, size: 14, ), ), @@ -907,7 +985,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Future _solveRoute(MapSearchResult destination, {String? travelMode, (double, double)? originLatLng}) async { final userLatLng = originLatLng ?? _getUserLatLng(); - if (userLatLng == null) { + final isUserLatLngNull = userLatLng == null; + if (isUserLatLngNull) { setState(() => _isRouting = false); return; } @@ -925,7 +1004,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { travelMode: mode, ); - if (routeRes == null) { + final isRouteResNull = routeRes == null; + if (isRouteResNull) { if (mounted) { setState(() { _isRouting = false; @@ -939,7 +1019,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _routeManeuvers = routeRes.directionManeuvers; _routeGraphicsOverlay.graphics.clear(); - if (routeRes.routeGeometry != null) { + final hasRouteGeometry = routeRes.routeGeometry != null; + if (hasRouteGeometry) { _routeGraphicsOverlay.graphics.add( Graphic( geometry: routeRes.routeGeometry!, @@ -961,7 +1042,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), ); - if (originLatLng != null) { + final hasOriginLatLng = originLatLng != null; + if (hasOriginLatLng) { _routeGraphicsOverlay.graphics.add( Graphic( geometry: ArcGISPoint(x: originLatLng.$2, y: originLatLng.$1, spatialReference: SpatialReference.wgs84), @@ -971,8 +1053,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ); } - if (routeRes.paddedExtent != null) + final hasPaddedExtent = routeRes.paddedExtent != null; + if (hasPaddedExtent) { _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(routeRes.paddedExtent!)); + } _graphicsOverlay.graphics.clear(); _mappedResults = []; @@ -994,22 +1078,27 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { (double lat, double lng)? _getUserLatLng() { final pos = _mapViewController.locationDisplay.location?.position; - if (pos == null) return null; + final isPosNull = pos == null; + if (isPosNull) return null; final wgs = GeometryEngine.project(pos, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; - if (wgs == null) return null; + final isWgsNull = wgs == null; + if (isWgsNull) return null; return (wgs.y, wgs.x); } Envelope? _getViewportEnvelopeWGS84() { final vp = _mapViewController.getCurrentViewpoint(ViewpointType.boundingGeometry); final geom = vp?.targetGeometry; - if (geom == null) return null; + final isGeomNull = geom == null; + if (isGeomNull) return null; final projected = GeometryEngine.project(geom, outputSpatialReference: SpatialReference.wgs84); return projected as Envelope?; } - IconData _iconForResult(MapSearchResult result) => - result.source == MapSearchSource.building ? Icons.business : Icons.place; + IconData _iconForResult(MapSearchResult result) { + final isBuilding = result.source == MapSearchSource.building; + return isBuilding ? Icons.business : Icons.place; + } IconData _iconForClass(String classValue) { return _categories @@ -1022,12 +1111,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { String _labelForClass(String classValue) { final match = _categories.where((c) => c.poiClassValue.toLowerCase() == classValue.toLowerCase()); - return match.isNotEmpty ? match.first.label : classValue; + final hasMatch = match.isNotEmpty; + return hasMatch ? match.first.label : classValue; } Future _launchWebsite(String url) async { final uri = Uri.parse(url); - if (await canLaunchUrl(uri)) await launchUrl(uri, mode: LaunchMode.externalApplication); + final canLaunch = await canLaunchUrl(uri); + if (canLaunch) await launchUrl(uri, mode: LaunchMode.externalApplication); } void _onAiLocationSelected(AiSearchResult result) { @@ -1059,10 +1150,12 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _onAiRouteRequested(List stops) { - if (stops.isEmpty) return; + final isStopsEmpty = stops.isEmpty; + if (isStopsEmpty) return; final AiSearchResult destination = stops.last; - final AiSearchResult? origin = stops.length >= 2 ? stops.first : null; + final hasMultipleStops = stops.length >= 2; + final AiSearchResult? origin = hasMultipleStops ? stops.first : null; final destResult = MapSearchResult( name: destination.name, @@ -1073,12 +1166,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { address: destination.address, ); - if (origin != null) { + final hasOrigin = origin != null; + if (hasOrigin) { _fromController.text = origin.name; _fromLatLng = (origin.latitude, origin.longitude); } else { final gps = _getUserLatLng(); - _fromController.text = gps != null ? 'My Location' : ''; + final hasGps = gps != null; + _fromController.text = hasGps ? 'My Location' : ''; _fromLatLng = gps; } @@ -1097,7 +1192,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _onFocusChanged() { - if (_focusNode.hasFocus && _searchController.text.isEmpty) { + final isSearchFocusEmpty = _focusNode.hasFocus && _searchController.text.isEmpty; + if (isSearchFocusEmpty) { setState(() { _showSuggestions = true; _showResults = false; @@ -1106,30 +1202,38 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _onFromFocusChanged() { - if (_fromFocusNode.hasFocus) { + final hasFromFocus = _fromFocusNode.hasFocus; + if (hasFromFocus) { setState(() { _activeRouteField = 'from'; - if (_fromController.text.isEmpty) { + final isFromEmpty = _fromController.text.isEmpty; + if (isFromEmpty) { _showSuggestions = true; _showResults = false; } }); - if (_detailSheetController.isAttached) + final isAttached = _detailSheetController.isAttached; + if (isAttached) { _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + } } } void _onToFocusChanged() { - if (_toFocusNode.hasFocus) { + final hasToFocus = _toFocusNode.hasFocus; + if (hasToFocus) { setState(() { _activeRouteField = 'to'; - if (_toController.text.isEmpty) { + final isToEmpty = _toController.text.isEmpty; + if (isToEmpty) { _showSuggestions = true; _showResults = false; } }); - if (_detailSheetController.isAttached) + final isAttached = _detailSheetController.isAttached; + if (isAttached) { _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + } } } @@ -1138,13 +1242,19 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { setState(() => _showLayersPanel = false); return; } - if (_showCategoryList && _selectedResult == null) { - if (_categorySheetController.isAttached) + final isCategoryListOpen = _showCategoryList && _selectedResult == null; + if (isCategoryListOpen) { + final isAttached = _categorySheetController.isAttached; + if (isAttached) { _categorySheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + } } - if (_selectedResult != null) { - if (_detailSheetController.isAttached) + final isSelectedResultOpen = _selectedResult != null; + if (isSelectedResultOpen) { + final isAttached = _detailSheetController.isAttached; + if (isAttached) { _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + } } } @@ -1159,6 +1269,20 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final keyboardVisible = MediaQuery.of(context).viewInsets.bottom > 0; final shouldShowCatListPanel = _showCategoryList && _selectedResult == null && _allCategoryResults.isNotEmpty; + final isDefaultScene = _sceneMode == 'default'; + final isBuilding3dScene = _sceneMode == 'building3d'; + final isDroneViewScene = _sceneMode == 'droneView'; + + final indexedStackIndex = isBuilding3dScene ? 1 : (isDroneViewScene ? 2 : 0); + + final isFabVisible = !keyboardVisible && + !_focusNode.hasFocus && + !_fromFocusNode.hasFocus && + !_toFocusNode.hasFocus && + !_showLayersPanel; + + final isLayersPanelVisible = _showLayersPanel && _config != null; + return Scaffold( body: Stack( children: [ @@ -1167,11 +1291,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { children: [ Expanded( child: IndexedStack( - index: _sceneMode == 'building3d' - ? 1 - : _sceneMode == 'droneView' - ? 2 - : 0, + index: indexedStackIndex, children: [ Listener( onPointerDown: _onMapPointerDown, @@ -1190,7 +1310,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), // Floating top search bar & suggestion panel - if (_sceneMode == 'default') + if (isDefaultScene) Positioned( top: 8, left: 12, @@ -1222,10 +1342,12 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _fromController.text = _toController.text; _toController.text = tmpText; setState(() { - _fromLatLng = _routeDestination != null + final hasRouteDestination = _routeDestination != null; + _fromLatLng = hasRouteDestination ? (_routeDestination!.latitude, _routeDestination!.longitude) : null; - _routeDestination = tmpLatLng != null + final hasTmpLatLng = tmpLatLng != null; + _routeDestination = hasTmpLatLng ? MapSearchResult( name: tmpText, subtitle: '', @@ -1235,12 +1357,16 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ) : null; }); - if (_routeDestination != null && _fromLatLng != null) + final canSolveRoute = _routeDestination != null && _fromLatLng != null; + if (canSolveRoute) { _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + } }, onTapSearchField: () { - if (_selectedResult != null) setState(() => _selectedResult = null); - if (_searchController.text.isEmpty) { + final hasSelectedResult = _selectedResult != null; + if (hasSelectedResult) setState(() => _selectedResult = null); + final isSearchTextEmpty = _searchController.text.isEmpty; + if (isSearchTextEmpty) { setState(() { _showSuggestions = true; _showResults = false; @@ -1263,9 +1389,11 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }, onChangedFromField: (text) { _fromLatLng = null; - if (text.length >= 3) { + final isLongEnough = text.length >= 3; + final isTextEmpty = text.isEmpty; + if (isLongEnough) { _performSearch(text); - } else if (text.isEmpty) { + } else if (isTextEmpty) { setState(() { _showResults = false; _showSuggestions = true; @@ -1278,9 +1406,11 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } }, onChangedToField: (text) { - if (text.length >= 3) { + final isLongEnough = text.length >= 3; + final isTextEmpty = text.isEmpty; + if (isLongEnough) { _performSearch(text); - } else if (text.isEmpty) { + } else if (isTextEmpty) { setState(() { _showResults = false; _showSuggestions = true; @@ -1328,7 +1458,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { activeRouteField: _activeRouteField, onSelectCurrentLocation: () { final gps = _getUserLatLng(); - if (gps == null) return; + final isGpsNull = gps == null; + if (isGpsNull) return; _fromController.text = 'My Location'; _fromLatLng = gps; setState(() { @@ -1336,7 +1467,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _showResults = false; }); _fromFocusNode.unfocus(); - if (_routeDestination != null) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + final hasRouteDestination = _routeDestination != null; + if (hasRouteDestination) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); }, onSelectCategory: _performCategorySearch, onSelectRecent: _selectResult, @@ -1376,7 +1508,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { fromLatLng: _fromLatLng, onGetDirections: (res) { final gps = _getUserLatLng(); - _fromController.text = gps != null ? 'My Location' : ''; + final hasGps = gps != null; + _fromController.text = hasGps ? 'My Location' : ''; _toController.text = res.name; _routeDestination = res; _graphicsOverlay.graphics.clear(); @@ -1391,7 +1524,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _solveRoute(res); }, onTravelModeChanged: (mode) { - if (_selectedResult != null) _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); + final hasSelectedResult = _selectedResult != null; + if (hasSelectedResult) { + _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); + } }, onLaunchWebsite: _launchWebsite, onClose: _closeDetail, @@ -1399,11 +1535,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), // Top-right FAB cluster (Compass, Recenter, Location, Layers) - if (!keyboardVisible && - !_focusNode.hasFocus && - !_fromFocusNode.hasFocus && - !_toFocusNode.hasFocus && - !_showLayersPanel) + if (isFabVisible) Positioned( top: MediaQuery.of(context).padding.top + 68, right: 16, @@ -1421,7 +1553,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), // Basemap & Operational Layer Selector Panel - if (_showLayersPanel && _config != null) + if (isLayersPanelVisible) EsriMapLayersPanel( config: _config!, currentBasemapType: _currentBasemapType, diff --git a/lib/ui/esrimap/services/esrimap_auth_handler.dart b/lib/ui/esrimap/services/esrimap_auth_handler.dart index baa750bc2..548b6f838 100644 --- a/lib/ui/esrimap/services/esrimap_auth_handler.dart +++ b/lib/ui/esrimap/services/esrimap_auth_handler.dart @@ -33,11 +33,15 @@ class AgeAuthChallengeHandler implements ArcGISAuthenticationChallengeHandler { if (isAgo) { if (_cachedAgoToken != null && _agoTokenExpiry != null && - DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) => (_cachedAgoToken, _agoTokenExpiry); + DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) { + return (_cachedAgoToken, _agoTokenExpiry); + } } else { if (_cachedAgeToken != null && _ageTokenExpiry != null && - DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) => (_cachedAgeToken, _ageTokenExpiry); + DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) { + return (_cachedAgeToken, _ageTokenExpiry); + } } // Request fresh authentication tokens from server endpoint diff --git a/lib/ui/esrimap/services/esrimap_route_service.dart b/lib/ui/esrimap/services/esrimap_route_service.dart index 4230f8de7..222e96a9f 100644 --- a/lib/ui/esrimap/services/esrimap_route_service.dart +++ b/lib/ui/esrimap/services/esrimap_route_service.dart @@ -5,8 +5,8 @@ /// ============================================================================ import 'package:arcgis_maps/arcgis_maps.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; import 'package:flutter/material.dart'; -import '../models/map_search_result.dart'; /// Result data structure holding the outcome of a solved route calculation. class EsriRouteResult { @@ -34,7 +34,7 @@ class EsriRouteResult { /// Service class encapsulating ArcGIS Route Task execution. class EsriMapRouteService { /// Endpoint URL for the UCSD Campus Wayfinding Network service. - static const String routeServiceUrl = + static const String ROUTE_SERVICE_URL = 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/' 'Wayfinding/Campus_Wayfinding_Network/NAServer/Route'; @@ -45,7 +45,7 @@ class EsriMapRouteService { required String travelMode, }) async { try { - final routeTask = RouteTask.withUri(Uri.parse(routeServiceUrl)); + final routeTask = RouteTask.withUri(Uri.parse(ROUTE_SERVICE_URL)); await routeTask.load(); final params = await routeTask.createDefaultParameters(); @@ -67,11 +67,13 @@ class EsriMapRouteService { // Solve route final result = await routeTask.solveRoute(params); - if (result.routes.isEmpty) return null; + final isResultEmpty = result.routes.isEmpty; + if (isResultEmpty) return null; final route = result.routes.first; final routeGeometry = route.routeGeometry; - if (routeGeometry == null) return null; + final isGeometryNull = routeGeometry == null; + if (isGeometryNull) return null; // Compute padded extent so the route line stays visible above bottom sheets final extent = routeGeometry.extent; diff --git a/lib/ui/esrimap/services/esrimap_search_service.dart b/lib/ui/esrimap/services/esrimap_search_service.dart index d60dee293..4f77db09c 100644 --- a/lib/ui/esrimap/services/esrimap_search_service.dart +++ b/lib/ui/esrimap/services/esrimap_search_service.dart @@ -7,21 +7,21 @@ import 'dart:convert'; import 'dart:math' as math; import 'package:arcgis_maps/arcgis_maps.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; import 'package:shared_preferences/shared_preferences.dart'; -import '../models/map_search_result.dart'; /// Service class managing location queries, POI class lookup, and local search history. class EsriMapSearchService { /// Base API URL endpoint. - static const String baseUrl = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; + static const String BASE_URL = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; /// SharedPreferences key used to persist recent searches. - static const String recentSearchesKey = 'esri_map_recent_searches'; + static const String RECENT_SEARCHES_KEY = 'esri_map_recent_searches'; /// Maximum number of recent searches retained. - static const int maxRecentSearches = 5; + static const int MAX_RECENT_SEARCHES = 5; // --------------------------------------------------------------------------- // REST API Helpers @@ -29,20 +29,26 @@ class EsriMapSearchService { /// Performs an HTTP GET request to the specified [path] with optional query [params]. static Future> apiGet(String path, [Map? params]) async { - final uri = Uri.parse('$baseUrl/$path').replace(queryParameters: params); + final uri = Uri.parse('$BASE_URL/$path').replace(queryParameters: params); final response = await http.get(uri); - if (response.statusCode != 200) throw Exception('API error ${response.statusCode}: ${response.body}'); + final isResNotOk = response.statusCode != 200; + if (isResNotOk) { + throw Exception('API error ${response.statusCode}: ${response.body}'); + } return jsonDecode(response.body) as Map; } /// Performs an HTTP POST request to the specified [path] with a JSON [body]. static Future> apiPost(String path, Map body) async { final response = await http.post( - Uri.parse('$baseUrl/$path'), + Uri.parse('$BASE_URL/$path'), headers: {'Content-Type': 'application/json'}, body: jsonEncode(body), ); - if (response.statusCode != 200) throw Exception('API error ${response.statusCode}: ${response.body}'); + final isResNotOk = response.statusCode != 200; + if (isResNotOk) { + throw Exception('API error ${response.statusCode}: ${response.body}'); + } return jsonDecode(response.body) as Map; } @@ -115,7 +121,8 @@ class EsriMapSearchService { /// Filters a list of [results] down to those located within the specified [envelope]. static List filterToViewport(List results, Envelope? envelope) { - if (envelope == null) return results; + final isEnvelopeNull = envelope == null; + if (isEnvelopeNull) return results; return results.where((r) { return r.latitude >= envelope.yMin && r.latitude <= envelope.yMax && @@ -129,8 +136,7 @@ class EsriMapSearchService { const r = 6371000.0; // Earth radius in meters final dLat = (lat2 - lat1) * math.pi / 180; final dLng = (lng2 - lng1) * math.pi / 180; - final a = - math.sin(dLat / 2) * math.sin(dLat / 2) + + final a = math.sin(dLat / 2) * math.sin(dLat / 2) + math.cos(lat1 * math.pi / 180) * math.cos(lat2 * math.pi / 180) * math.sin(dLng / 2) * math.sin(dLng / 2); return r * 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a)); } @@ -142,8 +148,9 @@ class EsriMapSearchService { /// Loads stored recent searches from [SharedPreferences]. static Future> loadRecentSearches() async { final prefs = await SharedPreferences.getInstance(); - final jsonStr = prefs.getString(recentSearchesKey); - if (jsonStr != null) { + final jsonStr = prefs.getString(RECENT_SEARCHES_KEY); + final hasJsonStr = jsonStr != null; + if (hasJsonStr) { try { final list = jsonDecode(jsonStr) as List; return list.map((e) => MapSearchResult.fromJson(e as Map)).toList(); @@ -158,6 +165,6 @@ class EsriMapSearchService { static Future saveRecentSearches(List searches) async { final prefs = await SharedPreferences.getInstance(); final jsonStr = jsonEncode(searches.map((r) => r.toJson()).toList()); - await prefs.setString(recentSearchesKey, jsonStr); + await prefs.setString(RECENT_SEARCHES_KEY, jsonStr); } } diff --git a/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart b/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart index b038ba51a..d22be6d9b 100644 --- a/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart +++ b/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart @@ -4,11 +4,11 @@ /// results for an active category search, sorted by distance. /// ============================================================================ +import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_search_category.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_search_service.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_detail_slide_over.dart'; import 'package:flutter/material.dart'; -import '../models/esrimap_search_category.dart'; -import '../models/map_search_result.dart'; -import '../services/esrimap_search_service.dart'; -import 'esrimap_detail_slide_over.dart'; /// Bottom sheet widget rendering plotted category search results in a list. class EsriMapCategoryListPanel extends StatelessWidget { @@ -60,14 +60,22 @@ class EsriMapCategoryListPanel extends StatelessWidget { // Sort results by distance from user if position is available final results = List.from(viewportResults); - if (userLocation != null) { + final hasUserLocation = userLocation != null; + if (hasUserLocation) { results.sort( (a, b) => EsriMapSearchService.distanceMeters( userLocation!.$1, userLocation!.$2, a.latitude, a.longitude, - ).compareTo(EsriMapSearchService.distanceMeters(userLocation!.$1, userLocation!.$2, b.latitude, b.longitude)), + ).compareTo( + EsriMapSearchService.distanceMeters( + userLocation!.$1, + userLocation!.$2, + b.latitude, + b.longitude, + ), + ), ); } @@ -78,7 +86,8 @@ class EsriMapCategoryListPanel extends StatelessWidget { final initialSize = contentFraction < 0.45 ? contentFraction : 0.45; final maxSize = contentFraction < 0.80 ? contentFraction.clamp(0.45, 0.80) : 0.80; final snaps = [0.15]; - if (initialSize > 0.15 + 0.01) snaps.add(initialSize); + final isInitialSizeLarger = initialSize > 0.15 + 0.01; + if (isInitialSizeLarger) snaps.add(initialSize); return DraggableScrollableSheet( controller: controller, @@ -88,7 +97,9 @@ class EsriMapCategoryListPanel extends StatelessWidget { snap: true, snapSizes: snaps, builder: (context, scrollController) { - final headerTitle = results.isEmpty ? '$label - None in view' : '$label - ${results.length} in view'; + final isResultsEmpty = results.isEmpty; + final headerTitle = isResultsEmpty ? '$label - None in view' : '$label - ${results.length} in view'; + final hasMoreTotalResults = allCategoryResults.length > results.length; return buildSlideOverContent( context: context, @@ -96,7 +107,7 @@ class EsriMapCategoryListPanel extends StatelessWidget { headerTitle: headerTitle, headerIcon: activeCategory?.icon ?? Icons.place, onClose: onClearSearch, - trailing: allCategoryResults.length > results.length + trailing: hasMoreTotalResults ? TextButton.icon( icon: Icon(Icons.layers_outlined, size: 16, color: isDark ? Colors.white54 : Colors.grey[600]), label: Text( @@ -111,7 +122,7 @@ class EsriMapCategoryListPanel extends StatelessWidget { onPressed: onSeeAllResults, ) : null, - sliverBody: results.isEmpty + sliverBody: isResultsEmpty ? [ SliverToBoxAdapter( child: Padding( @@ -135,7 +146,7 @@ class EsriMapCategoryListPanel extends StatelessWidget { SliverList( delegate: SliverChildBuilderDelegate((context, index) { final r = results[index]; - final dist = userLocation != null + final dist = hasUserLocation ? EsriMapSearchService.distanceMeters( userLocation!.$1, userLocation!.$2, diff --git a/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart index 4a25ee3ba..8a4013fac 100644 --- a/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart @@ -5,8 +5,8 @@ /// ============================================================================ import 'package:arcgis_maps/arcgis_maps.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; import 'package:flutter/material.dart'; -import '../models/map_search_result.dart'; /// Persistent header delegate for pinned slide-over bottom sheet headers. class SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { @@ -20,7 +20,11 @@ class SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { final Color backgroundColor; /// Constructs a [SlideOverHeaderDelegate] instance. - SlideOverHeaderDelegate({required this.child, required this.height, required this.backgroundColor}); + SlideOverHeaderDelegate({ + required this.child, + required this.height, + required this.backgroundColor, + }); @override double get minExtent => height; @@ -30,11 +34,12 @@ class SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { @override Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) { + final isTopPositioned = shrinkOffset == 0; return Container( height: height, decoration: BoxDecoration( color: backgroundColor, - borderRadius: shrinkOffset == 0 ? const BorderRadius.vertical(top: Radius.circular(16)) : null, + borderRadius: isTopPositioned ? const BorderRadius.vertical(top: Radius.circular(16)) : null, ), child: child, ); @@ -58,6 +63,8 @@ Widget buildSlideOverContent({ }) { final isDark = Theme.of(context).brightness == Brightness.dark; final bgColor = isDark ? Colors.grey[900]! : Colors.white; + final hasHeaderIcon = headerIcon != null; + final hasTrailing = trailing != null; return Material( elevation: 8, @@ -91,7 +98,7 @@ Widget buildSlideOverContent({ padding: const EdgeInsets.fromLTRB(20, 6, 20, 8), child: Row( children: [ - if (headerIcon != null) ...[ + if (hasHeaderIcon) ...[ Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), const SizedBox(width: 8), ], @@ -105,7 +112,7 @@ Widget buildSlideOverContent({ ), ), ), - if (trailing != null) trailing, + if (hasTrailing) trailing, GestureDetector( onTap: onClose, child: Container( @@ -204,9 +211,10 @@ class EsriMapDetailSlideOver extends StatelessWidget { Widget build(BuildContext context) { final isDark = Theme.of(context).brightness == Brightness.dark; final isRouting = isRoutingMode || hasRoute || routeFailed; + final isBuilding = result.source == MapSearchSource.building; - final detailText = result.source == MapSearchSource.building ? result.address : result.description; - final categoryLabel = result.source == MapSearchSource.building ? 'Building' : result.subtitle; + final detailText = isBuilding ? result.address : result.description; + final categoryLabel = isBuilding ? 'Building' : result.subtitle; // Content-aware sheet sizing final screenHeight = MediaQuery.of(context).size.height; @@ -219,7 +227,8 @@ class EsriMapDetailSlideOver extends StatelessWidget { final initialSize = hasRoute ? 0.35 : (contentFraction < 0.30 ? contentFraction : 0.30); final maxSize = hasRoute ? 0.80 : (contentFraction < 0.80 ? contentFraction.clamp(0.30, 0.80) : 0.80); final snaps = [0.15]; - if (initialSize > 0.15 + 0.01) snaps.add(initialSize); + final isInitialLarger = initialSize > 0.15 + 0.01; + if (isInitialLarger) snaps.add(initialSize); return DraggableScrollableSheet( controller: controller, @@ -230,6 +239,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { snapSizes: snaps, builder: (context, scrollController) { final shouldShowDetailText = !isRouting && detailText.isNotEmpty; + final hasWebsiteUrl = result.websiteUrl != null; return buildSlideOverContent( context: context, @@ -273,12 +283,15 @@ class EsriMapDetailSlideOver extends StatelessWidget { SizedBox( width: double.infinity, child: FilledButton.icon( - onPressed: () => onLaunchWebsite( - 'https://www.google.com/maps/dir/?api=1' - '&destination=${result.latitude},${result.longitude}' - '&travelmode=walking' - '${fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''}', - ), + onPressed: () { + final originParam = fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''; + onLaunchWebsite( + 'https://www.google.com/maps/dir/?api=1' + '&destination=${result.latitude},${result.longitude}' + '&travelmode=walking' + '$originParam', + ); + }, icon: const Icon(Icons.map_outlined, size: 18), label: const Text('Navigate in Google Maps'), style: FilledButton.styleFrom( @@ -354,12 +367,15 @@ class EsriMapDetailSlideOver extends StatelessWidget { SizedBox( width: double.infinity, child: OutlinedButton.icon( - onPressed: () => onLaunchWebsite( - 'https://www.google.com/maps/dir/?api=1' - '&destination=${result.latitude},${result.longitude}' - '&travelmode=walking' - '${fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''}', - ), + onPressed: () { + final originParam = fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''; + onLaunchWebsite( + 'https://www.google.com/maps/dir/?api=1' + '&destination=${result.latitude},${result.longitude}' + '&travelmode=walking' + '$originParam', + ); + }, icon: const Icon(Icons.map_outlined, size: 18), label: const Text('Navigate in Google Maps'), style: OutlinedButton.styleFrom( @@ -374,7 +390,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { // Directions + Website buttons Row( children: [ - if (result.websiteUrl != null) ...[ + if (hasWebsiteUrl) ...[ Expanded( child: OutlinedButton.icon( onPressed: () => onLaunchWebsite(result.websiteUrl!), @@ -424,9 +440,11 @@ class EsriMapDetailSlideOver extends StatelessWidget { ? '${distMeters.round()} m' : '${(distMeters / 1000).toStringAsFixed(1)} km'; final isNotLastManeuver = index < routeManeuvers.length - 1; + final isFirstIndex = index == 0; + return Column( children: [ - if (index == 0) const Divider(height: 1), + if (isFirstIndex) const Divider(height: 1), ListTile( leading: Icon( Icons.subdirectory_arrow_right, diff --git a/lib/ui/esrimap/widgets/esrimap_search_bar.dart b/lib/ui/esrimap/widgets/esrimap_search_bar.dart index 177e7c96e..39fa865c1 100644 --- a/lib/ui/esrimap/widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/widgets/esrimap_search_bar.dart @@ -4,9 +4,9 @@ /// including AI search trigger and dropdown results list. /// ============================================================================ +import 'package:campus_mobile_experimental/ui/esrimap/esrimap_config.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; import 'package:flutter/material.dart'; -import '../esrimap_config.dart'; -import '../models/map_search_result.dart'; /// Search input bar and route directions header widget. class EsriMapSearchBar extends StatelessWidget { @@ -138,7 +138,12 @@ class EsriMapSearchBar extends StatelessWidget { @override Widget build(BuildContext context) { final isDark = Theme.of(context).brightness == Brightness.dark; - final shouldShowResultsDivider = showResults && (isSearching || searchResults.isNotEmpty); + final hasSearchResults = isSearching || searchResults.isNotEmpty; + final shouldShowResultsDivider = showResults && hasSearchResults; + + final isSearchNotEmpty = searchController.text.isNotEmpty; + final hasClassMatches = matchingPoiClasses.isNotEmpty && isSearchNotEmpty && !showSuggestions; + final shouldShowDropdown = showResults || hasClassMatches; return Column( children: [ @@ -160,7 +165,11 @@ class EsriMapSearchBar extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ const Icon(Icons.circle_outlined, size: 12, color: Colors.blue), - Container(width: 1.5, height: 24, color: isDark ? Colors.grey[600] : Colors.grey[300]), + Container( + width: 1.5, + height: 24, + color: isDark ? Colors.grey[600] : Colors.grey[300], + ), const Icon(Icons.circle, size: 12, color: Colors.red), ], ), @@ -194,7 +203,11 @@ class EsriMapSearchBar extends StatelessWidget { height: 28, child: IconButton( padding: EdgeInsets.zero, - icon: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[600]), + icon: Icon( + Icons.close, + size: 16, + color: isDark ? Colors.white70 : Colors.grey[600], + ), onPressed: onClearFromField, ), ), @@ -225,7 +238,11 @@ class EsriMapSearchBar extends StatelessWidget { height: 28, child: IconButton( padding: EdgeInsets.zero, - icon: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[600]), + icon: Icon( + Icons.close, + size: 16, + color: isDark ? Colors.white70 : Colors.grey[600], + ), onPressed: onClearToField, ), ), @@ -252,7 +269,11 @@ class EsriMapSearchBar extends StatelessWidget { height: 36, child: IconButton( padding: EdgeInsets.zero, - icon: Icon(Icons.swap_vert, size: 20, color: isDark ? Colors.white70 : Colors.grey[600]), + icon: Icon( + Icons.swap_vert, + size: 20, + color: isDark ? Colors.white70 : Colors.grey[600], + ), onPressed: onSwapRouteFields, ), ), @@ -282,7 +303,8 @@ class EsriMapSearchBar extends StatelessWidget { textInputAction: TextInputAction.search, onSubmitted: onPerformSearch, onChanged: (text) { - if (text.isEmpty) { + final isTextEmpty = text.isEmpty; + if (isTextEmpty) { onClearSearch(); } else { onPerformSearch(text); @@ -297,7 +319,7 @@ class EsriMapSearchBar extends StatelessWidget { ), ), ), - if (searchController.text.isNotEmpty) + if (isSearchNotEmpty) IconButton(icon: const Icon(Icons.clear), onPressed: onClearSearch), if (config?.features.aiSearch ?? false) IconButton( @@ -313,7 +335,7 @@ class EsriMapSearchBar extends StatelessWidget { ), // Search Results Dropdown List - if (showResults || (matchingPoiClasses.isNotEmpty && searchController.text.isNotEmpty && !showSuggestions)) + if (shouldShowDropdown) Padding( padding: const EdgeInsets.only(top: 4), child: Material( @@ -329,7 +351,11 @@ class EsriMapSearchBar extends StatelessWidget { padding: const EdgeInsets.fromLTRB(16, 10, 16, 4), child: Row( children: [ - Icon(Icons.category_outlined, size: 13, color: isDark ? Colors.grey[500] : Colors.grey[500]), + Icon( + Icons.category_outlined, + size: 13, + color: isDark ? Colors.grey[500] : Colors.grey[500], + ), const SizedBox(width: 6), Text( 'CATEGORIES', diff --git a/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart b/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart index c91231135..fbc7f5af2 100644 --- a/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart +++ b/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart @@ -4,9 +4,9 @@ /// chips and recent search history items. /// ============================================================================ +import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_search_category.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; import 'package:flutter/material.dart'; -import '../models/esrimap_search_category.dart'; -import '../models/map_search_result.dart'; /// Suggestions panel widget rendered below the search bar when focused. class EsriMapSuggestionsPanel extends StatelessWidget { @@ -51,19 +51,24 @@ class EsriMapSuggestionsPanel extends StatelessWidget { Widget build(BuildContext context) { final isDark = Theme.of(context).brightness == Brightness.dark; final bgColor = isDark ? Colors.grey[850] : Colors.white; + final isFromRouteFieldActive = showRouteFields && activeRouteField == 'from'; + final topPadding = isFromRouteFieldActive ? 0.0 : 12.0; return Material( elevation: 4, borderRadius: BorderRadius.circular(8), color: bgColor, child: Padding( - padding: EdgeInsets.only(top: (showRouteFields && activeRouteField == 'from') ? 0 : 12, bottom: 12), + padding: EdgeInsets.only( + top: topPadding, + bottom: 12, + ), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ // "Current Location" shortcut option when 'From' field is active - if (showRouteFields && activeRouteField == 'from') ...[ + if (isFromRouteFieldActive) ...[ GestureDetector( behavior: HitTestBehavior.opaque, onTap: onSelectCurrentLocation, From 6d2dbe4c936f5a511598cea8a7e931320e3f97c6 Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Mon, 27 Jul 2026 23:41:15 +0000 Subject: [PATCH 015/139] style: auto fix formatting violations --- lib/ui/esrimap/esrimap.dart | 49 +++++++------------ .../services/esrimap_auth_handler.dart | 8 +-- .../services/esrimap_search_service.dart | 11 ++--- .../widgets/esrimap_category_list_panel.dart | 9 +--- .../widgets/esrimap_detail_slide_over.dart | 6 +-- .../esrimap/widgets/esrimap_search_bar.dart | 33 +++---------- .../widgets/esrimap_suggestions_panel.dart | 5 +- 7 files changed, 32 insertions(+), 89 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 6a4353857..2446dc94d 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -26,7 +26,8 @@ import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; // Re-export MapSearchResult so callers importing esrimap.dart retain access -export 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart' show MapSearchResult, MapSearchSource; +export 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart' + show MapSearchResult, MapSearchSource; /// Primary StatefulWidget for the interactive Esri Campus Map screen. class EsriMap extends StatefulWidget { @@ -188,13 +189,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.interactionOptions.rotateEnabled = true; final isGraphicsOverlayMissing = !_mapViewController.graphicsOverlays.contains(_graphicsOverlay); - if (isGraphicsOverlayMissing) { - _mapViewController.graphicsOverlays.add(_graphicsOverlay); - } + if (isGraphicsOverlayMissing) _mapViewController.graphicsOverlays.add(_graphicsOverlay); final isRouteOverlayMissing = !_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay); - if (isRouteOverlayMissing) { - _mapViewController.graphicsOverlays.add(_routeGraphicsOverlay); - } + if (isRouteOverlayMissing) _mapViewController.graphicsOverlays.add(_routeGraphicsOverlay); // Configure location display settings _mapViewController.locationDisplay.dataSource = _locationDataSource; @@ -410,7 +407,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _applyLayerSpecialCases(String key, List instances) { - final isCampusDistricts = key == 'campusDistricts' && instances.isNotEmpty && instances.first is ArcGISMapImageLayer; + final isCampusDistricts = + key == 'campusDistricts' && instances.isNotEmpty && instances.first is ArcGISMapImageLayer; if (isCampusDistricts) { final imageLayer = instances.first as ArcGISMapImageLayer; for (final sub in imageLayer.mapImageSublayers) { @@ -479,9 +477,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _recentSearches.removeWhere((r) => r.name == result.name && r.source == result.source); _recentSearches.insert(0, result); final isExceedingMax = _recentSearches.length > EsriMapSearchService.MAX_RECENT_SEARCHES; - if (isExceedingMax) { - _recentSearches = _recentSearches.sublist(0, EsriMapSearchService.MAX_RECENT_SEARCHES); - } + if (isExceedingMax) _recentSearches = _recentSearches.sublist(0, EsriMapSearchService.MAX_RECENT_SEARCHES); EsriMapSearchService.saveRecentSearches(_recentSearches); } @@ -743,9 +739,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final tappedGraphic = identifyResult.graphics.first; final index = tappedGraphic.attributes['resultIndex'] as int?; final isValidResultIndex = index != null && index >= 0 && index < _mappedResults.length; - if (isValidResultIndex) { - _selectResultFromPin(_mappedResults[index]); - } + if (isValidResultIndex) _selectResultFromPin(_mappedResults[index]); } else { final isSelectedResultNotNull = _selectedResult != null; if (isSelectedResultNotNull) _closeDetail(); @@ -1054,9 +1048,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } final hasPaddedExtent = routeRes.paddedExtent != null; - if (hasPaddedExtent) { - _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(routeRes.paddedExtent!)); - } + if (hasPaddedExtent) _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(routeRes.paddedExtent!)); _graphicsOverlay.graphics.clear(); _mappedResults = []; @@ -1213,9 +1205,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } }); final isAttached = _detailSheetController.isAttached; - if (isAttached) { + if (isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } } } @@ -1231,9 +1222,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } }); final isAttached = _detailSheetController.isAttached; - if (isAttached) { + if (isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } } } @@ -1245,16 +1235,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final isCategoryListOpen = _showCategoryList && _selectedResult == null; if (isCategoryListOpen) { final isAttached = _categorySheetController.isAttached; - if (isAttached) { + if (isAttached) _categorySheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } } final isSelectedResultOpen = _selectedResult != null; if (isSelectedResultOpen) { final isAttached = _detailSheetController.isAttached; - if (isAttached) { + if (isAttached) _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); - } } } @@ -1275,7 +1263,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final indexedStackIndex = isBuilding3dScene ? 1 : (isDroneViewScene ? 2 : 0); - final isFabVisible = !keyboardVisible && + final isFabVisible = + !keyboardVisible && !_focusNode.hasFocus && !_fromFocusNode.hasFocus && !_toFocusNode.hasFocus && @@ -1358,9 +1347,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { : null; }); final canSolveRoute = _routeDestination != null && _fromLatLng != null; - if (canSolveRoute) { - _solveRoute(_routeDestination!, originLatLng: _fromLatLng); - } + if (canSolveRoute) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); }, onTapSearchField: () { final hasSelectedResult = _selectedResult != null; @@ -1525,9 +1512,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }, onTravelModeChanged: (mode) { final hasSelectedResult = _selectedResult != null; - if (hasSelectedResult) { - _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); - } + if (hasSelectedResult) _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); }, onLaunchWebsite: _launchWebsite, onClose: _closeDetail, diff --git a/lib/ui/esrimap/services/esrimap_auth_handler.dart b/lib/ui/esrimap/services/esrimap_auth_handler.dart index 548b6f838..baa750bc2 100644 --- a/lib/ui/esrimap/services/esrimap_auth_handler.dart +++ b/lib/ui/esrimap/services/esrimap_auth_handler.dart @@ -33,15 +33,11 @@ class AgeAuthChallengeHandler implements ArcGISAuthenticationChallengeHandler { if (isAgo) { if (_cachedAgoToken != null && _agoTokenExpiry != null && - DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) { - return (_cachedAgoToken, _agoTokenExpiry); - } + DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) => (_cachedAgoToken, _agoTokenExpiry); } else { if (_cachedAgeToken != null && _ageTokenExpiry != null && - DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) { - return (_cachedAgeToken, _ageTokenExpiry); - } + DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) => (_cachedAgeToken, _ageTokenExpiry); } // Request fresh authentication tokens from server endpoint diff --git a/lib/ui/esrimap/services/esrimap_search_service.dart b/lib/ui/esrimap/services/esrimap_search_service.dart index 4f77db09c..d35841f45 100644 --- a/lib/ui/esrimap/services/esrimap_search_service.dart +++ b/lib/ui/esrimap/services/esrimap_search_service.dart @@ -32,9 +32,7 @@ class EsriMapSearchService { final uri = Uri.parse('$BASE_URL/$path').replace(queryParameters: params); final response = await http.get(uri); final isResNotOk = response.statusCode != 200; - if (isResNotOk) { - throw Exception('API error ${response.statusCode}: ${response.body}'); - } + if (isResNotOk) throw Exception('API error ${response.statusCode}: ${response.body}'); return jsonDecode(response.body) as Map; } @@ -46,9 +44,7 @@ class EsriMapSearchService { body: jsonEncode(body), ); final isResNotOk = response.statusCode != 200; - if (isResNotOk) { - throw Exception('API error ${response.statusCode}: ${response.body}'); - } + if (isResNotOk) throw Exception('API error ${response.statusCode}: ${response.body}'); return jsonDecode(response.body) as Map; } @@ -136,7 +132,8 @@ class EsriMapSearchService { const r = 6371000.0; // Earth radius in meters final dLat = (lat2 - lat1) * math.pi / 180; final dLng = (lng2 - lng1) * math.pi / 180; - final a = math.sin(dLat / 2) * math.sin(dLat / 2) + + final a = + math.sin(dLat / 2) * math.sin(dLat / 2) + math.cos(lat1 * math.pi / 180) * math.cos(lat2 * math.pi / 180) * math.sin(dLng / 2) * math.sin(dLng / 2); return r * 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a)); } diff --git a/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart b/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart index d22be6d9b..db4c7ccbd 100644 --- a/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart +++ b/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart @@ -68,14 +68,7 @@ class EsriMapCategoryListPanel extends StatelessWidget { userLocation!.$2, a.latitude, a.longitude, - ).compareTo( - EsriMapSearchService.distanceMeters( - userLocation!.$1, - userLocation!.$2, - b.latitude, - b.longitude, - ), - ), + ).compareTo(EsriMapSearchService.distanceMeters(userLocation!.$1, userLocation!.$2, b.latitude, b.longitude)), ); } diff --git a/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart index 8a4013fac..4d9d0cd26 100644 --- a/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart @@ -20,11 +20,7 @@ class SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { final Color backgroundColor; /// Constructs a [SlideOverHeaderDelegate] instance. - SlideOverHeaderDelegate({ - required this.child, - required this.height, - required this.backgroundColor, - }); + SlideOverHeaderDelegate({required this.child, required this.height, required this.backgroundColor}); @override double get minExtent => height; diff --git a/lib/ui/esrimap/widgets/esrimap_search_bar.dart b/lib/ui/esrimap/widgets/esrimap_search_bar.dart index 39fa865c1..5d3956b7f 100644 --- a/lib/ui/esrimap/widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/widgets/esrimap_search_bar.dart @@ -165,11 +165,7 @@ class EsriMapSearchBar extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ const Icon(Icons.circle_outlined, size: 12, color: Colors.blue), - Container( - width: 1.5, - height: 24, - color: isDark ? Colors.grey[600] : Colors.grey[300], - ), + Container(width: 1.5, height: 24, color: isDark ? Colors.grey[600] : Colors.grey[300]), const Icon(Icons.circle, size: 12, color: Colors.red), ], ), @@ -203,11 +199,7 @@ class EsriMapSearchBar extends StatelessWidget { height: 28, child: IconButton( padding: EdgeInsets.zero, - icon: Icon( - Icons.close, - size: 16, - color: isDark ? Colors.white70 : Colors.grey[600], - ), + icon: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[600]), onPressed: onClearFromField, ), ), @@ -238,11 +230,7 @@ class EsriMapSearchBar extends StatelessWidget { height: 28, child: IconButton( padding: EdgeInsets.zero, - icon: Icon( - Icons.close, - size: 16, - color: isDark ? Colors.white70 : Colors.grey[600], - ), + icon: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[600]), onPressed: onClearToField, ), ), @@ -269,11 +257,7 @@ class EsriMapSearchBar extends StatelessWidget { height: 36, child: IconButton( padding: EdgeInsets.zero, - icon: Icon( - Icons.swap_vert, - size: 20, - color: isDark ? Colors.white70 : Colors.grey[600], - ), + icon: Icon(Icons.swap_vert, size: 20, color: isDark ? Colors.white70 : Colors.grey[600]), onPressed: onSwapRouteFields, ), ), @@ -319,8 +303,7 @@ class EsriMapSearchBar extends StatelessWidget { ), ), ), - if (isSearchNotEmpty) - IconButton(icon: const Icon(Icons.clear), onPressed: onClearSearch), + if (isSearchNotEmpty) IconButton(icon: const Icon(Icons.clear), onPressed: onClearSearch), if (config?.features.aiSearch ?? false) IconButton( icon: Icon( @@ -351,11 +334,7 @@ class EsriMapSearchBar extends StatelessWidget { padding: const EdgeInsets.fromLTRB(16, 10, 16, 4), child: Row( children: [ - Icon( - Icons.category_outlined, - size: 13, - color: isDark ? Colors.grey[500] : Colors.grey[500], - ), + Icon(Icons.category_outlined, size: 13, color: isDark ? Colors.grey[500] : Colors.grey[500]), const SizedBox(width: 6), Text( 'CATEGORIES', diff --git a/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart b/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart index fbc7f5af2..624e036f9 100644 --- a/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart +++ b/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart @@ -59,10 +59,7 @@ class EsriMapSuggestionsPanel extends StatelessWidget { borderRadius: BorderRadius.circular(8), color: bgColor, child: Padding( - padding: EdgeInsets.only( - top: topPadding, - bottom: 12, - ), + padding: EdgeInsets.only(top: topPadding, bottom: 12), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, From 308e127f4c537996b2b3731cce710e45521d2f04 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 16:55:29 -0700 Subject: [PATCH 016/139] fully organized the esri map --- lib/ui/esrimap/esrimap.dart | 15 +- lib/ui/esrimap/esrimap_basemaps.dart | 65 ---- lib/ui/esrimap/esrimap_config.dart | 230 ------------ .../models/esrimap_ai_search_model.dart | 110 ++++++ lib/ui/esrimap/models/esrimap_basemaps.dart | 50 +++ lib/ui/esrimap/models/esrimap_config.dart | 326 ++++++++++++++++++ .../services/esrimap_basemap_factory.dart | 49 +++ .../services/esrimap_config_service.dart | 45 +++ .../esrimap_ai_search_sheet.dart} | 130 +++---- lib/ui/esrimap/{ => widgets}/esrimap_fab.dart | 67 +++- .../{ => widgets}/esrimap_layers_panel.dart | 103 ++++-- .../esrimap/{ => widgets}/esrimap_scene.dart | 57 ++- .../esrimap/widgets/esrimap_search_bar.dart | 2 +- 13 files changed, 796 insertions(+), 453 deletions(-) delete mode 100644 lib/ui/esrimap/esrimap_basemaps.dart delete mode 100644 lib/ui/esrimap/esrimap_config.dart create mode 100644 lib/ui/esrimap/models/esrimap_ai_search_model.dart create mode 100644 lib/ui/esrimap/models/esrimap_basemaps.dart create mode 100644 lib/ui/esrimap/models/esrimap_config.dart create mode 100644 lib/ui/esrimap/services/esrimap_basemap_factory.dart create mode 100644 lib/ui/esrimap/services/esrimap_config_service.dart rename lib/ui/esrimap/{esrimap_ai_search.dart => widgets/esrimap_ai_search_sheet.dart} (73%) rename lib/ui/esrimap/{ => widgets}/esrimap_fab.dart (66%) rename lib/ui/esrimap/{ => widgets}/esrimap_layers_panel.dart (73%) rename lib/ui/esrimap/{ => widgets}/esrimap_scene.dart (65%) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 6a4353857..5c3a7e7b6 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -7,19 +7,22 @@ import 'dart:async'; import 'package:arcgis_maps/arcgis_maps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esrimap_ai_search.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esrimap_basemaps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esrimap_config.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esrimap_fab.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esrimap_layers_panel.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esrimap_scene.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_ai_search_model.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_basemaps.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_config.dart'; import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_search_category.dart'; import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_auth_handler.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_basemap_factory.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_config_service.dart'; import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_route_service.dart'; import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_search_service.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_ai_search_sheet.dart'; import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_category_list_panel.dart'; import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_detail_slide_over.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_fab.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_layers_panel.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_scene.dart'; import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_search_bar.dart'; import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_suggestions_panel.dart'; import 'package:flutter/material.dart'; diff --git a/lib/ui/esrimap/esrimap_basemaps.dart b/lib/ui/esrimap/esrimap_basemaps.dart deleted file mode 100644 index cf1abc978..000000000 --- a/lib/ui/esrimap/esrimap_basemaps.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'package:arcgis_maps/arcgis_maps.dart'; -import 'esrimap_config.dart'; - -enum BasemapType { defaultMap, light, dark, satellite } - -String basemapKey(BasemapType type) { - switch (type) { - case BasemapType.defaultMap: - return 'defaultMap'; - case BasemapType.light: - return 'light'; - case BasemapType.dark: - return 'dark'; - case BasemapType.satellite: - return 'satellite'; - } -} - -BasemapType? basemapTypeFromKey(String key) { - switch (key) { - case 'defaultMap': - return BasemapType.defaultMap; - case 'light': - return BasemapType.light; - case 'dark': - return BasemapType.dark; - case 'satellite': - return BasemapType.satellite; - default: - return null; - } -} - -Basemap buildBasemap(BasemapType type, EsriMapConfig config) { - final entry = config.basemaps[basemapKey(type)]; - if (entry == null) return Basemap(); - - final basemap = Basemap(); - for (final layer in entry.baseLayers) { - switch (layer.type) { - case 'arcgisTiled': - final url = layer.serviceKey != null ? config.serviceUrls[layer.serviceKey!] : null; - if (url != null) basemap.baseLayers.add(ArcGISTiledLayer.withUri(Uri.parse(url))); - break; - - case 'arcgisVectorTiled': - final portalUrl = layer.portalKey != null ? config.portals[layer.portalKey!] : null; - final hasPortalAndItem = portalUrl != null && layer.itemId != null; - if (hasPortalAndItem) { - basemap.baseLayers.add( - ArcGISVectorTiledLayer.withItem( - PortalItem.withPortalAndItemId(portal: Portal(Uri.parse(portalUrl)), itemId: layer.itemId!), - ), - ); - } - break; - - case 'arcgisMapImage': - final url = layer.serviceKey != null ? config.serviceUrls[layer.serviceKey!] : null; - if (url != null) basemap.baseLayers.add(ArcGISMapImageLayer.withUri(Uri.parse(url))); - break; - } - } - return basemap; -} diff --git a/lib/ui/esrimap/esrimap_config.dart b/lib/ui/esrimap/esrimap_config.dart deleted file mode 100644 index ad2a12303..000000000 --- a/lib/ui/esrimap/esrimap_config.dart +++ /dev/null @@ -1,230 +0,0 @@ -import 'dart:convert'; -import 'package:http/http.dart' as http; - -// Base layer spec - -class BaseLayerSpec { - final String type; // 'arcgisTiled' | 'arcgisVectorTiled' | 'arcgisMapImage' - final String? serviceKey; // resolves via EsriMapConfig.serviceUrls - final String? portalKey; // resolves via EsriMapConfig.portals - final String? itemId; - - const BaseLayerSpec({required this.type, this.serviceKey, this.portalKey, this.itemId}); - - factory BaseLayerSpec.fromJson(Map json) => BaseLayerSpec( - type: json['type'] as String, - serviceKey: json['serviceKey'] as String?, - portalKey: json['portalKey'] as String?, - itemId: json['itemId'] as String?, - ); -} - -// Basemaps - -class BasemapConfig { - final String label; - final String thumbnailAsset; - final List baseLayers; - - const BasemapConfig({required this.label, required this.thumbnailAsset, required this.baseLayers}); - - factory BasemapConfig.fromJson(Map json) => BasemapConfig( - label: json['label'] as String, - thumbnailAsset: json['thumbnailAsset'] as String, - baseLayers: (json['baseLayers'] as List).map((e) => BaseLayerSpec.fromJson(e as Map)).toList(), - ); -} - -// Operational layers - -class SublayerEntry { - final String name; - final String source; - final String? url; - final String? portalKey; - final String? itemId; - final int refreshInterval; - final bool popup; - final String? popupTemplate; - - const SublayerEntry({ - required this.name, - required this.source, - this.url, - this.portalKey, - this.itemId, - required this.refreshInterval, - required this.popup, - this.popupTemplate, - }); - - factory SublayerEntry.fromJson(Map json) => SublayerEntry( - name: json['name'] as String, - source: json['source'] as String, - url: json['url'] as String?, - portalKey: json['portalKey'] as String?, - itemId: json['itemId'] as String?, - refreshInterval: (json['refreshInterval'] as num?)?.toInt() ?? 0, - popup: json['popup'] as bool? ?? false, - popupTemplate: json['popupTemplate'] as String?, - ); -} - -class LayerEntry { - final String label; - final String thumbnailAsset; - final String? source; - final String? url; - final String? portalKey; - final String? itemId; - final int refreshInterval; - final bool popup; - final String? popupTemplate; - final List? sublayers; - - const LayerEntry({ - required this.label, - required this.thumbnailAsset, - this.source, - this.url, - this.portalKey, - this.itemId, - this.refreshInterval = 0, - this.popup = false, - this.popupTemplate, - this.sublayers, - }); - - bool get hasSublayers => sublayers != null && sublayers!.isNotEmpty; - - factory LayerEntry.fromJson(Map json) => LayerEntry( - label: json['label'] as String, - thumbnailAsset: json['thumbnailAsset'] as String, - source: json['source'] as String?, - url: json['url'] as String?, - portalKey: json['portalKey'] as String?, - itemId: json['itemId'] as String?, - refreshInterval: (json['refreshInterval'] as num?)?.toInt() ?? 0, - popup: json['popup'] as bool? ?? false, - popupTemplate: json['popupTemplate'] as String?, - sublayers: json['sublayers'] == null - ? null - : (json['sublayers'] as List).map((e) => SublayerEntry.fromJson(e as Map)).toList(), - ); -} - -// Scenes - -class SceneConfig { - final String label; - final String type; // '2d' | 'scene' - final String? portalKey; - final String? itemId; - - const SceneConfig({required this.label, required this.type, this.portalKey, this.itemId}); - - factory SceneConfig.fromJson(Map json) => SceneConfig( - label: json['label'] as String, - type: json['type'] as String, - portalKey: json['portalKey'] as String?, - itemId: json['itemId'] as String?, - ); -} - -// Features -// Allows remote enabling/disabling of app features without redeploying the app. - -class FeaturesConfig { - final bool aiSearch; - final bool scenes; - - const FeaturesConfig({required this.aiSearch, required this.scenes}); - - factory FeaturesConfig.fromJson(Map json) => - FeaturesConfig(aiSearch: json['aiSearch'] as bool? ?? false, scenes: json['scenes'] as bool? ?? false); -} - -// Search categories - -class SearchCategoryConfig { - final String label; - final String poiClass; - final String icon; - final String? color; - - const SearchCategoryConfig({required this.label, required this.poiClass, required this.icon, this.color}); - - factory SearchCategoryConfig.fromJson(Map json) => SearchCategoryConfig( - label: json['label'] as String, - poiClass: json['poiClass'] as String, - icon: json['icon'] as String, - color: json['color'] as String?, - ); -} - -// Root config - -class EsriMapConfig { - final Map portals; - final Map serviceUrls; - final Map basemaps; - final Map layers; - final Map scenes; - final FeaturesConfig features; - final List searchCategories; - - const EsriMapConfig({ - required this.portals, - required this.serviceUrls, - required this.basemaps, - required this.layers, - required this.scenes, - required this.features, - required this.searchCategories, - }); - - factory EsriMapConfig.fromJson(Map json) => EsriMapConfig( - portals: (json['portals'] as Map).cast(), - serviceUrls: (json['serviceUrls'] as Map).cast(), - basemaps: (json['basemaps'] as Map).map( - (k, v) => MapEntry(k, BasemapConfig.fromJson(v as Map)), - ), - layers: (json['layers'] as Map).map( - (k, v) => MapEntry(k, LayerEntry.fromJson(v as Map)), - ), - scenes: (json['scenes'] as Map).map( - (k, v) => MapEntry(k, SceneConfig.fromJson(v as Map)), - ), - features: FeaturesConfig.fromJson(json['features'] as Map), - searchCategories: (json['searchCategories'] as List) - .map((e) => SearchCategoryConfig.fromJson(e as Map)) - .toList(), - ); -} - -// Service -// Fetches and caches the EsriMapConfig from the backend API. - -class EsriMapConfigService { - static final EsriMapConfigService instance = EsriMapConfigService._(); - EsriMapConfigService._(); - - static const _BASE_URL = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; - - EsriMapConfig? _config; - Future? _pending; - - Future fetch() => _pending ??= _doFetch(); - - EsriMapConfig? get cached => _config; - - String get tokensUrl => '$_BASE_URL/tokens'; - - Future _doFetch() async { - final response = await http.get(Uri.parse('$_BASE_URL/config')); - final isResNotOk = response.statusCode != 200; - if (isResNotOk) throw Exception('Config fetch failed: ${response.statusCode}'); - _config = EsriMapConfig.fromJson(jsonDecode(response.body) as Map); - return _config!; - } -} diff --git a/lib/ui/esrimap/models/esrimap_ai_search_model.dart b/lib/ui/esrimap/models/esrimap_ai_search_model.dart new file mode 100644 index 000000000..1ad100ec8 --- /dev/null +++ b/lib/ui/esrimap/models/esrimap_ai_search_model.dart @@ -0,0 +1,110 @@ +/// ============================================================================ +/// File: esrimap_ai_search_model.dart +/// Description: Data models for AI natural language search queries, including +/// location search results, route stops, and response wrappers. +/// ============================================================================ + +/// Location search result returned by AI search endpoint. +class AiSearchResult { + /// Name or title of location. + final String name; + + /// Subtitle / category tag. + final String subtitle; + + /// Physical address string. + final String address; + + /// Latitude coordinate. + final double latitude; + + /// Longitude coordinate. + final double longitude; + + /// Optional distance in feet. + final int? distanceFeet; + + /// Optional formatted distance string (e.g. "0.3 mi"). + final String? distanceFormatted; + + /// Constructs an [AiSearchResult] instance. + const AiSearchResult({ + required this.name, + required this.subtitle, + required this.address, + required this.latitude, + required this.longitude, + this.distanceFeet, + this.distanceFormatted, + }); + + /// Factory constructor to deserialize [AiSearchResult] from a JSON map. + factory AiSearchResult.fromJson(Map j) => AiSearchResult( + name: j['name'] as String, + subtitle: j['subtitle'] as String? ?? '', + address: j['address'] as String? ?? '', + latitude: (j['latitude'] as num).toDouble(), + longitude: (j['longitude'] as num).toDouble(), + distanceFeet: j['distanceFeet'] as int?, + distanceFormatted: j['distanceFormatted'] as String?, + ); +} + +/// Geographical coordinate stop along a multi-stop AI route. +class AiSearchRouteStop { + /// Latitude coordinate. + final double lat; + + /// Longitude coordinate. + final double lon; + + /// Constructs an [AiSearchRouteStop] instance. + const AiSearchRouteStop({required this.lat, required this.lon}); + + /// Factory constructor to deserialize [AiSearchRouteStop] from a JSON map. + factory AiSearchRouteStop.fromJson(Map j) => + AiSearchRouteStop(lat: (j['lat'] as num).toDouble(), lon: (j['lon'] as num).toDouble()); +} + +/// Response payload returned from AI search REST API endpoint. +class AiSearchResponse { + /// Explanatory text or response message. + final String message; + + /// List of matching location search results. + final List results; + + /// Optional list of stop names for suggested routes. + final List? routeStopNames; + + /// Optional list of stop coordinates for suggested routes. + final List? routeStopCoords; + + /// Constructs an [AiSearchResponse] instance. + const AiSearchResponse({ + required this.message, + required this.results, + this.routeStopNames, + this.routeStopCoords, + }); + + /// Factory constructor to deserialize [AiSearchResponse] from a JSON map. + factory AiSearchResponse.fromJson(Map j) { + List? stopNames; + List? stopCoords; + final route = j['suggestedRoute']; + final hasRoute = route != null; + if (hasRoute) { + stopNames = (route['stops'] as List).cast(); + stopCoords = (route['stopCoords'] as List) + .map((s) => AiSearchRouteStop.fromJson(s as Map)) + .toList(); + } + return AiSearchResponse( + message: j['message'] as String, + results: (j['results'] as List).map((r) => AiSearchResult.fromJson(r as Map)).toList(), + routeStopNames: stopNames, + routeStopCoords: stopCoords, + ); + } +} diff --git a/lib/ui/esrimap/models/esrimap_basemaps.dart b/lib/ui/esrimap/models/esrimap_basemaps.dart new file mode 100644 index 000000000..b79cde4b1 --- /dev/null +++ b/lib/ui/esrimap/models/esrimap_basemaps.dart @@ -0,0 +1,50 @@ +/// ============================================================================ +/// File: esrimap_basemaps.dart +/// Description: Enum models and conversion utilities for basemap types +/// (Default, Light, Dark, Satellite). +/// ============================================================================ + +/// Enumeration representing available basemap styles on the map view. +enum BasemapType { + /// Default standard campus vector map basemap. + defaultMap, + + /// Light neutral canvas basemap. + light, + + /// Dark slate mode basemap. + dark, + + /// Satellite imagery basemap. + satellite, +} + +/// Converts a [BasemapType] enum value into its corresponding configuration string key. +String basemapKey(BasemapType type) { + switch (type) { + case BasemapType.defaultMap: + return 'defaultMap'; + case BasemapType.light: + return 'light'; + case BasemapType.dark: + return 'dark'; + case BasemapType.satellite: + return 'satellite'; + } +} + +/// Converts a raw string key into a matching [BasemapType] enum, or null if unmapped. +BasemapType? basemapTypeFromKey(String key) { + switch (key) { + case 'defaultMap': + return BasemapType.defaultMap; + case 'light': + return BasemapType.light; + case 'dark': + return BasemapType.dark; + case 'satellite': + return BasemapType.satellite; + default: + return null; + } +} diff --git a/lib/ui/esrimap/models/esrimap_config.dart b/lib/ui/esrimap/models/esrimap_config.dart new file mode 100644 index 000000000..4588b3698 --- /dev/null +++ b/lib/ui/esrimap/models/esrimap_config.dart @@ -0,0 +1,326 @@ +/// ============================================================================ +/// File: esrimap_config.dart +/// Description: Data models for parsing backend map configuration JSON, +/// including portals, basemaps, operational layers, scenes, and feature flags. +/// ============================================================================ + +/// Specification for a base map layer. +class BaseLayerSpec { + /// Layer type identifier ('arcgisTiled', 'arcgisVectorTiled', 'arcgisMapImage'). + final String type; + + /// Service key resolving to a URL in [EsriMapConfig.serviceUrls]. + final String? serviceKey; + + /// Portal key resolving to a portal URI in [EsriMapConfig.portals]. + final String? portalKey; + + /// Optional item ID for portal items. + final String? itemId; + + /// Constructs a [BaseLayerSpec] instance. + const BaseLayerSpec({ + required this.type, + this.serviceKey, + this.portalKey, + this.itemId, + }); + + /// Factory constructor to deserialize [BaseLayerSpec] from a JSON map. + factory BaseLayerSpec.fromJson(Map json) => BaseLayerSpec( + type: json['type'] as String, + serviceKey: json['serviceKey'] as String?, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, + ); +} + +/// Configuration structure for a basemap option. +class BasemapConfig { + /// Display label for the basemap tile in UI. + final String label; + + /// Asset path or URL for the basemap thumbnail image. + final String thumbnailAsset; + + /// List of underlying base layers constituting the basemap. + final List baseLayers; + + /// Constructs a [BasemapConfig] instance. + const BasemapConfig({ + required this.label, + required this.thumbnailAsset, + required this.baseLayers, + }); + + /// Factory constructor to deserialize [BasemapConfig] from a JSON map. + factory BasemapConfig.fromJson(Map json) => BasemapConfig( + label: json['label'] as String, + thumbnailAsset: json['thumbnailAsset'] as String, + baseLayers: (json['baseLayers'] as List) + .map((e) => BaseLayerSpec.fromJson(e as Map)) + .toList(), + ); +} + +/// Configuration structure for a sublayer inside a map image layer. +class SublayerEntry { + /// Display name of the sublayer. + final String name; + + /// Data source classification ('url', etc.). + final String source; + + /// REST service URL for the sublayer. + final String? url; + + /// Key resolving to a portal URI in [EsriMapConfig.portals]. + final String? portalKey; + + /// Optional item ID for portal items. + final String? itemId; + + /// Refresh timer interval in seconds (0 = disabled). + final int refreshInterval; + + /// Whether popup feature information is enabled for this sublayer. + final bool popup; + + /// Optional template string for feature popups. + final String? popupTemplate; + + /// Constructs a [SublayerEntry] instance. + const SublayerEntry({ + required this.name, + required this.source, + this.url, + this.portalKey, + this.itemId, + required this.refreshInterval, + required this.popup, + this.popupTemplate, + }); + + /// Factory constructor to deserialize [SublayerEntry] from a JSON map. + factory SublayerEntry.fromJson(Map json) => SublayerEntry( + name: json['name'] as String, + source: json['source'] as String, + url: json['url'] as String?, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, + refreshInterval: (json['refreshInterval'] as num?)?.toInt() ?? 0, + popup: json['popup'] as bool? ?? false, + popupTemplate: json['popupTemplate'] as String?, + ); +} + +/// Configuration structure for an operational layer toggle. +class LayerEntry { + /// Display label for the layer in UI. + final String label; + + /// Asset path or URL for the layer thumbnail image. + final String thumbnailAsset; + + /// Data source type string. + final String? source; + + /// REST service URL for the layer. + final String? url; + + /// Key resolving to a portal URI in [EsriMapConfig.portals]. + final String? portalKey; + + /// Optional item ID for portal items. + final String? itemId; + + /// Refresh timer interval in seconds (0 = disabled). + final int refreshInterval; + + /// Whether popup feature information is enabled. + final bool popup; + + /// Optional template string for feature popups. + final String? popupTemplate; + + /// Optional list of sublayers if this is a composite layer. + final List? sublayers; + + /// Constructs a [LayerEntry] instance. + const LayerEntry({ + required this.label, + required this.thumbnailAsset, + this.source, + this.url, + this.portalKey, + this.itemId, + this.refreshInterval = 0, + this.popup = false, + this.popupTemplate, + this.sublayers, + }); + + /// Returns true if sublayers list is non-null and not empty. + bool get hasSublayers { + final hasSub = sublayers != null && sublayers!.isNotEmpty; + return hasSub; + } + + /// Factory constructor to deserialize [LayerEntry] from a JSON map. + factory LayerEntry.fromJson(Map json) { + final sublayersJson = json['sublayers']; + final hasSublayersJson = sublayersJson != null; + + return LayerEntry( + label: json['label'] as String, + thumbnailAsset: json['thumbnailAsset'] as String, + source: json['source'] as String?, + url: json['url'] as String?, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, + refreshInterval: (json['refreshInterval'] as num?)?.toInt() ?? 0, + popup: json['popup'] as bool? ?? false, + popupTemplate: json['popupTemplate'] as String?, + sublayers: hasSublayersJson + ? (sublayersJson as List).map((e) => SublayerEntry.fromJson(e as Map)).toList() + : null, + ); + } +} + +/// Configuration structure for a 3D scene mode. +class SceneConfig { + /// Display label for the scene option. + final String label; + + /// Scene view type ('2d' or 'scene'). + final String type; + + /// Key resolving to a portal URI in [EsriMapConfig.portals]. + final String? portalKey; + + /// Item ID for the 3D WebScene item in ArcGIS Online / Enterprise. + final String? itemId; + + /// Constructs a [SceneConfig] instance. + const SceneConfig({ + required this.label, + required this.type, + this.portalKey, + this.itemId, + }); + + /// Factory constructor to deserialize [SceneConfig] from a JSON map. + factory SceneConfig.fromJson(Map json) => SceneConfig( + label: json['label'] as String, + type: json['type'] as String, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, + ); +} + +/// Feature flags controlling availability of experimental app capabilities remotely. +class FeaturesConfig { + /// Whether AI natural language search sheet is enabled. + final bool aiSearch; + + /// Whether 3D scene modes are enabled. + final bool scenes; + + /// Constructs a [FeaturesConfig] instance. + const FeaturesConfig({ + required this.aiSearch, + required this.scenes, + }); + + /// Factory constructor to deserialize [FeaturesConfig] from a JSON map. + factory FeaturesConfig.fromJson(Map json) => FeaturesConfig( + aiSearch: json['aiSearch'] as bool? ?? false, + scenes: json['scenes'] as bool? ?? false, + ); +} + +/// Configuration structure for a search category quick-filter chip. +class SearchCategoryConfig { + /// Display label for the category. + final String label; + + /// POI class string used to query backend server. + final String poiClass; + + /// Icon name key mapped via [iconDataForName]. + final String icon; + + /// Hexadecimal color string (e.g. "#F5F0E6"). + final String? color; + + /// Constructs a [SearchCategoryConfig] instance. + const SearchCategoryConfig({ + required this.label, + required this.poiClass, + required this.icon, + this.color, + }); + + /// Factory constructor to deserialize [SearchCategoryConfig] from a JSON map. + factory SearchCategoryConfig.fromJson(Map json) => SearchCategoryConfig( + label: json['label'] as String, + poiClass: json['poiClass'] as String, + icon: json['icon'] as String, + color: json['color'] as String?, + ); +} + +/// Root configuration container object holding all map settings. +class EsriMapConfig { + /// Map of portal keys to portal endpoint URIs. + final Map portals; + + /// Map of service keys to ArcGIS REST endpoint URLs. + final Map serviceUrls; + + /// Map of basemap keys to basemap configuration objects. + final Map basemaps; + + /// Map of layer keys to operational layer entries. + final Map layers; + + /// Map of scene keys to 3D scene mode configurations. + final Map scenes; + + /// Remote feature flags config. + final FeaturesConfig features; + + /// Quick-search category entries. + final List searchCategories; + + /// Constructs an [EsriMapConfig] instance. + const EsriMapConfig({ + required this.portals, + required this.serviceUrls, + required this.basemaps, + required this.layers, + required this.scenes, + required this.features, + required this.searchCategories, + }); + + /// Factory constructor to deserialize root [EsriMapConfig] from a JSON map. + factory EsriMapConfig.fromJson(Map json) => EsriMapConfig( + portals: (json['portals'] as Map).cast(), + serviceUrls: (json['serviceUrls'] as Map).cast(), + basemaps: (json['basemaps'] as Map).map( + (k, v) => MapEntry(k, BasemapConfig.fromJson(v as Map)), + ), + layers: (json['layers'] as Map).map( + (k, v) => MapEntry(k, LayerEntry.fromJson(v as Map)), + ), + scenes: (json['scenes'] as Map).map( + (k, v) => MapEntry(k, SceneConfig.fromJson(v as Map)), + ), + features: FeaturesConfig.fromJson(json['features'] as Map), + searchCategories: (json['searchCategories'] as List) + .map((e) => SearchCategoryConfig.fromJson(e as Map)) + .toList(), + ); +} diff --git a/lib/ui/esrimap/services/esrimap_basemap_factory.dart b/lib/ui/esrimap/services/esrimap_basemap_factory.dart new file mode 100644 index 000000000..e2f7b7501 --- /dev/null +++ b/lib/ui/esrimap/services/esrimap_basemap_factory.dart @@ -0,0 +1,49 @@ +/// ============================================================================ +/// File: esrimap_basemap_factory.dart +/// Description: Factory service constructing ArcGIS [Basemap] instances from +/// [EsriMapConfig] layer specifications. +/// ============================================================================ + +import 'package:arcgis_maps/arcgis_maps.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_basemaps.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_config.dart'; + +/// Constructs an ArcGIS [Basemap] for the requested [type] using configuration settings in [config]. +Basemap buildBasemap(BasemapType type, EsriMapConfig config) { + final entry = config.basemaps[basemapKey(type)]; + final isEntryNull = entry == null; + if (isEntryNull) return Basemap(); + + final basemap = Basemap(); + for (final layer in entry.baseLayers) { + switch (layer.type) { + case 'arcgisTiled': + final hasServiceKey = layer.serviceKey != null; + final url = hasServiceKey ? config.serviceUrls[layer.serviceKey!] : null; + final isUrlNotNull = url != null; + if (isUrlNotNull) basemap.baseLayers.add(ArcGISTiledLayer.withUri(Uri.parse(url))); + break; + + case 'arcgisVectorTiled': + final hasPortalKey = layer.portalKey != null; + final portalUrl = hasPortalKey ? config.portals[layer.portalKey!] : null; + final hasPortalAndItem = portalUrl != null && layer.itemId != null; + if (hasPortalAndItem) { + basemap.baseLayers.add( + ArcGISVectorTiledLayer.withItem( + PortalItem.withPortalAndItemId(portal: Portal(Uri.parse(portalUrl)), itemId: layer.itemId!), + ), + ); + } + break; + + case 'arcgisMapImage': + final hasServiceKey = layer.serviceKey != null; + final url = hasServiceKey ? config.serviceUrls[layer.serviceKey!] : null; + final isUrlNotNull = url != null; + if (isUrlNotNull) basemap.baseLayers.add(ArcGISMapImageLayer.withUri(Uri.parse(url))); + break; + } + } + return basemap; +} diff --git a/lib/ui/esrimap/services/esrimap_config_service.dart b/lib/ui/esrimap/services/esrimap_config_service.dart new file mode 100644 index 000000000..9eb223370 --- /dev/null +++ b/lib/ui/esrimap/services/esrimap_config_service.dart @@ -0,0 +1,45 @@ +/// ============================================================================ +/// File: esrimap_config_service.dart +/// Description: Service singleton fetching and caching backend EsriMapConfig +/// JSON data and authentication token endpoints. +/// ============================================================================ + +import 'dart:convert'; +import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_config.dart'; +import 'package:http/http.dart' as http; + +/// Service managing remote map configuration loading and token URL lookup. +class EsriMapConfigService { + /// Singleton instance accessor. + static final EsriMapConfigService instance = EsriMapConfigService._(); + EsriMapConfigService._(); + + /// Base API endpoint URL. + static const String BASE_URL = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; + + EsriMapConfig? _config; + Future? _pending; + + /// Fetches [EsriMapConfig], reusing existing or in-flight Future tasks. + Future fetch() { + _pending ??= _doFetch(); + return _pending!; + } + + /// Returns cached [EsriMapConfig], or null if not yet loaded. + EsriMapConfig? get cached => _config; + + /// Returns backend tokens URL for authentication challenge handlers. + String get tokensUrl => '$BASE_URL/tokens'; + + /// Performs actual HTTP GET request to fetch remote configuration. + Future _doFetch() async { + final response = await http.get(Uri.parse('$BASE_URL/config')); + final isResNotOk = response.statusCode != 200; + if (isResNotOk) { + throw Exception('Config fetch failed: ${response.statusCode}'); + } + _config = EsriMapConfig.fromJson(jsonDecode(response.body) as Map); + return _config!; + } +} diff --git a/lib/ui/esrimap/esrimap_ai_search.dart b/lib/ui/esrimap/widgets/esrimap_ai_search_sheet.dart similarity index 73% rename from lib/ui/esrimap/esrimap_ai_search.dart rename to lib/ui/esrimap/widgets/esrimap_ai_search_sheet.dart index fef4fd3f1..4f381baef 100644 --- a/lib/ui/esrimap/esrimap_ai_search.dart +++ b/lib/ui/esrimap/widgets/esrimap_ai_search_sheet.dart @@ -1,81 +1,31 @@ +/// ============================================================================ +/// File: esrimap_ai_search_sheet.dart +/// Description: Modal bottom sheet widget enabling AI natural language map queries +/// (e.g., "coffee spots near Geisel Library"). +/// ============================================================================ + import 'dart:convert'; +import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_ai_search_model.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; -import 'esrimap_config.dart'; - -class AiSearchResult { - final String name; - final String subtitle; - final String address; - final double latitude; - final double longitude; - final int? distanceFeet; - final String? distanceFormatted; - - const AiSearchResult({ - required this.name, - required this.subtitle, - required this.address, - required this.latitude, - required this.longitude, - this.distanceFeet, - this.distanceFormatted, - }); - - factory AiSearchResult.fromJson(Map j) => AiSearchResult( - name: j['name'] as String, - subtitle: j['subtitle'] as String? ?? '', - address: j['address'] as String? ?? '', - latitude: (j['latitude'] as num).toDouble(), - longitude: (j['longitude'] as num).toDouble(), - distanceFeet: j['distanceFeet'] as int?, - distanceFormatted: j['distanceFormatted'] as String?, - ); -} - -class AiSearchRouteStop { - final double lat; - final double lon; - const AiSearchRouteStop({required this.lat, required this.lon}); - factory AiSearchRouteStop.fromJson(Map j) => - AiSearchRouteStop(lat: (j['lat'] as num).toDouble(), lon: (j['lon'] as num).toDouble()); -} - -class AiSearchResponse { - final String message; - final List results; - final List? routeStopNames; - final List? routeStopCoords; - - const AiSearchResponse({required this.message, required this.results, this.routeStopNames, this.routeStopCoords}); - - factory AiSearchResponse.fromJson(Map j) { - List? stopNames; - List? stopCoords; - final route = j['suggestedRoute']; - if (route != null) { - stopNames = (route['stops'] as List).cast(); - stopCoords = (route['stopCoords'] as List) - .map((s) => AiSearchRouteStop.fromJson(s as Map)) - .toList(); - } - return AiSearchResponse( - message: j['message'] as String, - results: (j['results'] as List).map((r) => AiSearchResult.fromJson(r as Map)).toList(), - routeStopNames: stopNames, - routeStopCoords: stopCoords, - ); - } -} enum _AiSearchState { idle, loading, results, error } +/// Modal bottom sheet widget for AI map search. class EsriAiSearchSheet extends StatefulWidget { + /// Optional current user latitude coordinate. final double? userLat; + + /// Optional current user longitude coordinate. final double? userLon; + + /// Callback when a location result is selected. final void Function(AiSearchResult result) onLocationSelected; + + /// Callback when a multi-stop route is requested. final void Function(List stops) onRouteRequested; + /// Constructs an [EsriAiSearchSheet] instance. const EsriAiSearchSheet({ Key? key, this.userLat, @@ -92,38 +42,43 @@ class _EsriAiSearchSheetState extends State { final _controller = TextEditingController(); _AiSearchState _state = _AiSearchState.idle; AiSearchResponse? _response; - String? _errorMessage; - static const _BASE_URL = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; + /// Base API URL endpoint. + static const String BASE_URL = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; Future _submit() async { final query = _controller.text.trim(); - if (query.isEmpty) return; + final isQueryEmpty = query.isEmpty; + if (isQueryEmpty) return; + setState(() { _state = _AiSearchState.loading; _response = null; - _errorMessage = null; }); + try { final body = {'query': query}; - if (widget.userLat != null) body['lat'] = widget.userLat; - if (widget.userLon != null) body['lon'] = widget.userLon; + final hasUserLat = widget.userLat != null; + final hasUserLon = widget.userLon != null; + if (hasUserLat) body['lat'] = widget.userLat; + if (hasUserLon) body['lon'] = widget.userLon; final res = await http.post( - Uri.parse('$_BASE_URL/ai-search'), + Uri.parse('$BASE_URL/ai-search'), headers: {'Content-Type': 'application/json'}, body: jsonEncode(body), ); final isResNotOk = res.statusCode != 200; if (isResNotOk) throw Exception('Request failed: ${res.statusCode}'); + final data = jsonDecode(res.body) as Map; setState(() { _response = AiSearchResponse.fromJson(data); _state = _AiSearchState.results; }); } catch (e) { + debugPrint('AI search error: $e'); setState(() { - _errorMessage = e.toString(); _state = _AiSearchState.error; }); } @@ -135,7 +90,8 @@ class _EsriAiSearchSheetState extends State { if (isDining) return Icons.restaurant; final isLibrary = s.contains('library') || s.contains('academic'); if (isLibrary) return Icons.menu_book; - if (s.contains('parking')) return Icons.local_parking; + final isParking = s.contains('parking'); + if (isParking) return Icons.local_parking; final isRec = s.contains('recreation') || s.contains('gym') || s.contains('fitness'); if (isRec) return Icons.fitness_center; final isTransit = s.contains('transit') || s.contains('shuttle'); @@ -157,7 +113,12 @@ class _EsriAiSearchSheetState extends State { final subtitleColor = isDark ? Colors.grey[400]! : Colors.grey[600]!; final accent = Theme.of(context).colorScheme.primary; final bottomPad = MediaQuery.of(context).viewInsets.bottom; - final hasResults = _state == _AiSearchState.results && _response != null; + + final isResultsState = _state == _AiSearchState.results; + final hasResponse = _response != null; + final hasResults = isResultsState && hasResponse; + final isLoading = _state == _AiSearchState.loading; + final isError = _state == _AiSearchState.error; return Container( decoration: BoxDecoration( @@ -169,7 +130,7 @@ class _EsriAiSearchSheetState extends State { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - // Handle + // Drag handle bar Center( child: Container( margin: const EdgeInsets.only(top: 10, bottom: 6), @@ -221,12 +182,12 @@ class _EsriAiSearchSheetState extends State { ), const SizedBox(width: 8), FilledButton( - onPressed: _state == _AiSearchState.loading ? null : _submit, + onPressed: isLoading ? null : _submit, style: FilledButton.styleFrom( minimumSize: const Size(48, 48), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), ), - child: _state == _AiSearchState.loading + child: isLoading ? const SizedBox( width: 18, height: 18, @@ -238,7 +199,7 @@ class _EsriAiSearchSheetState extends State { ), ), - // Results + // Results section if (hasResults) ...[ if (_response!.message.isNotEmpty) Padding( @@ -264,9 +225,12 @@ class _EsriAiSearchSheetState extends State { Divider(height: 1, indent: 56, color: isDark ? Colors.grey[800] : Colors.grey[200]), itemBuilder: (context, i) { final r = _response!.results[i]; + final hasDistance = r.distanceFormatted != null; + final subtitleStr = hasDistance ? '${r.subtitle} · ${r.distanceFormatted}' : r.subtitle; + return ListTile( leading: CircleAvatar( - backgroundColor: accent.withOpacity(0.12), + backgroundColor: accent.withValues(alpha: 0.12), child: Icon(_iconForSubtitle(r.subtitle), color: accent, size: 18), ), title: Text( @@ -274,7 +238,7 @@ class _EsriAiSearchSheetState extends State { style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: textColor), ), subtitle: Text( - r.distanceFormatted != null ? '${r.subtitle} · ${r.distanceFormatted}' : r.subtitle, + subtitleStr, style: TextStyle(fontSize: 12, color: subtitleColor), ), onTap: () { @@ -307,7 +271,7 @@ class _EsriAiSearchSheetState extends State { const SizedBox(height: 16), ], - if (_state == _AiSearchState.error) + if (isError) Padding( padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), child: Text( diff --git a/lib/ui/esrimap/esrimap_fab.dart b/lib/ui/esrimap/widgets/esrimap_fab.dart similarity index 66% rename from lib/ui/esrimap/esrimap_fab.dart rename to lib/ui/esrimap/widgets/esrimap_fab.dart index 0c705adef..b05407306 100644 --- a/lib/ui/esrimap/esrimap_fab.dart +++ b/lib/ui/esrimap/widgets/esrimap_fab.dart @@ -1,17 +1,42 @@ +/// ============================================================================ +/// File: esrimap_fab.dart +/// Description: Floating Action Button (FAB) cluster widget containing the +/// compass needle, recenter on user/view, and layers toggle buttons. +/// ============================================================================ + import 'dart:math' as math; import 'package:flutter/material.dart'; +/// Floating action button cluster widget rendered in top-right of map view. class EsriMapFabCluster extends StatelessWidget { + /// Whether dark theme mode is active. final bool isDark; + + /// Whether a 3D scene mode is active. final bool is3D; + + /// Map rotation heading in degrees. final double mapRotation; + + /// Whether location tracking button is active. final bool isLocationActive; + + /// Whether recenter button is active. final bool isRecenterActive; + + /// Callback when layers panel button is pressed. final VoidCallback onShowLayersPanel; + + /// Callback when recenter on view button is pressed. final VoidCallback onRecenterOnView; + + /// Callback when recenter on user location button is pressed. final VoidCallback onRecenterOnUser; + + /// Callback when compass snap-to-north button is pressed. final VoidCallback onSnapToNorth; + /// Constructs an [EsriMapFabCluster] instance. const EsriMapFabCluster({ Key? key, required this.isDark, @@ -25,20 +50,29 @@ class EsriMapFabCluster extends StatelessWidget { required this.onSnapToNorth, }) : super(key: key); - static const _ACTIVE_COLOR = Color(0xFFC69214); - static const _SIZE = 48.0; - static const _BTN_HEIGHT = 44.0; + /// Active state highlight color. + static const Color ACTIVE_COLOR = Color(0xFFC69214); + + /// Fixed button diameter size. + static const double SIZE = 48.0; + + /// Height for individual pill button segments. + static const double BTN_HEIGHT = 44.0; @override Widget build(BuildContext context) { final bgColor = isDark ? Colors.grey[800]! : Colors.white; final fgColor = isDark ? Colors.white : Colors.grey[800]!; + final locationColor = isLocationActive ? ACTIVE_COLOR : fgColor; + final recenterColor = isRecenterActive ? ACTIVE_COLOR : fgColor; + final isNot3D = !is3D; + return Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, children: [ - // Compass — matches pill width + // Compass needle button Material( elevation: 4, color: bgColor, @@ -48,8 +82,8 @@ class EsriMapFabCluster extends StatelessWidget { onTap: onSnapToNorth, behavior: HitTestBehavior.opaque, child: SizedBox( - width: _SIZE, - height: _SIZE, + width: SIZE, + height: SIZE, child: Center( child: CustomPaint( size: const Size(24, 24), @@ -63,28 +97,28 @@ class EsriMapFabCluster extends StatelessWidget { ), ), const SizedBox(height: 10), - // Pill — my location, recenter, layers + // Pill container with action buttons Material( elevation: 4, color: bgColor, - borderRadius: BorderRadius.circular(_SIZE / 2), + borderRadius: BorderRadius.circular(SIZE / 2), clipBehavior: Clip.antiAlias, child: SizedBox( - width: _SIZE, + width: SIZE, child: Padding( padding: const EdgeInsets.symmetric(vertical: 4), child: Column( mainAxisSize: MainAxisSize.min, children: [ - if (!is3D) + if (isNot3D) _pillButton( icon: Icons.my_location, - color: isLocationActive ? _ACTIVE_COLOR : fgColor, + color: locationColor, onTap: onRecenterOnUser, ), _pillButton( icon: Icons.center_focus_strong, - color: isRecenterActive ? _ACTIVE_COLOR : fgColor, + color: recenterColor, onTap: onRecenterOnView, ), _pillButton(icon: Icons.layers_outlined, color: fgColor, onTap: onShowLayersPanel), @@ -102,7 +136,7 @@ class EsriMapFabCluster extends StatelessWidget { onTap: onTap, behavior: HitTestBehavior.opaque, child: SizedBox( - height: _BTN_HEIGHT, + height: BTN_HEIGHT, child: Center(child: Icon(icon, size: 22, color: color)), ), ); @@ -145,6 +179,9 @@ class _CompassNeedlePainter extends CustomPainter { } @override - bool shouldRepaint(_CompassNeedlePainter old) => - old.rotationDegrees != rotationDegrees || old.southColor != southColor; + bool shouldRepaint(_CompassNeedlePainter old) { + final isRotationChanged = old.rotationDegrees != rotationDegrees; + final isColorChanged = old.southColor != southColor; + return isRotationChanged || isColorChanged; + } } diff --git a/lib/ui/esrimap/esrimap_layers_panel.dart b/lib/ui/esrimap/widgets/esrimap_layers_panel.dart similarity index 73% rename from lib/ui/esrimap/esrimap_layers_panel.dart rename to lib/ui/esrimap/widgets/esrimap_layers_panel.dart index 1407ecd49..2e85c470c 100644 --- a/lib/ui/esrimap/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/widgets/esrimap_layers_panel.dart @@ -1,19 +1,46 @@ +/// ============================================================================ +/// File: esrimap_layers_panel.dart +/// Description: Floating panel widget allowing users to select basemaps (Default, +/// Light, Dark, Satellite), toggle operational layers, and switch 3D scenes. +/// ============================================================================ + +import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_basemaps.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_config.dart'; import 'package:flutter/material.dart'; -import 'esrimap_basemaps.dart'; -import 'esrimap_config.dart'; +/// Bottom sheet widget rendering basemap choices, layer toggles, and 3D scene mode chips. class EsriMapLayersPanel extends StatelessWidget { + /// Map configuration containing basemap specs and layer definitions. final EsriMapConfig config; + + /// Currently selected basemap type. final BasemapType currentBasemapType; + + /// Currently selected scene mode key ('default', 'building3d', 'droneView'). final String currentSceneKey; + + /// Visibility status map keyed by operational layer key. final Map layerVisible; + + /// Loading status map keyed by operational layer key. final Map layerLoading; - final void Function(BasemapType) onSwitchBasemap; - final void Function(String) onSetSceneMode; - final void Function(String) onToggleLayer; + + /// Callback when a basemap option is selected. + final void Function(BasemapType type) onSwitchBasemap; + + /// Callback when a 3D scene mode chip is selected. + final void Function(String key) onSetSceneMode; + + /// Callback when an operational layer toggle is pressed. + final void Function(String key) onToggleLayer; + + /// Callback when panel close button is pressed. final VoidCallback onClose; + + /// Whether to hide the 3D scene switcher section. final bool hideSceneSwitcher; + /// Constructs an [EsriMapLayersPanel] instance. const EsriMapLayersPanel({ Key? key, required this.config, @@ -37,12 +64,12 @@ class EsriMapLayersPanel extends StatelessWidget { final accent = isDark ? Colors.lightBlue[300]! : Theme.of(context).colorScheme.primary; Widget sectionLabel(String text) => Padding( - padding: const EdgeInsets.fromLTRB(16, 12, 16, 8), - child: Text( - text, - style: TextStyle(fontSize: 11, fontWeight: FontWeight.w700, letterSpacing: 0.8, color: subtitleColor), - ), - ); + padding: const EdgeInsets.fromLTRB(16, 12, 16, 8), + child: Text( + text, + style: TextStyle(fontSize: 11, fontWeight: FontWeight.w700, letterSpacing: 0.8, color: subtitleColor), + ), + ); Widget imageTile({ required String label, @@ -95,32 +122,32 @@ class EsriMapLayersPanel extends StatelessWidget { } Widget networkImage(String url) => Image.network( - url, - fit: BoxFit.cover, - errorBuilder: (_, __, ___) => Container(color: isDark ? Colors.grey[700] : Colors.grey[300]), - ); + url, + fit: BoxFit.cover, + errorBuilder: (_, __, ___) => Container(color: isDark ? Colors.grey[700] : Colors.grey[300]), + ); Widget sceneChip(String key, String label, bool selected) => GestureDetector( - onTap: () => onSetSceneMode(key), - child: Container( - padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 7), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(20), - border: selected - ? Border.all(color: accent, width: 2) - : Border.all(color: isDark ? Colors.grey[700]! : Colors.grey[300]!, width: 1), - color: selected ? accent.withOpacity(0.12) : (isDark ? Colors.grey[850] : Colors.grey[100]), - ), - child: Text( - label, - style: TextStyle( - fontSize: 13, - fontWeight: selected ? FontWeight.w700 : FontWeight.w400, - color: selected ? accent : textColor, + onTap: () => onSetSceneMode(key), + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 7), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + border: selected + ? Border.all(color: accent, width: 2) + : Border.all(color: isDark ? Colors.grey[700]! : Colors.grey[300]!, width: 1), + color: selected ? accent.withValues(alpha: 0.12) : (isDark ? Colors.grey[850] : Colors.grey[100]), + ), + child: Text( + label, + style: TextStyle( + fontSize: 13, + fontWeight: selected ? FontWeight.w700 : FontWeight.w400, + color: selected ? accent : textColor, + ), + ), ), - ), - ), - ); + ); final bottomPad = MediaQuery.of(context).padding.bottom; final isDefault = currentSceneKey == 'default'; @@ -132,7 +159,8 @@ class EsriMapLayersPanel extends StatelessWidget { bottom: bottomPad + 12, child: GestureDetector( onVerticalDragEnd: (details) { - if (details.velocity.pixelsPerSecond.dy > 200) onClose(); + final isSwipeDown = details.velocity.pixelsPerSecond.dy > 200; + if (isSwipeDown) onClose(); }, child: Material( elevation: 10, @@ -161,7 +189,7 @@ class EsriMapLayersPanel extends StatelessWidget { ), ), - // Basemap + Layers — grayed out when not in default scene + // Basemap + Layers — grayed out when not in default 2D scene Opacity( opacity: isDefault ? 1.0 : 0.35, child: IgnorePointer( @@ -183,7 +211,8 @@ class EsriMapLayersPanel extends StatelessWidget { selected: currentBasemapType == basemapTypeFromKey(entry.key), onTap: () { final t = basemapTypeFromKey(entry.key); - if (t != null) onSwitchBasemap(t); + final isTypeNotNull = t != null; + if (isTypeNotNull) onSwitchBasemap(t); }, imageWidget: networkImage(entry.value.thumbnailAsset), ), diff --git a/lib/ui/esrimap/esrimap_scene.dart b/lib/ui/esrimap/widgets/esrimap_scene.dart similarity index 65% rename from lib/ui/esrimap/esrimap_scene.dart rename to lib/ui/esrimap/widgets/esrimap_scene.dart index 2576a4df2..7088ebdf9 100644 --- a/lib/ui/esrimap/esrimap_scene.dart +++ b/lib/ui/esrimap/widgets/esrimap_scene.dart @@ -1,18 +1,37 @@ +/// ============================================================================ +/// File: esrimap_scene.dart +/// Description: Widget wrapper for rendering 3D ArcGIS WebScene portals, +/// handling camera viewpoint controls, label scaling, and snap-to-north. +/// ============================================================================ + import 'dart:async'; import 'package:arcgis_maps/arcgis_maps.dart'; import 'package:flutter/material.dart'; +/// Stateful widget encapsulating an [ArcGISSceneView] for 3D building and drone scene layers. class EsriSceneWidget extends StatefulWidget { + /// Portal URI key. final String portalUri; + + /// WebScene Portal Item ID. final String itemId; + + /// Callback when camera rotation heading changes. final void Function(double heading)? onHeadingChanged; - const EsriSceneWidget({super.key, required this.portalUri, required this.itemId, this.onHeadingChanged}); + /// Constructs an [EsriSceneWidget] instance. + const EsriSceneWidget({ + super.key, + required this.portalUri, + required this.itemId, + this.onHeadingChanged, + }); @override State createState() => EsriSceneWidgetState(); } +/// State object managing 3D camera controls and scene initialization. class EsriSceneWidgetState extends State { late final ArcGISSceneViewController _sceneViewController; Camera? _initialCamera; @@ -47,19 +66,22 @@ class EsriSceneWidgetState extends State { ); _sceneViewController.setViewpointCamera(_initialCamera!); - // Capture the lat offset between camera and look-at target once the - // viewpoint stabilizes — used by snapToNorth to rotate around target. + // Capture camera to target offset once viewpoint stabilizes Future.delayed(const Duration(milliseconds: 500), () { - if (!mounted) return; + final isNotMounted = !mounted; + if (isNotMounted) return; final vp = _sceneViewController.getCurrentViewpoint(ViewpointType.centerAndScale); final pt = vp?.targetGeometry; - if (pt is ArcGISPoint) _camToTargetLatOffset = pt.y - _initialCamera!.location.y; + final isPoint = pt is ArcGISPoint; + if (isPoint) _camToTargetLatOffset = pt.y - _initialCamera!.location.y; }); _viewpointSubscription = _sceneViewController.onViewpointChanged.listen((_) { - if (!mounted) return; + final isNotMounted = !mounted; + if (isNotMounted) return; final vp = _sceneViewController.getCurrentViewpoint(ViewpointType.centerAndScale); - if (vp != null) widget.onHeadingChanged?.call(vp.rotation); + final isVpNotNull = vp != null; + if (isVpNotNull) widget.onHeadingChanged?.call(vp.rotation); }); _applyLabelScales(scene); @@ -73,34 +95,37 @@ class EsriSceneWidgetState extends State { void _applyLabelScalesToLayers(List layers) { for (final layer in layers) { - if (layer is FeatureLayer) { + final isFeatureLayer = layer is FeatureLayer; + final isGroupLayer = layer is GroupLayer; + if (isFeatureLayer) { for (final labelDef in layer.labelDefinitions) { labelDef.minScale = 4000; } - } else if (layer is GroupLayer) { + } else if (isGroupLayer) { _applyLabelScalesToLayers(layer.layers); } } } + /// Resets 3D camera to initial campus view coordinates. void resetCamera() { - if (_initialCamera == null) return; + final isInitialCameraNull = _initialCamera == null; + if (isInitialCameraNull) return; _sceneViewController.setViewpointCamera(_initialCamera!); } - /// Snaps heading to north by rotating the camera around the current - /// look-at target so the building/point stays centered on screen. + /// Snaps heading to north by rotating camera around current look-at target. void snapToNorth() { - if (_initialCamera == null) return; + final isInitialCameraNull = _initialCamera == null; + if (isInitialCameraNull) return; final vp = _sceneViewController.getCurrentViewpoint(ViewpointType.centerAndScale); final target = vp?.targetGeometry; - if (target is! ArcGISPoint) { + final isNotPoint = target is! ArcGISPoint; + if (isNotPoint) { resetCamera(); return; } - // Position camera due south of the current target at the same distance - // as the initial camera-to-target offset final pivotLat = target.y; final pivotLon = target.x; final camAlt = _initialCamera!.location.z ?? 1062.871; diff --git a/lib/ui/esrimap/widgets/esrimap_search_bar.dart b/lib/ui/esrimap/widgets/esrimap_search_bar.dart index 39fa865c1..904a16c0d 100644 --- a/lib/ui/esrimap/widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/widgets/esrimap_search_bar.dart @@ -4,7 +4,7 @@ /// including AI search trigger and dropdown results list. /// ============================================================================ -import 'package:campus_mobile_experimental/ui/esrimap/esrimap_config.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_config.dart'; import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; import 'package:flutter/material.dart'; From 947c259a62bdc8b4b2af7be8b3631db8965d2e94 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 17:04:15 -0700 Subject: [PATCH 017/139] a --- .../models/esrimap_ai_search_model.dart | 23 ++-- lib/ui/esrimap/models/esrimap_config.dart | 128 +++++++----------- .../services/esrimap_auth_handler.dart | 12 +- .../services/esrimap_config_service.dart | 4 +- .../widgets/esrimap_ai_search_sheet.dart | 5 +- lib/ui/esrimap/widgets/esrimap_fab.dart | 13 +- .../esrimap/widgets/esrimap_layers_panel.dart | 58 ++++---- lib/ui/esrimap/widgets/esrimap_scene.dart | 7 +- 8 files changed, 102 insertions(+), 148 deletions(-) diff --git a/lib/ui/esrimap/models/esrimap_ai_search_model.dart b/lib/ui/esrimap/models/esrimap_ai_search_model.dart index 1ad100ec8..e68cbc063 100644 --- a/lib/ui/esrimap/models/esrimap_ai_search_model.dart +++ b/lib/ui/esrimap/models/esrimap_ai_search_model.dart @@ -40,14 +40,14 @@ class AiSearchResult { /// Factory constructor to deserialize [AiSearchResult] from a JSON map. factory AiSearchResult.fromJson(Map j) => AiSearchResult( - name: j['name'] as String, - subtitle: j['subtitle'] as String? ?? '', - address: j['address'] as String? ?? '', - latitude: (j['latitude'] as num).toDouble(), - longitude: (j['longitude'] as num).toDouble(), - distanceFeet: j['distanceFeet'] as int?, - distanceFormatted: j['distanceFormatted'] as String?, - ); + name: j['name'] as String, + subtitle: j['subtitle'] as String? ?? '', + address: j['address'] as String? ?? '', + latitude: (j['latitude'] as num).toDouble(), + longitude: (j['longitude'] as num).toDouble(), + distanceFeet: j['distanceFeet'] as int?, + distanceFormatted: j['distanceFormatted'] as String?, + ); } /// Geographical coordinate stop along a multi-stop AI route. @@ -81,12 +81,7 @@ class AiSearchResponse { final List? routeStopCoords; /// Constructs an [AiSearchResponse] instance. - const AiSearchResponse({ - required this.message, - required this.results, - this.routeStopNames, - this.routeStopCoords, - }); + const AiSearchResponse({required this.message, required this.results, this.routeStopNames, this.routeStopCoords}); /// Factory constructor to deserialize [AiSearchResponse] from a JSON map. factory AiSearchResponse.fromJson(Map j) { diff --git a/lib/ui/esrimap/models/esrimap_config.dart b/lib/ui/esrimap/models/esrimap_config.dart index 4588b3698..9583f4a1d 100644 --- a/lib/ui/esrimap/models/esrimap_config.dart +++ b/lib/ui/esrimap/models/esrimap_config.dart @@ -19,20 +19,15 @@ class BaseLayerSpec { final String? itemId; /// Constructs a [BaseLayerSpec] instance. - const BaseLayerSpec({ - required this.type, - this.serviceKey, - this.portalKey, - this.itemId, - }); + const BaseLayerSpec({required this.type, this.serviceKey, this.portalKey, this.itemId}); /// Factory constructor to deserialize [BaseLayerSpec] from a JSON map. factory BaseLayerSpec.fromJson(Map json) => BaseLayerSpec( - type: json['type'] as String, - serviceKey: json['serviceKey'] as String?, - portalKey: json['portalKey'] as String?, - itemId: json['itemId'] as String?, - ); + type: json['type'] as String, + serviceKey: json['serviceKey'] as String?, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, + ); } /// Configuration structure for a basemap option. @@ -47,20 +42,14 @@ class BasemapConfig { final List baseLayers; /// Constructs a [BasemapConfig] instance. - const BasemapConfig({ - required this.label, - required this.thumbnailAsset, - required this.baseLayers, - }); + const BasemapConfig({required this.label, required this.thumbnailAsset, required this.baseLayers}); /// Factory constructor to deserialize [BasemapConfig] from a JSON map. factory BasemapConfig.fromJson(Map json) => BasemapConfig( - label: json['label'] as String, - thumbnailAsset: json['thumbnailAsset'] as String, - baseLayers: (json['baseLayers'] as List) - .map((e) => BaseLayerSpec.fromJson(e as Map)) - .toList(), - ); + label: json['label'] as String, + thumbnailAsset: json['thumbnailAsset'] as String, + baseLayers: (json['baseLayers'] as List).map((e) => BaseLayerSpec.fromJson(e as Map)).toList(), + ); } /// Configuration structure for a sublayer inside a map image layer. @@ -103,15 +92,15 @@ class SublayerEntry { /// Factory constructor to deserialize [SublayerEntry] from a JSON map. factory SublayerEntry.fromJson(Map json) => SublayerEntry( - name: json['name'] as String, - source: json['source'] as String, - url: json['url'] as String?, - portalKey: json['portalKey'] as String?, - itemId: json['itemId'] as String?, - refreshInterval: (json['refreshInterval'] as num?)?.toInt() ?? 0, - popup: json['popup'] as bool? ?? false, - popupTemplate: json['popupTemplate'] as String?, - ); + name: json['name'] as String, + source: json['source'] as String, + url: json['url'] as String?, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, + refreshInterval: (json['refreshInterval'] as num?)?.toInt() ?? 0, + popup: json['popup'] as bool? ?? false, + popupTemplate: json['popupTemplate'] as String?, + ); } /// Configuration structure for an operational layer toggle. @@ -203,20 +192,15 @@ class SceneConfig { final String? itemId; /// Constructs a [SceneConfig] instance. - const SceneConfig({ - required this.label, - required this.type, - this.portalKey, - this.itemId, - }); + const SceneConfig({required this.label, required this.type, this.portalKey, this.itemId}); /// Factory constructor to deserialize [SceneConfig] from a JSON map. factory SceneConfig.fromJson(Map json) => SceneConfig( - label: json['label'] as String, - type: json['type'] as String, - portalKey: json['portalKey'] as String?, - itemId: json['itemId'] as String?, - ); + label: json['label'] as String, + type: json['type'] as String, + portalKey: json['portalKey'] as String?, + itemId: json['itemId'] as String?, + ); } /// Feature flags controlling availability of experimental app capabilities remotely. @@ -228,16 +212,11 @@ class FeaturesConfig { final bool scenes; /// Constructs a [FeaturesConfig] instance. - const FeaturesConfig({ - required this.aiSearch, - required this.scenes, - }); + const FeaturesConfig({required this.aiSearch, required this.scenes}); /// Factory constructor to deserialize [FeaturesConfig] from a JSON map. - factory FeaturesConfig.fromJson(Map json) => FeaturesConfig( - aiSearch: json['aiSearch'] as bool? ?? false, - scenes: json['scenes'] as bool? ?? false, - ); + factory FeaturesConfig.fromJson(Map json) => + FeaturesConfig(aiSearch: json['aiSearch'] as bool? ?? false, scenes: json['scenes'] as bool? ?? false); } /// Configuration structure for a search category quick-filter chip. @@ -255,20 +234,15 @@ class SearchCategoryConfig { final String? color; /// Constructs a [SearchCategoryConfig] instance. - const SearchCategoryConfig({ - required this.label, - required this.poiClass, - required this.icon, - this.color, - }); + const SearchCategoryConfig({required this.label, required this.poiClass, required this.icon, this.color}); /// Factory constructor to deserialize [SearchCategoryConfig] from a JSON map. factory SearchCategoryConfig.fromJson(Map json) => SearchCategoryConfig( - label: json['label'] as String, - poiClass: json['poiClass'] as String, - icon: json['icon'] as String, - color: json['color'] as String?, - ); + label: json['label'] as String, + poiClass: json['poiClass'] as String, + icon: json['icon'] as String, + color: json['color'] as String?, + ); } /// Root configuration container object holding all map settings. @@ -307,20 +281,20 @@ class EsriMapConfig { /// Factory constructor to deserialize root [EsriMapConfig] from a JSON map. factory EsriMapConfig.fromJson(Map json) => EsriMapConfig( - portals: (json['portals'] as Map).cast(), - serviceUrls: (json['serviceUrls'] as Map).cast(), - basemaps: (json['basemaps'] as Map).map( - (k, v) => MapEntry(k, BasemapConfig.fromJson(v as Map)), - ), - layers: (json['layers'] as Map).map( - (k, v) => MapEntry(k, LayerEntry.fromJson(v as Map)), - ), - scenes: (json['scenes'] as Map).map( - (k, v) => MapEntry(k, SceneConfig.fromJson(v as Map)), - ), - features: FeaturesConfig.fromJson(json['features'] as Map), - searchCategories: (json['searchCategories'] as List) - .map((e) => SearchCategoryConfig.fromJson(e as Map)) - .toList(), - ); + portals: (json['portals'] as Map).cast(), + serviceUrls: (json['serviceUrls'] as Map).cast(), + basemaps: (json['basemaps'] as Map).map( + (k, v) => MapEntry(k, BasemapConfig.fromJson(v as Map)), + ), + layers: (json['layers'] as Map).map( + (k, v) => MapEntry(k, LayerEntry.fromJson(v as Map)), + ), + scenes: (json['scenes'] as Map).map( + (k, v) => MapEntry(k, SceneConfig.fromJson(v as Map)), + ), + features: FeaturesConfig.fromJson(json['features'] as Map), + searchCategories: (json['searchCategories'] as List) + .map((e) => SearchCategoryConfig.fromJson(e as Map)) + .toList(), + ); } diff --git a/lib/ui/esrimap/services/esrimap_auth_handler.dart b/lib/ui/esrimap/services/esrimap_auth_handler.dart index baa750bc2..dee509f35 100644 --- a/lib/ui/esrimap/services/esrimap_auth_handler.dart +++ b/lib/ui/esrimap/services/esrimap_auth_handler.dart @@ -31,13 +31,17 @@ class AgeAuthChallengeHandler implements ArcGISAuthenticationChallengeHandler { // Return cached token if valid and not expiring within 5 minutes if (isAgo) { - if (_cachedAgoToken != null && + final isAgoCachedValid = + _cachedAgoToken != null && _agoTokenExpiry != null && - DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5)))) => (_cachedAgoToken, _agoTokenExpiry); + DateTime.now().isBefore(_agoTokenExpiry!.subtract(const Duration(minutes: 5))); + if (isAgoCachedValid) return (_cachedAgoToken, _agoTokenExpiry); } else { - if (_cachedAgeToken != null && + final isAgeCachedValid = + _cachedAgeToken != null && _ageTokenExpiry != null && - DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5)))) => (_cachedAgeToken, _ageTokenExpiry); + DateTime.now().isBefore(_ageTokenExpiry!.subtract(const Duration(minutes: 5))); + if (isAgeCachedValid) return (_cachedAgeToken, _ageTokenExpiry); } // Request fresh authentication tokens from server endpoint diff --git a/lib/ui/esrimap/services/esrimap_config_service.dart b/lib/ui/esrimap/services/esrimap_config_service.dart index 9eb223370..5bec761ed 100644 --- a/lib/ui/esrimap/services/esrimap_config_service.dart +++ b/lib/ui/esrimap/services/esrimap_config_service.dart @@ -36,9 +36,7 @@ class EsriMapConfigService { Future _doFetch() async { final response = await http.get(Uri.parse('$BASE_URL/config')); final isResNotOk = response.statusCode != 200; - if (isResNotOk) { - throw Exception('Config fetch failed: ${response.statusCode}'); - } + if (isResNotOk) throw Exception('Config fetch failed: ${response.statusCode}'); _config = EsriMapConfig.fromJson(jsonDecode(response.body) as Map); return _config!; } diff --git a/lib/ui/esrimap/widgets/esrimap_ai_search_sheet.dart b/lib/ui/esrimap/widgets/esrimap_ai_search_sheet.dart index 4f381baef..af5b5f1a4 100644 --- a/lib/ui/esrimap/widgets/esrimap_ai_search_sheet.dart +++ b/lib/ui/esrimap/widgets/esrimap_ai_search_sheet.dart @@ -237,10 +237,7 @@ class _EsriAiSearchSheetState extends State { r.name, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: textColor), ), - subtitle: Text( - subtitleStr, - style: TextStyle(fontSize: 12, color: subtitleColor), - ), + subtitle: Text(subtitleStr, style: TextStyle(fontSize: 12, color: subtitleColor)), onTap: () { Navigator.pop(context); widget.onLocationSelected(r); diff --git a/lib/ui/esrimap/widgets/esrimap_fab.dart b/lib/ui/esrimap/widgets/esrimap_fab.dart index b05407306..7e1050cad 100644 --- a/lib/ui/esrimap/widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/widgets/esrimap_fab.dart @@ -110,17 +110,8 @@ class EsriMapFabCluster extends StatelessWidget { child: Column( mainAxisSize: MainAxisSize.min, children: [ - if (isNot3D) - _pillButton( - icon: Icons.my_location, - color: locationColor, - onTap: onRecenterOnUser, - ), - _pillButton( - icon: Icons.center_focus_strong, - color: recenterColor, - onTap: onRecenterOnView, - ), + if (isNot3D) _pillButton(icon: Icons.my_location, color: locationColor, onTap: onRecenterOnUser), + _pillButton(icon: Icons.center_focus_strong, color: recenterColor, onTap: onRecenterOnView), _pillButton(icon: Icons.layers_outlined, color: fgColor, onTap: onShowLayersPanel), ], ), diff --git a/lib/ui/esrimap/widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/widgets/esrimap_layers_panel.dart index 2e85c470c..9bc153f63 100644 --- a/lib/ui/esrimap/widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/widgets/esrimap_layers_panel.dart @@ -64,12 +64,12 @@ class EsriMapLayersPanel extends StatelessWidget { final accent = isDark ? Colors.lightBlue[300]! : Theme.of(context).colorScheme.primary; Widget sectionLabel(String text) => Padding( - padding: const EdgeInsets.fromLTRB(16, 12, 16, 8), - child: Text( - text, - style: TextStyle(fontSize: 11, fontWeight: FontWeight.w700, letterSpacing: 0.8, color: subtitleColor), - ), - ); + padding: const EdgeInsets.fromLTRB(16, 12, 16, 8), + child: Text( + text, + style: TextStyle(fontSize: 11, fontWeight: FontWeight.w700, letterSpacing: 0.8, color: subtitleColor), + ), + ); Widget imageTile({ required String label, @@ -122,32 +122,32 @@ class EsriMapLayersPanel extends StatelessWidget { } Widget networkImage(String url) => Image.network( - url, - fit: BoxFit.cover, - errorBuilder: (_, __, ___) => Container(color: isDark ? Colors.grey[700] : Colors.grey[300]), - ); + url, + fit: BoxFit.cover, + errorBuilder: (_, __, ___) => Container(color: isDark ? Colors.grey[700] : Colors.grey[300]), + ); Widget sceneChip(String key, String label, bool selected) => GestureDetector( - onTap: () => onSetSceneMode(key), - child: Container( - padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 7), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(20), - border: selected - ? Border.all(color: accent, width: 2) - : Border.all(color: isDark ? Colors.grey[700]! : Colors.grey[300]!, width: 1), - color: selected ? accent.withValues(alpha: 0.12) : (isDark ? Colors.grey[850] : Colors.grey[100]), - ), - child: Text( - label, - style: TextStyle( - fontSize: 13, - fontWeight: selected ? FontWeight.w700 : FontWeight.w400, - color: selected ? accent : textColor, - ), - ), + onTap: () => onSetSceneMode(key), + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 7), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + border: selected + ? Border.all(color: accent, width: 2) + : Border.all(color: isDark ? Colors.grey[700]! : Colors.grey[300]!, width: 1), + color: selected ? accent.withValues(alpha: 0.12) : (isDark ? Colors.grey[850] : Colors.grey[100]), + ), + child: Text( + label, + style: TextStyle( + fontSize: 13, + fontWeight: selected ? FontWeight.w700 : FontWeight.w400, + color: selected ? accent : textColor, ), - ); + ), + ), + ); final bottomPad = MediaQuery.of(context).padding.bottom; final isDefault = currentSceneKey == 'default'; diff --git a/lib/ui/esrimap/widgets/esrimap_scene.dart b/lib/ui/esrimap/widgets/esrimap_scene.dart index 7088ebdf9..6645288cc 100644 --- a/lib/ui/esrimap/widgets/esrimap_scene.dart +++ b/lib/ui/esrimap/widgets/esrimap_scene.dart @@ -20,12 +20,7 @@ class EsriSceneWidget extends StatefulWidget { final void Function(double heading)? onHeadingChanged; /// Constructs an [EsriSceneWidget] instance. - const EsriSceneWidget({ - super.key, - required this.portalUri, - required this.itemId, - this.onHeadingChanged, - }); + const EsriSceneWidget({super.key, required this.portalUri, required this.itemId, this.onHeadingChanged}); @override State createState() => EsriSceneWidgetState(); From 1ae223c052b5649d82a782d95104a19257e63961 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 17:15:58 -0700 Subject: [PATCH 018/139] mapConfig was a reference, now used as fallback when offline --- .../{ => esri_map_assets}/mapConfig.json | 0 .../services/esrimap_config_service.dart | 29 +++++++++++++++---- pubspec.yaml | 1 + 3 files changed, 24 insertions(+), 6 deletions(-) rename lib/ui/esrimap/{ => esri_map_assets}/mapConfig.json (100%) diff --git a/lib/ui/esrimap/mapConfig.json b/lib/ui/esrimap/esri_map_assets/mapConfig.json similarity index 100% rename from lib/ui/esrimap/mapConfig.json rename to lib/ui/esrimap/esri_map_assets/mapConfig.json diff --git a/lib/ui/esrimap/services/esrimap_config_service.dart b/lib/ui/esrimap/services/esrimap_config_service.dart index 5bec761ed..09b0b4125 100644 --- a/lib/ui/esrimap/services/esrimap_config_service.dart +++ b/lib/ui/esrimap/services/esrimap_config_service.dart @@ -1,11 +1,14 @@ /// ============================================================================ /// File: esrimap_config_service.dart /// Description: Service singleton fetching and caching backend EsriMapConfig -/// JSON data and authentication token endpoints. +/// JSON data and authentication token endpoints, with offline +/// asset bundle fallback logic. /// ============================================================================ import 'dart:convert'; import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_config.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/services.dart' show rootBundle; import 'package:http/http.dart' as http; /// Service managing remote map configuration loading and token URL lookup. @@ -17,6 +20,9 @@ class EsriMapConfigService { /// Base API endpoint URL. static const String BASE_URL = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; + /// Asset bundle path for offline fallback map configuration JSON. + static const String ASSET_FALLBACK_PATH = 'lib/ui/esrimap/esri_map_assets/mapConfig.json'; + EsriMapConfig? _config; Future? _pending; @@ -32,12 +38,23 @@ class EsriMapConfigService { /// Returns backend tokens URL for authentication challenge handlers. String get tokensUrl => '$BASE_URL/tokens'; - /// Performs actual HTTP GET request to fetch remote configuration. + /// Fetches map configuration over network, falling back to local asset bundle if offline or failed. Future _doFetch() async { - final response = await http.get(Uri.parse('$BASE_URL/config')); - final isResNotOk = response.statusCode != 200; - if (isResNotOk) throw Exception('Config fetch failed: ${response.statusCode}'); - _config = EsriMapConfig.fromJson(jsonDecode(response.body) as Map); + // 1. Attempt live HTTP GET request from backend API + try { + final response = await http.get(Uri.parse('$BASE_URL/config')).timeout(const Duration(seconds: 5)); + final isResOk = response.statusCode == 200; + if (isResOk) { + _config = EsriMapConfig.fromJson(jsonDecode(response.body) as Map); + return _config!; + } + } catch (e) { + debugPrint('Remote map config fetch failed ($e), loading local asset fallback...'); + } + + // 2. Offline Fallback: Load configuration JSON from local app asset bundle + final fallbackJson = await rootBundle.loadString(ASSET_FALLBACK_PATH); + _config = EsriMapConfig.fromJson(jsonDecode(fallbackJson) as Map); return _config!; } } diff --git a/pubspec.yaml b/pubspec.yaml index db38fc6dc..a8702e6cf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -68,6 +68,7 @@ flutter: - assets/images/ - assets/images/onboarding/ - assets/images/tgpt/ + - lib/ui/esrimap/esri_map_assets/ - .env fonts: - family: Refrigerator Deluxe From 8dc9a5d0fee402ec1a5ce3637c5889bdc5b4efcf Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 17:20:42 -0700 Subject: [PATCH 019/139] renamed folders --- .../esrimap_ai_search_model.dart | 0 .../esrimap_basemaps.dart | 0 .../esrimap_config.dart | 0 .../esrimap_search_category.dart | 0 .../map_search_result.dart | 0 .../esrimap_auth_handler.dart | 0 .../esrimap_basemap_factory.dart | 4 +- .../esrimap_config_service.dart | 2 +- .../esrimap_route_service.dart | 2 +- .../esrimap_search_service.dart | 2 +- .../esrimap_ai_search_sheet.dart | 2 +- .../esrimap_category_list_panel.dart | 8 ++-- .../esrimap_detail_slide_over.dart | 2 +- .../esrimap_fab.dart | 0 .../esrimap_layers_panel.dart | 4 +- .../esrimap_scene.dart | 0 .../esrimap_search_bar.dart | 4 +- .../esrimap_suggestions_panel.dart | 4 +- lib/ui/esrimap/esrimap.dart | 38 +++++++++---------- 19 files changed, 36 insertions(+), 36 deletions(-) rename lib/ui/esrimap/{models => esri_map_models}/esrimap_ai_search_model.dart (100%) rename lib/ui/esrimap/{models => esri_map_models}/esrimap_basemaps.dart (100%) rename lib/ui/esrimap/{models => esri_map_models}/esrimap_config.dart (100%) rename lib/ui/esrimap/{models => esri_map_models}/esrimap_search_category.dart (100%) rename lib/ui/esrimap/{models => esri_map_models}/map_search_result.dart (100%) rename lib/ui/esrimap/{services => esri_map_services}/esrimap_auth_handler.dart (100%) rename lib/ui/esrimap/{services => esri_map_services}/esrimap_basemap_factory.dart (91%) rename lib/ui/esrimap/{services => esri_map_services}/esrimap_config_service.dart (96%) rename lib/ui/esrimap/{services => esri_map_services}/esrimap_route_service.dart (97%) rename lib/ui/esrimap/{services => esri_map_services}/esrimap_search_service.dart (98%) rename lib/ui/esrimap/{widgets => esri_map_widgets}/esrimap_ai_search_sheet.dart (99%) rename lib/ui/esrimap/{widgets => esri_map_widgets}/esrimap_category_list_panel.dart (95%) rename lib/ui/esrimap/{widgets => esri_map_widgets}/esrimap_detail_slide_over.dart (99%) rename lib/ui/esrimap/{widgets => esri_map_widgets}/esrimap_fab.dart (100%) rename lib/ui/esrimap/{widgets => esri_map_widgets}/esrimap_layers_panel.dart (98%) rename lib/ui/esrimap/{widgets => esri_map_widgets}/esrimap_scene.dart (100%) rename lib/ui/esrimap/{widgets => esri_map_widgets}/esrimap_search_bar.dart (98%) rename lib/ui/esrimap/{widgets => esri_map_widgets}/esrimap_suggestions_panel.dart (97%) diff --git a/lib/ui/esrimap/models/esrimap_ai_search_model.dart b/lib/ui/esrimap/esri_map_models/esrimap_ai_search_model.dart similarity index 100% rename from lib/ui/esrimap/models/esrimap_ai_search_model.dart rename to lib/ui/esrimap/esri_map_models/esrimap_ai_search_model.dart diff --git a/lib/ui/esrimap/models/esrimap_basemaps.dart b/lib/ui/esrimap/esri_map_models/esrimap_basemaps.dart similarity index 100% rename from lib/ui/esrimap/models/esrimap_basemaps.dart rename to lib/ui/esrimap/esri_map_models/esrimap_basemaps.dart diff --git a/lib/ui/esrimap/models/esrimap_config.dart b/lib/ui/esrimap/esri_map_models/esrimap_config.dart similarity index 100% rename from lib/ui/esrimap/models/esrimap_config.dart rename to lib/ui/esrimap/esri_map_models/esrimap_config.dart diff --git a/lib/ui/esrimap/models/esrimap_search_category.dart b/lib/ui/esrimap/esri_map_models/esrimap_search_category.dart similarity index 100% rename from lib/ui/esrimap/models/esrimap_search_category.dart rename to lib/ui/esrimap/esri_map_models/esrimap_search_category.dart diff --git a/lib/ui/esrimap/models/map_search_result.dart b/lib/ui/esrimap/esri_map_models/map_search_result.dart similarity index 100% rename from lib/ui/esrimap/models/map_search_result.dart rename to lib/ui/esrimap/esri_map_models/map_search_result.dart diff --git a/lib/ui/esrimap/services/esrimap_auth_handler.dart b/lib/ui/esrimap/esri_map_services/esrimap_auth_handler.dart similarity index 100% rename from lib/ui/esrimap/services/esrimap_auth_handler.dart rename to lib/ui/esrimap/esri_map_services/esrimap_auth_handler.dart diff --git a/lib/ui/esrimap/services/esrimap_basemap_factory.dart b/lib/ui/esrimap/esri_map_services/esrimap_basemap_factory.dart similarity index 91% rename from lib/ui/esrimap/services/esrimap_basemap_factory.dart rename to lib/ui/esrimap/esri_map_services/esrimap_basemap_factory.dart index e2f7b7501..a8d9ffe8b 100644 --- a/lib/ui/esrimap/services/esrimap_basemap_factory.dart +++ b/lib/ui/esrimap/esri_map_services/esrimap_basemap_factory.dart @@ -5,8 +5,8 @@ /// ============================================================================ import 'package:arcgis_maps/arcgis_maps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_basemaps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_config.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_basemaps.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_config.dart'; /// Constructs an ArcGIS [Basemap] for the requested [type] using configuration settings in [config]. Basemap buildBasemap(BasemapType type, EsriMapConfig config) { diff --git a/lib/ui/esrimap/services/esrimap_config_service.dart b/lib/ui/esrimap/esri_map_services/esrimap_config_service.dart similarity index 96% rename from lib/ui/esrimap/services/esrimap_config_service.dart rename to lib/ui/esrimap/esri_map_services/esrimap_config_service.dart index 09b0b4125..c8eb983bc 100644 --- a/lib/ui/esrimap/services/esrimap_config_service.dart +++ b/lib/ui/esrimap/esri_map_services/esrimap_config_service.dart @@ -6,7 +6,7 @@ /// ============================================================================ import 'dart:convert'; -import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_config.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_config.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart' show rootBundle; import 'package:http/http.dart' as http; diff --git a/lib/ui/esrimap/services/esrimap_route_service.dart b/lib/ui/esrimap/esri_map_services/esrimap_route_service.dart similarity index 97% rename from lib/ui/esrimap/services/esrimap_route_service.dart rename to lib/ui/esrimap/esri_map_services/esrimap_route_service.dart index 222e96a9f..fc6844eab 100644 --- a/lib/ui/esrimap/services/esrimap_route_service.dart +++ b/lib/ui/esrimap/esri_map_services/esrimap_route_service.dart @@ -5,7 +5,7 @@ /// ============================================================================ import 'package:arcgis_maps/arcgis_maps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; import 'package:flutter/material.dart'; /// Result data structure holding the outcome of a solved route calculation. diff --git a/lib/ui/esrimap/services/esrimap_search_service.dart b/lib/ui/esrimap/esri_map_services/esrimap_search_service.dart similarity index 98% rename from lib/ui/esrimap/services/esrimap_search_service.dart rename to lib/ui/esrimap/esri_map_services/esrimap_search_service.dart index d35841f45..b56353ffc 100644 --- a/lib/ui/esrimap/services/esrimap_search_service.dart +++ b/lib/ui/esrimap/esri_map_services/esrimap_search_service.dart @@ -7,7 +7,7 @@ import 'dart:convert'; import 'dart:math' as math; import 'package:arcgis_maps/arcgis_maps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; import 'package:shared_preferences/shared_preferences.dart'; diff --git a/lib/ui/esrimap/widgets/esrimap_ai_search_sheet.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart similarity index 99% rename from lib/ui/esrimap/widgets/esrimap_ai_search_sheet.dart rename to lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart index af5b5f1a4..69976b33b 100644 --- a/lib/ui/esrimap/widgets/esrimap_ai_search_sheet.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart @@ -5,7 +5,7 @@ /// ============================================================================ import 'dart:convert'; -import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_ai_search_model.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_ai_search_model.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; diff --git a/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart similarity index 95% rename from lib/ui/esrimap/widgets/esrimap_category_list_panel.dart rename to lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart index db4c7ccbd..6c65c0768 100644 --- a/lib/ui/esrimap/widgets/esrimap_category_list_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart @@ -4,10 +4,10 @@ /// results for an active category search, sorted by distance. /// ============================================================================ -import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_search_category.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_search_service.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_detail_slide_over.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_search_category.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_services/esrimap_search_service.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart'; import 'package:flutter/material.dart'; /// Bottom sheet widget rendering plotted category search results in a list. diff --git a/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart similarity index 99% rename from lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart rename to lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index 4d9d0cd26..c6138c79b 100644 --- a/lib/ui/esrimap/widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -5,7 +5,7 @@ /// ============================================================================ import 'package:arcgis_maps/arcgis_maps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; import 'package:flutter/material.dart'; /// Persistent header delegate for pinned slide-over bottom sheet headers. diff --git a/lib/ui/esrimap/widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart similarity index 100% rename from lib/ui/esrimap/widgets/esrimap_fab.dart rename to lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart diff --git a/lib/ui/esrimap/widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart similarity index 98% rename from lib/ui/esrimap/widgets/esrimap_layers_panel.dart rename to lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index 9bc153f63..c623deccf 100644 --- a/lib/ui/esrimap/widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -4,8 +4,8 @@ /// Light, Dark, Satellite), toggle operational layers, and switch 3D scenes. /// ============================================================================ -import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_basemaps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_config.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_basemaps.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_config.dart'; import 'package:flutter/material.dart'; /// Bottom sheet widget rendering basemap choices, layer toggles, and 3D scene mode chips. diff --git a/lib/ui/esrimap/widgets/esrimap_scene.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_scene.dart similarity index 100% rename from lib/ui/esrimap/widgets/esrimap_scene.dart rename to lib/ui/esrimap/esri_map_widgets/esrimap_scene.dart diff --git a/lib/ui/esrimap/widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart similarity index 98% rename from lib/ui/esrimap/widgets/esrimap_search_bar.dart rename to lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index b8d0c8f37..5a038a7c7 100644 --- a/lib/ui/esrimap/widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -4,8 +4,8 @@ /// including AI search trigger and dropdown results list. /// ============================================================================ -import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_config.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_config.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; import 'package:flutter/material.dart'; /// Search input bar and route directions header widget. diff --git a/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart similarity index 97% rename from lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart rename to lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart index 624e036f9..cd675d55d 100644 --- a/lib/ui/esrimap/widgets/esrimap_suggestions_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart @@ -4,8 +4,8 @@ /// chips and recent search history items. /// ============================================================================ -import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_search_category.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_search_category.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; import 'package:flutter/material.dart'; /// Suggestions panel widget rendered below the search bar when focused. diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 58300b7eb..cde0a06ba 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -7,29 +7,29 @@ import 'dart:async'; import 'package:arcgis_maps/arcgis_maps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_ai_search_model.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_basemaps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_config.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/esrimap_search_category.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_auth_handler.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_basemap_factory.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_config_service.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_route_service.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/services/esrimap_search_service.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_ai_search_sheet.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_category_list_panel.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_detail_slide_over.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_fab.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_layers_panel.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_scene.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_search_bar.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/widgets/esrimap_suggestions_panel.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_ai_search_model.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_basemaps.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_config.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_search_category.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_services/esrimap_auth_handler.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_services/esrimap_basemap_factory.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_services/esrimap_config_service.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_services/esrimap_route_service.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_services/esrimap_search_service.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_fab.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_scene.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; // Re-export MapSearchResult so callers importing esrimap.dart retain access -export 'package:campus_mobile_experimental/ui/esrimap/models/map_search_result.dart' +export 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart' show MapSearchResult, MapSearchSource; /// Primary StatefulWidget for the interactive Esri Campus Map screen. From 0dc3dee0eeac459a407fff22c73e5f72e010a650 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 17:28:33 -0700 Subject: [PATCH 020/139] moved models to the models folder and services to the services folder --- .../construction-thumbnail.png | Bin .../esri_map_assets/dark-thumbnail.png | Bin .../esri_map_assets/default-thumbnail.png | Bin .../esri_map_assets/districts-thumbnail.png | Bin .../esri_map_assets/light-thumbnail.png | Bin .../esri_map_assets/mapConfig.json | 0 .../esri_map_assets/satellite-thumbnail.png | Bin .../esri_map_assets/shuttles-thumbnail.png | Bin .../esri_map_assets/tgpt-dark.svg | 0 .../esri_map_assets/tgpt-light.svg | 0 .../esrimap_ai_search_model.dart | 0 .../esri_map_models/esrimap_basemaps.dart | 0 .../esri_map_models/esrimap_config.dart | 0 .../esrimap_search_category.dart | 0 .../esri_map_models/map_search_result.dart | 0 .../esrimap_auth_handler.dart | 0 .../esrimap_basemap_factory.dart | 4 ++-- .../esrimap_config_service.dart | 4 ++-- .../esrimap_route_service.dart | 2 +- .../esrimap_search_service.dart | 2 +- .../esrimap_ai_search_sheet.dart | 2 +- .../esrimap_category_list_panel.dart | 6 ++--- .../esrimap_detail_slide_over.dart | 2 +- .../esrimap_layers_panel.dart | 4 ++-- .../esri_map_widgets/esrimap_search_bar.dart | 4 ++-- .../esrimap_suggestions_panel.dart | 4 ++-- lib/ui/esrimap/esrimap.dart | 22 +++++++++--------- pubspec.yaml | 2 +- 28 files changed, 29 insertions(+), 29 deletions(-) rename {lib/ui/esrimap => assets}/esri_map_assets/construction-thumbnail.png (100%) rename {lib/ui/esrimap => assets}/esri_map_assets/dark-thumbnail.png (100%) rename {lib/ui/esrimap => assets}/esri_map_assets/default-thumbnail.png (100%) rename {lib/ui/esrimap => assets}/esri_map_assets/districts-thumbnail.png (100%) rename {lib/ui/esrimap => assets}/esri_map_assets/light-thumbnail.png (100%) rename {lib/ui/esrimap => assets}/esri_map_assets/mapConfig.json (100%) rename {lib/ui/esrimap => assets}/esri_map_assets/satellite-thumbnail.png (100%) rename {lib/ui/esrimap => assets}/esri_map_assets/shuttles-thumbnail.png (100%) rename {lib/ui/esrimap => assets}/esri_map_assets/tgpt-dark.svg (100%) rename {lib/ui/esrimap => assets}/esri_map_assets/tgpt-light.svg (100%) rename lib/{ui/esrimap => core/models}/esri_map_models/esrimap_ai_search_model.dart (100%) rename lib/{ui/esrimap => core/models}/esri_map_models/esrimap_basemaps.dart (100%) rename lib/{ui/esrimap => core/models}/esri_map_models/esrimap_config.dart (100%) rename lib/{ui/esrimap => core/models}/esri_map_models/esrimap_search_category.dart (100%) rename lib/{ui/esrimap => core/models}/esri_map_models/map_search_result.dart (100%) rename lib/{ui/esrimap => core/services}/esri_map_services/esrimap_auth_handler.dart (100%) rename lib/{ui/esrimap => core/services}/esri_map_services/esrimap_basemap_factory.dart (91%) rename lib/{ui/esrimap => core/services}/esri_map_services/esrimap_config_service.dart (92%) rename lib/{ui/esrimap => core/services}/esri_map_services/esrimap_route_service.dart (97%) rename lib/{ui/esrimap => core/services}/esri_map_services/esrimap_search_service.dart (98%) diff --git a/lib/ui/esrimap/esri_map_assets/construction-thumbnail.png b/assets/esri_map_assets/construction-thumbnail.png similarity index 100% rename from lib/ui/esrimap/esri_map_assets/construction-thumbnail.png rename to assets/esri_map_assets/construction-thumbnail.png diff --git a/lib/ui/esrimap/esri_map_assets/dark-thumbnail.png b/assets/esri_map_assets/dark-thumbnail.png similarity index 100% rename from lib/ui/esrimap/esri_map_assets/dark-thumbnail.png rename to assets/esri_map_assets/dark-thumbnail.png diff --git a/lib/ui/esrimap/esri_map_assets/default-thumbnail.png b/assets/esri_map_assets/default-thumbnail.png similarity index 100% rename from lib/ui/esrimap/esri_map_assets/default-thumbnail.png rename to assets/esri_map_assets/default-thumbnail.png diff --git a/lib/ui/esrimap/esri_map_assets/districts-thumbnail.png b/assets/esri_map_assets/districts-thumbnail.png similarity index 100% rename from lib/ui/esrimap/esri_map_assets/districts-thumbnail.png rename to assets/esri_map_assets/districts-thumbnail.png diff --git a/lib/ui/esrimap/esri_map_assets/light-thumbnail.png b/assets/esri_map_assets/light-thumbnail.png similarity index 100% rename from lib/ui/esrimap/esri_map_assets/light-thumbnail.png rename to assets/esri_map_assets/light-thumbnail.png diff --git a/lib/ui/esrimap/esri_map_assets/mapConfig.json b/assets/esri_map_assets/mapConfig.json similarity index 100% rename from lib/ui/esrimap/esri_map_assets/mapConfig.json rename to assets/esri_map_assets/mapConfig.json diff --git a/lib/ui/esrimap/esri_map_assets/satellite-thumbnail.png b/assets/esri_map_assets/satellite-thumbnail.png similarity index 100% rename from lib/ui/esrimap/esri_map_assets/satellite-thumbnail.png rename to assets/esri_map_assets/satellite-thumbnail.png diff --git a/lib/ui/esrimap/esri_map_assets/shuttles-thumbnail.png b/assets/esri_map_assets/shuttles-thumbnail.png similarity index 100% rename from lib/ui/esrimap/esri_map_assets/shuttles-thumbnail.png rename to assets/esri_map_assets/shuttles-thumbnail.png diff --git a/lib/ui/esrimap/esri_map_assets/tgpt-dark.svg b/assets/esri_map_assets/tgpt-dark.svg similarity index 100% rename from lib/ui/esrimap/esri_map_assets/tgpt-dark.svg rename to assets/esri_map_assets/tgpt-dark.svg diff --git a/lib/ui/esrimap/esri_map_assets/tgpt-light.svg b/assets/esri_map_assets/tgpt-light.svg similarity index 100% rename from lib/ui/esrimap/esri_map_assets/tgpt-light.svg rename to assets/esri_map_assets/tgpt-light.svg diff --git a/lib/ui/esrimap/esri_map_models/esrimap_ai_search_model.dart b/lib/core/models/esri_map_models/esrimap_ai_search_model.dart similarity index 100% rename from lib/ui/esrimap/esri_map_models/esrimap_ai_search_model.dart rename to lib/core/models/esri_map_models/esrimap_ai_search_model.dart diff --git a/lib/ui/esrimap/esri_map_models/esrimap_basemaps.dart b/lib/core/models/esri_map_models/esrimap_basemaps.dart similarity index 100% rename from lib/ui/esrimap/esri_map_models/esrimap_basemaps.dart rename to lib/core/models/esri_map_models/esrimap_basemaps.dart diff --git a/lib/ui/esrimap/esri_map_models/esrimap_config.dart b/lib/core/models/esri_map_models/esrimap_config.dart similarity index 100% rename from lib/ui/esrimap/esri_map_models/esrimap_config.dart rename to lib/core/models/esri_map_models/esrimap_config.dart diff --git a/lib/ui/esrimap/esri_map_models/esrimap_search_category.dart b/lib/core/models/esri_map_models/esrimap_search_category.dart similarity index 100% rename from lib/ui/esrimap/esri_map_models/esrimap_search_category.dart rename to lib/core/models/esri_map_models/esrimap_search_category.dart diff --git a/lib/ui/esrimap/esri_map_models/map_search_result.dart b/lib/core/models/esri_map_models/map_search_result.dart similarity index 100% rename from lib/ui/esrimap/esri_map_models/map_search_result.dart rename to lib/core/models/esri_map_models/map_search_result.dart diff --git a/lib/ui/esrimap/esri_map_services/esrimap_auth_handler.dart b/lib/core/services/esri_map_services/esrimap_auth_handler.dart similarity index 100% rename from lib/ui/esrimap/esri_map_services/esrimap_auth_handler.dart rename to lib/core/services/esri_map_services/esrimap_auth_handler.dart diff --git a/lib/ui/esrimap/esri_map_services/esrimap_basemap_factory.dart b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart similarity index 91% rename from lib/ui/esrimap/esri_map_services/esrimap_basemap_factory.dart rename to lib/core/services/esri_map_services/esrimap_basemap_factory.dart index a8d9ffe8b..fed9cff63 100644 --- a/lib/ui/esrimap/esri_map_services/esrimap_basemap_factory.dart +++ b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart @@ -5,8 +5,8 @@ /// ============================================================================ import 'package:arcgis_maps/arcgis_maps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_basemaps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_config.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_basemaps.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; /// Constructs an ArcGIS [Basemap] for the requested [type] using configuration settings in [config]. Basemap buildBasemap(BasemapType type, EsriMapConfig config) { diff --git a/lib/ui/esrimap/esri_map_services/esrimap_config_service.dart b/lib/core/services/esri_map_services/esrimap_config_service.dart similarity index 92% rename from lib/ui/esrimap/esri_map_services/esrimap_config_service.dart rename to lib/core/services/esri_map_services/esrimap_config_service.dart index c8eb983bc..f45907ad5 100644 --- a/lib/ui/esrimap/esri_map_services/esrimap_config_service.dart +++ b/lib/core/services/esri_map_services/esrimap_config_service.dart @@ -6,7 +6,7 @@ /// ============================================================================ import 'dart:convert'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_config.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart' show rootBundle; import 'package:http/http.dart' as http; @@ -21,7 +21,7 @@ class EsriMapConfigService { static const String BASE_URL = 'https://appzxi70zi.execute-api.us-west-2.amazonaws.com/test/ArcGIS-Map'; /// Asset bundle path for offline fallback map configuration JSON. - static const String ASSET_FALLBACK_PATH = 'lib/ui/esrimap/esri_map_assets/mapConfig.json'; + static const String ASSET_FALLBACK_PATH = 'assets/esri_map_assets/mapConfig.json'; EsriMapConfig? _config; Future? _pending; diff --git a/lib/ui/esrimap/esri_map_services/esrimap_route_service.dart b/lib/core/services/esri_map_services/esrimap_route_service.dart similarity index 97% rename from lib/ui/esrimap/esri_map_services/esrimap_route_service.dart rename to lib/core/services/esri_map_services/esrimap_route_service.dart index fc6844eab..9d462d4e8 100644 --- a/lib/ui/esrimap/esri_map_services/esrimap_route_service.dart +++ b/lib/core/services/esri_map_services/esrimap_route_service.dart @@ -5,7 +5,7 @@ /// ============================================================================ import 'package:arcgis_maps/arcgis_maps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; import 'package:flutter/material.dart'; /// Result data structure holding the outcome of a solved route calculation. diff --git a/lib/ui/esrimap/esri_map_services/esrimap_search_service.dart b/lib/core/services/esri_map_services/esrimap_search_service.dart similarity index 98% rename from lib/ui/esrimap/esri_map_services/esrimap_search_service.dart rename to lib/core/services/esri_map_services/esrimap_search_service.dart index b56353ffc..7679ee3ea 100644 --- a/lib/ui/esrimap/esri_map_services/esrimap_search_service.dart +++ b/lib/core/services/esri_map_services/esrimap_search_service.dart @@ -7,7 +7,7 @@ import 'dart:convert'; import 'dart:math' as math; import 'package:arcgis_maps/arcgis_maps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; import 'package:shared_preferences/shared_preferences.dart'; diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart index 69976b33b..31f0f63b9 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart @@ -5,7 +5,7 @@ /// ============================================================================ import 'dart:convert'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_ai_search_model.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_ai_search_model.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart index 6c65c0768..0ee5b3018 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart @@ -4,9 +4,9 @@ /// results for an active category search, sorted by distance. /// ============================================================================ -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_search_category.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_services/esrimap_search_service.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_search_category.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_search_service.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart'; import 'package:flutter/material.dart'; diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index c6138c79b..7e6d64415 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -5,7 +5,7 @@ /// ============================================================================ import 'package:arcgis_maps/arcgis_maps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; import 'package:flutter/material.dart'; /// Persistent header delegate for pinned slide-over bottom sheet headers. diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index c623deccf..9674e80a7 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -4,8 +4,8 @@ /// Light, Dark, Satellite), toggle operational layers, and switch 3D scenes. /// ============================================================================ -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_basemaps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_config.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_basemaps.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; import 'package:flutter/material.dart'; /// Bottom sheet widget rendering basemap choices, layer toggles, and 3D scene mode chips. diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index 5a038a7c7..cc02c3107 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -4,8 +4,8 @@ /// including AI search trigger and dropdown results list. /// ============================================================================ -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_config.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; import 'package:flutter/material.dart'; /// Search input bar and route directions header widget. diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart index cd675d55d..8df5e946a 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart @@ -4,8 +4,8 @@ /// chips and recent search history items. /// ============================================================================ -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_search_category.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_search_category.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; import 'package:flutter/material.dart'; /// Suggestions panel widget rendered below the search bar when focused. diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index cde0a06ba..6477a37c3 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -7,16 +7,16 @@ import 'dart:async'; import 'package:arcgis_maps/arcgis_maps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_ai_search_model.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_basemaps.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_config.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/esrimap_search_category.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_services/esrimap_auth_handler.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_services/esrimap_basemap_factory.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_services/esrimap_config_service.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_services/esrimap_route_service.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_services/esrimap_search_service.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_ai_search_model.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_basemaps.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_search_category.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_auth_handler.dart'; +import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_basemap_factory.dart'; +import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_config_service.dart'; +import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_route_service.dart'; +import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_search_service.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart'; @@ -29,7 +29,7 @@ import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; // Re-export MapSearchResult so callers importing esrimap.dart retain access -export 'package:campus_mobile_experimental/ui/esrimap/esri_map_models/map_search_result.dart' +export 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart' show MapSearchResult, MapSearchSource; /// Primary StatefulWidget for the interactive Esri Campus Map screen. diff --git a/pubspec.yaml b/pubspec.yaml index a8702e6cf..551196282 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -68,7 +68,7 @@ flutter: - assets/images/ - assets/images/onboarding/ - assets/images/tgpt/ - - lib/ui/esrimap/esri_map_assets/ + - assets/esri_map_assets/ - .env fonts: - family: Refrigerator Deluxe From 084536d7ccef1a0c10bcd899b8563aa5e1fa5952 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 17:36:03 -0700 Subject: [PATCH 021/139] fixed podfile --- ios/Podfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/ios/Podfile b/ios/Podfile index 9a169d8cb..2f2e75766 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -31,9 +31,6 @@ target 'Runner' do use_frameworks! use_modular_headers! - pod 'Runtimecore', :podspec => '../arcgis_maps_core/ios/Runtimecore.podspec' - pod 'arcgis_maps_ffi', :podspec => '../arcgis_maps_core/ios/arcgis_maps_ffi.podspec' - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end From 32872aad65b6e79b5a156509c59722cf19f0f52b Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 27 Jul 2026 17:57:24 -0700 Subject: [PATCH 022/139] hid dark and light maps, 3d view and drone view --- lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index 9674e80a7..7867eeca7 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -151,7 +151,8 @@ class EsriMapLayersPanel extends StatelessWidget { final bottomPad = MediaQuery.of(context).padding.bottom; final isDefault = currentSceneKey == 'default'; - final showSceneSwitcher = config.features.scenes && !hideSceneSwitcher; + // Hide scenes entirely from the UI. SET to TRUE when ready to show drone view and 3D view to the user. + final showSceneSwitcher = false; // config.features.scenes && !hideSceneSwitcher; return Positioned( left: 12, @@ -205,7 +206,10 @@ class EsriMapLayersPanel extends StatelessWidget { child: Row( children: [ for (final entry in config.basemaps.entries) ...[ - if (basemapTypeFromKey(entry.key) != null) ...[ + // Preventing Light and Dark Basemaps from rendering. Uncomment when ready to use. + if (basemapTypeFromKey(entry.key) != null && + basemapTypeFromKey(entry.key) != BasemapType.light && + basemapTypeFromKey(entry.key) != BasemapType.dark) ...[ imageTile( label: entry.value.label, selected: currentBasemapType == basemapTypeFromKey(entry.key), From 22691cad2222427402472b7c9fd5e21db0a06431 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 28 Jul 2026 08:30:26 -0700 Subject: [PATCH 023/139] instead of commenting out and deleting code, we simply prevented dart from including it in its component tree, so we don't waste compute power computing the drone view and all those other extra features and we keep performance high. This is possible thanks to lib/core/utils/feature_flags.dart --- lib/core/utils/feature_flags.dart | 23 +++++++++++++++++++ .../esrimap_layers_panel.dart | 11 +++++---- lib/ui/esrimap/esrimap.dart | 4 ++++ 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 lib/core/utils/feature_flags.dart diff --git a/lib/core/utils/feature_flags.dart b/lib/core/utils/feature_flags.dart new file mode 100644 index 000000000..1f0695d85 --- /dev/null +++ b/lib/core/utils/feature_flags.dart @@ -0,0 +1,23 @@ +/// ============================================================================ +/// File: feature_flags.dart +/// Description: Centralized configuration for enabling/disabling app features +/// using static boolean variables. Because these are static const, +/// the Dart compiler will optimize away (tree-shake) dead code +/// when features are disabled, saving compute and memory resources. +/// ============================================================================ + +/// Note: Since these are static variables, you need to rebuild the app after changing the value to see working changes. +class FeatureFlags { + /// Controls the availability of alternative basemaps like "Light" and "Dark". + /// - `true`: The UI will display buttons for these basemaps, and the map controller + /// will instantiate and pre-load them into memory. + /// - `false`: The UI buttons will be hidden, and the map controller will skip + /// creating these objects, saving significant memory. + static const bool mapAlternateBasemapsEnabled = false; + + /// Controls the availability of 3D Scene views (e.g., Drone View, 3D Building). + /// - `true`: The UI will render the "SCENE" toggle chips. + /// - `false`: The scene toggles will be hidden from the user, saving compute time + /// associated with rendering and managing scene UI states. + static const bool mapScenesEnabled = false; +} diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index 7867eeca7..71b0ac699 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -6,6 +6,7 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_basemaps.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; +import 'package:campus_mobile_experimental/core/utils/feature_flags.dart'; import 'package:flutter/material.dart'; /// Bottom sheet widget rendering basemap choices, layer toggles, and 3D scene mode chips. @@ -151,8 +152,8 @@ class EsriMapLayersPanel extends StatelessWidget { final bottomPad = MediaQuery.of(context).padding.bottom; final isDefault = currentSceneKey == 'default'; - // Hide scenes entirely from the UI. SET to TRUE when ready to show drone view and 3D view to the user. - final showSceneSwitcher = false; // config.features.scenes && !hideSceneSwitcher; + // Hide SCENES entirely from the UI. SET to TRUE when ready to show drone view and 3D view to the user. + final showSceneSwitcher = FeatureFlags.mapScenesEnabled && config.features.scenes && !hideSceneSwitcher; return Positioned( left: 12, @@ -206,10 +207,10 @@ class EsriMapLayersPanel extends StatelessWidget { child: Row( children: [ for (final entry in config.basemaps.entries) ...[ - // Preventing Light and Dark Basemaps from rendering. Uncomment when ready to use. if (basemapTypeFromKey(entry.key) != null && - basemapTypeFromKey(entry.key) != BasemapType.light && - basemapTypeFromKey(entry.key) != BasemapType.dark) ...[ + (FeatureFlags.mapAlternateBasemapsEnabled || + (basemapTypeFromKey(entry.key) != BasemapType.light && + basemapTypeFromKey(entry.key) != BasemapType.dark))) ...[ imageTile( label: entry.value.label, selected: currentBasemapType == basemapTypeFromKey(entry.key), diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 6477a37c3..1b0f82685 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -17,6 +17,7 @@ import 'package:campus_mobile_experimental/core/services/esri_map_services/esrim import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_config_service.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_route_service.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_search_service.dart'; +import 'package:campus_mobile_experimental/core/utils/feature_flags.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart'; @@ -173,6 +174,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Constructs initial basemaps and sets initial campus viewpoint. void _initMap(EsriMapConfig config) { for (final type in BasemapType.values) { + if (!FeatureFlags.mapAlternateBasemapsEnabled && (type == BasemapType.light || type == BasemapType.dark)) { + continue; + } _basemaps[type] = buildBasemap(type, config); } From 5a0f6a67b120c122440abf2d5279a0865aa0ae57 Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Tue, 28 Jul 2026 15:31:58 +0000 Subject: [PATCH 024/139] style: auto fix formatting violations --- lib/ui/esrimap/esrimap.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 1b0f82685..2ca0794cf 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -174,9 +174,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Constructs initial basemaps and sets initial campus viewpoint. void _initMap(EsriMapConfig config) { for (final type in BasemapType.values) { - if (!FeatureFlags.mapAlternateBasemapsEnabled && (type == BasemapType.light || type == BasemapType.dark)) { + if (!FeatureFlags.mapAlternateBasemapsEnabled && (type == BasemapType.light || type == BasemapType.dark)) continue; - } _basemaps[type] = buildBasemap(type, config); } From 690f83a853947af19b3c3ab1d75f4ec36df04dca Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 28 Jul 2026 09:41:44 -0700 Subject: [PATCH 025/139] Implemented esri_map_feature_flags.dart which makes it easy to toggle on/off esri features so the campus app doesn't waste computing power to render things we won't use --- lib/core/utils/esri_map_feature_flags.dart | 73 +++++++++++++++++++ lib/core/utils/feature_flags.dart | 23 ------ .../esrimap_detail_slide_over.dart | 32 ++++---- .../esrimap_layers_panel.dart | 57 +++++++++------ .../esri_map_widgets/esrimap_search_bar.dart | 9 ++- lib/ui/esrimap/esrimap.dart | 6 +- 6 files changed, 137 insertions(+), 63 deletions(-) create mode 100644 lib/core/utils/esri_map_feature_flags.dart delete mode 100644 lib/core/utils/feature_flags.dart diff --git a/lib/core/utils/esri_map_feature_flags.dart b/lib/core/utils/esri_map_feature_flags.dart new file mode 100644 index 000000000..8055bbd25 --- /dev/null +++ b/lib/core/utils/esri_map_feature_flags.dart @@ -0,0 +1,73 @@ +/// ============================================================================ +/// File: feature_flags.dart +/// Description: Centralized configuration for enabling/disabling app features +/// using static boolean variables. Because these are static const, +/// the Dart compiler will optimize away (tree-shake) dead code +/// when features are disabled, saving compute and memory resources. +/// ============================================================================ + +class FeatureFlags { + // --------------------------------------------------------------------------- + // Search & Navigation + // --------------------------------------------------------------------------- + + /// Controls the availability of the core Search Bar. + /// - `true`: The top search bar is rendered, allowing text search for buildings and places. + /// - `false`: The search bar is completely hidden. (Note: this effectively disables AI search and category chips too). + static const bool mapSearchEnabled = true; + + /// Controls the availability of the AI Search feature. + /// - `true`: Renders the AI search trigger button inside the search bar. + /// - `false`: Hides the AI search button and prevents instantiation of AI-related models. + static const bool mapAiSearchEnabled = false; // No AI search for now. + + /// Controls the quick-filter category chips (Dining, Library, Parking, Recreation). + /// - `true`: Displays the quick-filter chips when the search bar is active. + /// - `false`: Hides the chips, saving UI rendering time. + static const bool mapSearchCategoriesEnabled = true; + + /// Controls point-to-point routing and directions. + /// - `true`: Enables route calculation and displays "Directions" buttons in POI details. + /// - `false`: Disables route generation logic and hides related UI elements. + static const bool mapRoutingEnabled = true; + + /// Controls device GPS location tracking. + /// - `true`: Starts the location data source to query GPS hardware and shows the re-center FAB. + /// - `false`: Prevents querying GPS hardware (saving battery) and hides location UI controls. + static const bool mapLocationTrackingEnabled = true; + + // --------------------------------------------------------------------------- + // Basemaps & Layers (inside the Map Display) + // --------------------------------------------------------------------------- + + /// Controls the availability of alternative basemaps like "Light" and "Dark". + /// - `true`: The UI will display buttons for these basemaps, and the map controller + /// will instantiate and pre-load them into memory. + /// - `false`: The UI buttons will be hidden, and the map controller will skip + /// creating these objects, saving significant memory. + static const bool mapAlternateBasemapsEnabled = false; // No Light and Dark basemaps for now. + + /// Master switch for all Operational Layers (Transit, Districts, Construction). + /// - `true`: Renders the "LAYERS" section in the map settings panel. + /// - `false`: Hides the entire "LAYERS" section and prevents layer preloading. + static const bool mapOperationalLayersEnabled = true; + + // Fine-grained layer toggles (Only effective if mapOperationalLayersEnabled is true) + static const bool transitOperationalLayerEnabled = true; + static const bool districtsOperationalLayerEnabled = true; + static const bool constructionOperationalLayerEnabled = true; + + // --------------------------------------------------------------------------- + // SCENES Feature (inside the Map Display) + // --------------------------------------------------------------------------- + + /// Master switch for the 3D Scene View toggles. + /// - `true`: Renders the "SCENE" section in the map settings panel. + /// - `false`: Hides the entire "SCENE" section. + static const bool mapScenesEnabled = false; + + // Fine-grained scene toggles (Only effective if mapScenesEnabled is true) + static const bool defaultSceneEnabled = false; + static const bool threeDimensionalSceneEnabled = false; + static const bool droneViewSceneEnabled = false; +} diff --git a/lib/core/utils/feature_flags.dart b/lib/core/utils/feature_flags.dart deleted file mode 100644 index 1f0695d85..000000000 --- a/lib/core/utils/feature_flags.dart +++ /dev/null @@ -1,23 +0,0 @@ -/// ============================================================================ -/// File: feature_flags.dart -/// Description: Centralized configuration for enabling/disabling app features -/// using static boolean variables. Because these are static const, -/// the Dart compiler will optimize away (tree-shake) dead code -/// when features are disabled, saving compute and memory resources. -/// ============================================================================ - -/// Note: Since these are static variables, you need to rebuild the app after changing the value to see working changes. -class FeatureFlags { - /// Controls the availability of alternative basemaps like "Light" and "Dark". - /// - `true`: The UI will display buttons for these basemaps, and the map controller - /// will instantiate and pre-load them into memory. - /// - `false`: The UI buttons will be hidden, and the map controller will skip - /// creating these objects, saving significant memory. - static const bool mapAlternateBasemapsEnabled = false; - - /// Controls the availability of 3D Scene views (e.g., Drone View, 3D Building). - /// - `true`: The UI will render the "SCENE" toggle chips. - /// - `false`: The scene toggles will be hidden from the user, saving compute time - /// associated with rendering and managing scene UI states. - static const bool mapScenesEnabled = false; -} diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index 7e6d64415..b271ed7f0 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -6,6 +6,7 @@ import 'package:arcgis_maps/arcgis_maps.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/core/utils/esri_map_feature_flags.dart'; import 'package:flutter/material.dart'; /// Persistent header delegate for pinned slide-over bottom sheet headers. @@ -402,23 +403,24 @@ class EsriMapDetailSlideOver extends StatelessWidget { ), const SizedBox(width: 12), ], - Expanded( - child: FilledButton.icon( - onPressed: isRoutingMode ? null : () => onGetDirections(result), - icon: isRoutingMode - ? const SizedBox( - width: 18, - height: 18, - child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white), - ) - : const Icon(Icons.directions, size: 18), - label: Text(isRoutingMode ? 'Routing...' : 'Get Directions'), - style: FilledButton.styleFrom( - padding: const EdgeInsets.symmetric(vertical: 12), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + if (FeatureFlags.mapRoutingEnabled) + Expanded( + child: FilledButton.icon( + onPressed: isRoutingMode ? null : () => onGetDirections(result), + icon: isRoutingMode + ? const SizedBox( + width: 18, + height: 18, + child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white), + ) + : const Icon(Icons.directions, size: 18), + label: Text(isRoutingMode ? 'Routing...' : 'Get Directions'), + style: FilledButton.styleFrom( + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ), ), ), - ), ], ), ], diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index 71b0ac699..f661d3c23 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -6,7 +6,7 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_basemaps.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; -import 'package:campus_mobile_experimental/core/utils/feature_flags.dart'; +import 'package:campus_mobile_experimental/core/utils/esri_map_feature_flags.dart'; import 'package:flutter/material.dart'; /// Bottom sheet widget rendering basemap choices, layer toggles, and 3D scene mode chips. @@ -229,29 +229,40 @@ class EsriMapLayersPanel extends StatelessWidget { ), ), - const Divider(height: 24, indent: 16, endIndent: 16), + if (FeatureFlags.mapOperationalLayersEnabled) ...[ + const Divider(height: 24, indent: 16, endIndent: 16), - sectionLabel('LAYERS'), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 12), - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - for (final entry in config.layers.entries) ...[ - imageTile( - label: entry.value.label, - selected: layerVisible[entry.key] ?? false, - loading: layerLoading[entry.key] ?? false, - onTap: () => onToggleLayer(entry.key), - imageWidget: networkImage(entry.value.thumbnailAsset), - ), - const SizedBox(width: 8), + sectionLabel('LAYERS'), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 12), + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + for (final entry in config.layers.entries) ...[ + if ((entry.key == 'tritonTransit' && FeatureFlags.transitOperationalLayerEnabled) || + (entry.key == 'campusDistricts' && + FeatureFlags.districtsOperationalLayerEnabled) || + (entry.key == 'construction' && + FeatureFlags.constructionOperationalLayerEnabled) || + (entry.key != 'tritonTransit' && + entry.key != 'campusDistricts' && + entry.key != 'construction')) ...[ + imageTile( + label: entry.value.label, + selected: layerVisible[entry.key] ?? false, + loading: layerLoading[entry.key] ?? false, + onTap: () => onToggleLayer(entry.key), + imageWidget: networkImage(entry.value.thumbnailAsset), + ), + const SizedBox(width: 8), + ], + ], ], - ], + ), ), ), - ), + ], ], ), ), @@ -267,7 +278,11 @@ class EsriMapLayersPanel extends StatelessWidget { spacing: 8, children: [ for (final entry in config.scenes.entries) - sceneChip(entry.key, entry.value.label, currentSceneKey == entry.key), + if ((entry.key == 'default' && FeatureFlags.defaultSceneEnabled) || + (entry.key == 'building3d' && FeatureFlags.threeDimensionalSceneEnabled) || + (entry.key == 'droneView' && FeatureFlags.droneViewSceneEnabled) || + (entry.key != 'default' && entry.key != 'building3d' && entry.key != 'droneView')) + sceneChip(entry.key, entry.value.label, currentSceneKey == entry.key), ], ), ), diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index cc02c3107..006727f06 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -6,6 +6,7 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/core/utils/esri_map_feature_flags.dart'; import 'package:flutter/material.dart'; /// Search input bar and route directions header widget. @@ -142,7 +143,11 @@ class EsriMapSearchBar extends StatelessWidget { final shouldShowResultsDivider = showResults && hasSearchResults; final isSearchNotEmpty = searchController.text.isNotEmpty; - final hasClassMatches = matchingPoiClasses.isNotEmpty && isSearchNotEmpty && !showSuggestions; + final hasClassMatches = + FeatureFlags.mapSearchCategoriesEnabled && + matchingPoiClasses.isNotEmpty && + isSearchNotEmpty && + !showSuggestions; final shouldShowDropdown = showResults || hasClassMatches; return Column( @@ -304,7 +309,7 @@ class EsriMapSearchBar extends StatelessWidget { ), ), if (isSearchNotEmpty) IconButton(icon: const Icon(Icons.clear), onPressed: onClearSearch), - if (config?.features.aiSearch ?? false) + if (FeatureFlags.mapAiSearchEnabled && (config?.features.aiSearch ?? false)) IconButton( icon: Icon( Icons.auto_awesome, diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 1b0f82685..36c4213ae 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -17,7 +17,7 @@ import 'package:campus_mobile_experimental/core/services/esri_map_services/esrim import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_config_service.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_route_service.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_search_service.dart'; -import 'package:campus_mobile_experimental/core/utils/feature_flags.dart'; +import 'package:campus_mobile_experimental/core/utils/esri_map_feature_flags.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart'; @@ -254,6 +254,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Starts the device location data source. Future _startLocationDisplay() async { + if (!FeatureFlags.mapLocationTrackingEnabled) return; try { await _locationDataSource.start(); setState(() => _locationStarted = true); @@ -985,6 +986,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // --------------------------------------------------------------------------- Future _solveRoute(MapSearchResult destination, {String? travelMode, (double, double)? originLatLng}) async { + if (!FeatureFlags.mapRoutingEnabled) return; final userLatLng = originLatLng ?? _getUserLatLng(); final isUserLatLngNull = userLatLng == null; if (isUserLatLngNull) { @@ -1306,7 +1308,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), // Floating top search bar & suggestion panel - if (isDefaultScene) + if (FeatureFlags.mapSearchEnabled && isDefaultScene) Positioned( top: 8, left: 12, From f4ec8aa0a4945338213ffe6cccaf087c44fae196 Mon Sep 17 00:00:00 2001 From: Albert Hoang Date: Tue, 28 Jul 2026 11:03:00 -0700 Subject: [PATCH 026/139] added pod file dependacy --- ios/Podfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios/Podfile b/ios/Podfile index 2f2e75766..9a169d8cb 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -31,6 +31,9 @@ target 'Runner' do use_frameworks! use_modular_headers! + pod 'Runtimecore', :podspec => '../arcgis_maps_core/ios/Runtimecore.podspec' + pod 'arcgis_maps_ffi', :podspec => '../arcgis_maps_core/ios/arcgis_maps_ffi.podspec' + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end From b4e4ebf5423ec8b01d76d72690a3ffeca9588519 Mon Sep 17 00:00:00 2001 From: Albert Hoang Date: Tue, 28 Jul 2026 11:10:07 -0700 Subject: [PATCH 027/139] removed arm64 exclusion --- ios/Podfile | 3 --- ios/Podfile.lock | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ios/Podfile b/ios/Podfile index 9a169d8cb..824c74203 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -38,9 +38,6 @@ target 'Runner' do end post_install do |installer| - installer.pods_project.build_configurations.each do |config| - config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" - end installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| diff --git a/ios/Podfile.lock b/ios/Podfile.lock index a169324e7..047c677b3 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -341,6 +341,6 @@ SPEC CHECKSUMS: webview_flutter_wkwebview: 1821ceac936eba6f7984d89a9f3bcb4dea99ebb2 wifi_connection: a73e16eb2fe4e40ca32a6d69c8609130603bb62d -PODFILE CHECKSUM: 4e3590781c99d3a40e117ed93fcb8810d0ccf558 +PODFILE CHECKSUM: 03cc2d23c3ca6131fd8d358db49c2a3ac5543659 COCOAPODS: 1.16.2 From de445ca210094d879125ca5649712b1a86c0ca4b Mon Sep 17 00:00:00 2001 From: Albert Hoang Date: Tue, 28 Jul 2026 12:20:19 -0700 Subject: [PATCH 028/139] location recenter button fixes --- ios/Runner.xcodeproj/project.pbxproj | 2 +- lib/ui/esrimap/esrimap.dart | 43 +++++++++++++++------------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index bbb7cc892..bbc4687c7 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -242,7 +242,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\"${BUILD_DIR%Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run\"\n"; + shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\"${PODS_ROOT}/FirebaseCrashlytics/run\"\n"; }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 22efa4363..e240e3325 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -27,6 +27,7 @@ import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_s import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart'; import 'package:flutter/material.dart'; +import 'package:geolocator/geolocator.dart'; import 'package:url_launcher/url_launcher.dart'; // Re-export MapSearchResult so callers importing esrimap.dart retain access @@ -67,7 +68,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // --------------------------------------------------------------------------- EsriMapConfig? _config; final _locationDataSource = SystemLocationDataSource(); - bool _locationStarted = false; // Search State List _searchResults = []; @@ -256,7 +256,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (!FeatureFlags.mapLocationTrackingEnabled) return; try { await _locationDataSource.start(); - setState(() => _locationStarted = true); } on ArcGISException catch (e) { debugPrint('Location error: ${e.message}'); } catch (e) { @@ -822,25 +821,29 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } - void _recenterOnUser() { - final isLocationNotStarted = !_locationStarted; - if (isLocationNotStarted) { - _startLocationDisplay(); - return; - } - final loc = _mapViewController.locationDisplay.location; - final isLocationNull = loc == null; - if (isLocationNull) return; + Future _recenterOnUser() async { + try { + final location = await Geolocator.getCurrentPosition( + locationSettings: const LocationSettings(timeLimit: Duration(seconds: 10)), + ); + if (!mounted) return; - _mapViewController.locationDisplay.autoPanMode = LocationDisplayAutoPanMode.recenter; - _ignoreViewpointReset = true; - setState(() => _isLocationActive = true); - Future.delayed(const Duration(milliseconds: 1500), () { - if (mounted) { - _ignoreViewpointReset = false; - _mapViewController.locationDisplay.autoPanMode = LocationDisplayAutoPanMode.off; - } - }); + _ignoreViewpointReset = true; + setState(() => _isLocationActive = true); + _mapViewController.setViewpointAnimated( + Viewpoint.fromCenter( + ArcGISPoint(x: location.longitude, y: location.latitude, spatialReference: SpatialReference.wgs84), + scale: 10000, + ), + ); + Future.delayed(const Duration(milliseconds: 1500), () { + if (mounted) _ignoreViewpointReset = false; + }); + } catch (e) { + debugPrint('Location error: $e'); + if (!mounted) return; + ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + } } void _recenterOnView() { From a90cc976131c6c6fe52a31546133e0290a334067 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 28 Jul 2026 17:02:52 -0700 Subject: [PATCH 029/139] Transit layer works now --- lib/ui/esrimap/esrimap.dart | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 22efa4363..75be68abf 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -363,7 +363,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } setState(() => _layerLoading[key] = true); - final instances = _buildLayerInstances(entry); + final instances = await _buildLayerInstances(entry); _layerInstances[key] = instances; for (final layer in instances) { @@ -386,7 +386,31 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); } - List _buildLayerInstances(LayerEntry entry) { + Future> _buildLayerInstances(LayerEntry entry) async { + if (entry.source == 'portalItem' && entry.portalKey != null && entry.itemId != null) { + final portalUrl = _config?.portals[entry.portalKey!]; + if (portalUrl != null) { + final portalItem = PortalItem.withPortalAndItemId( + portal: Portal(Uri.parse(portalUrl)), + itemId: entry.itemId!, + ); + try { + await portalItem.load(); + if (portalItem.type == PortalItemType.webMap) { + final tempMap = ArcGISMap.withItem(portalItem); + await tempMap.load(); + final layers = tempMap.operationalLayers.toList(); + tempMap.operationalLayers.clear(); // Un-own the layers so they can be added to the main map + return layers; + } else { + return [FeatureLayer.withItem(item: portalItem, layerId: 0)]; + } + } catch (e) { + debugPrint('Portal item load error: $e'); + } + } + } + if (entry.hasSublayers) return entry.sublayers!.map(_layerFromSublayer).toList(); return [_layerFromEntry(entry)]; } From 9e6a6fbf0857f861119844fe70e93f4467c7e130 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 28 Jul 2026 17:53:32 -0700 Subject: [PATCH 030/139] optimized the map display for performance --- lib/ui/esrimap/esrimap.dart | 64 +++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 14 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 75be68abf..40b8f11e7 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -205,6 +205,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _startLocationDisplay(); _preloadAlternateBasemaps(); + _preloadHeavyLayers(); // Track map heading rotation changes _viewpointChangedSubscription = _mapViewController.onViewpointChanged.listen((_) { @@ -223,6 +224,30 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); } + /// Silently preloads computationally expensive operational layers (e.g. portalItem Web Maps) + /// in the background to ensure instantaneous layer toggling later. + void _preloadHeavyLayers() async { + if (_config == null) return; + for (final entry in _config!.layers.entries) { + if (entry.value.source == 'portalItem' && !_layerInstances.containsKey(entry.key)) { + final instances = await _buildLayerInstances(entry.value); + _layerInstances[entry.key] = instances; + for (final layer in instances) { + if (layer != null) { + layer.isVisible = false; + _map.operationalLayers.add(layer); + } + } + try { + await Future.wait(instances.whereType().map((l) => l.load())); + _applyLayerSpecialCases(entry.key, instances); + } catch (e) { + debugPrint('Preload layer error: $e'); + } + } + } + } + /// Sets authentication manager challenge handler for Enterprise token retrieval. void _setupAgeAuthChallengeHandler() { ArcGISEnvironment.authenticationManager.arcGISAuthenticationChallengeHandler = AgeAuthChallengeHandler( @@ -353,29 +378,40 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (isAlreadyVisible) { _layerTimers[key]?.cancel(); _layerTimers.remove(key); + + // Hide layers instead of destroying them to cache their loaded state for (final layer in _layerInstances[key] ?? []) { - final isLayerNotNull = layer != null; - if (isLayerNotNull) _map.operationalLayers.remove(layer); + if (layer != null) layer.isVisible = false; } - _layerInstances.remove(key); + setState(() => _layerVisible[key] = false); return; } setState(() => _layerLoading[key] = true); - final instances = await _buildLayerInstances(entry); - _layerInstances[key] = instances; - for (final layer in instances) { - final isLayerNotNull = layer != null; - if (isLayerNotNull) _map.operationalLayers.add(layer); - } + // Retrieve cached layers, or build them if they don't exist yet + List instances = _layerInstances[key] ?? []; + + if (instances.isEmpty) { + instances = await _buildLayerInstances(entry); + _layerInstances[key] = instances; - try { - await Future.wait(instances.whereType().map((l) => l.load())); - _applyLayerSpecialCases(key, instances); - } catch (e) { - debugPrint('Layer $key load error: $e'); + for (final layer in instances) { + if (layer != null) _map.operationalLayers.add(layer); + } + + try { + await Future.wait(instances.whereType().map((l) => l.load())); + _applyLayerSpecialCases(key, instances); + } catch (e) { + debugPrint('Layer $key load error: $e'); + } + } else { + // Re-enable visibility for cached layers + for (final layer in instances) { + if (layer != null) layer.isVisible = true; + } } _startLayerRefreshTimer(key, entry); From 9129baa3f7ebe9db072f08a5526d88864c105936 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 28 Jul 2026 18:12:28 -0700 Subject: [PATCH 031/139] made Satellite basemap work --- assets/esri_map_assets/mapConfig.json | 5 +++-- .../esri_map_services/esrimap_basemap_factory.dart | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/assets/esri_map_assets/mapConfig.json b/assets/esri_map_assets/mapConfig.json index 7eda26b77..0699bd614 100644 --- a/assets/esri_map_assets/mapConfig.json +++ b/assets/esri_map_assets/mapConfig.json @@ -8,7 +8,8 @@ "hillshade": "https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer", "lightGrayBase": "https://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base/MapServer", "darkGrayBase": "https://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Dark_Gray_Base/MapServer", - "nearmap": "https://admin-enterprise-gis.ucsd.edu/server/rest/services/Campus_Imagery_Nearmap_9in_2025_0423_0514/MapServer" + "nearmap": "https://admin-enterprise-gis.ucsd.edu/server/rest/services/Campus_Imagery_Nearmap_9in_2025_0423_0514/MapServer", + "worldImagery": "https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer" }, "basemaps": { @@ -75,7 +76,7 @@ "baseLayers": [ { "type": "arcgisTiled", - "serviceKey": "lightGrayBase" + "serviceKey": "worldImagery" }, { "type": "arcgisMapImage", diff --git a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart index fed9cff63..d584de22a 100644 --- a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart +++ b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart @@ -10,6 +10,20 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_c /// Constructs an ArcGIS [Basemap] for the requested [type] using configuration settings in [config]. Basemap buildBasemap(BasemapType type, EsriMapConfig config) { + // Intercept the satellite basemap to forcefully inject the global World Imagery layer, + // since the backend remote config might still be serving the old lightGrayBase street map. + if (type == BasemapType.satellite) { + final basemap = Basemap(); + basemap.baseLayers.add(ArcGISTiledLayer.withUri( + Uri.parse('https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer'), + )); + final nearmapUrl = config.serviceUrls['nearmap']; + if (nearmapUrl != null) { + basemap.baseLayers.add(ArcGISMapImageLayer.withUri(Uri.parse(nearmapUrl))); + } + return basemap; + } + final entry = config.basemaps[basemapKey(type)]; final isEntryNull = entry == null; if (isEntryNull) return Basemap(); From 2495ab56488c944ff50b5f672e8e23d70e5b40cf Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 29 Jul 2026 10:01:13 -0700 Subject: [PATCH 032/139] Polished Satellite basemap --- .../esri_map_services/esrimap_basemap_factory.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart index d584de22a..9c0ace224 100644 --- a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart +++ b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart @@ -14,13 +14,13 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { // since the backend remote config might still be serving the old lightGrayBase street map. if (type == BasemapType.satellite) { final basemap = Basemap(); - basemap.baseLayers.add(ArcGISTiledLayer.withUri( - Uri.parse('https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer'), - )); - final nearmapUrl = config.serviceUrls['nearmap']; - if (nearmapUrl != null) { - basemap.baseLayers.add(ArcGISMapImageLayer.withUri(Uri.parse(nearmapUrl))); - } + basemap.baseLayers.add( + ArcGISTiledLayer.withUri( + Uri.parse('https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer'), + ), + ); + // Removed the detailed satellite image that would load every 5 seconds to avoid making unnecessary requests, + // and increase performance since the detailed image would go blurry the moment you move in the map. return basemap; } From de09cdeacef117c7ecc88b4860d34224a0860121 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 29 Jul 2026 12:10:40 -0700 Subject: [PATCH 033/139] improved construction layer --- assets/esri_map_assets/mapConfig.json | 20 ++++++++++++++++++-- lib/ui/esrimap/esrimap.dart | 27 ++++++++++++++++++++------- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/assets/esri_map_assets/mapConfig.json b/assets/esri_map_assets/mapConfig.json index 0699bd614..ea5b058a6 100644 --- a/assets/esri_map_assets/mapConfig.json +++ b/assets/esri_map_assets/mapConfig.json @@ -100,7 +100,7 @@ "label": "Districts", "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/districts-thumbnail.png", "source": "url", - "url": "https://admin-enterprise-gis.ucsd.edu/server/rest/services/AdministrationServices/Areas_and_Boundaries/MapServer", + "url": "https://admin-enterprise-gis.ucsd.edu/server/rest/services/AdministrationServices/Areas_and_Boundaries/MapServer/4", "refreshInterval": 0, "popup": false }, @@ -108,7 +108,23 @@ "label": "Construction", "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/construction-thumbnail.png", "source": "url", - "url": "https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer", + "sublayers": [ + { + "source": "url", + "url": "https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/0", + "refreshInterval": 0 + }, + { + "source": "url", + "url": "https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/1", + "refreshInterval": 0 + }, + { + "source": "url", + "url": "https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/2", + "refreshInterval": 0 + } + ], "refreshInterval": 0, "popup": false } diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 40b8f11e7..0c4f6001e 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -230,7 +230,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (_config == null) return; for (final entry in _config!.layers.entries) { if (entry.value.source == 'portalItem' && !_layerInstances.containsKey(entry.key)) { - final instances = await _buildLayerInstances(entry.value); + final instances = await _buildLayerInstances(entry.key, entry.value); _layerInstances[entry.key] = instances; for (final layer in instances) { if (layer != null) { @@ -394,7 +394,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { List instances = _layerInstances[key] ?? []; if (instances.isEmpty) { - instances = await _buildLayerInstances(entry); + instances = await _buildLayerInstances(key, entry); _layerInstances[key] = instances; for (final layer in instances) { @@ -422,7 +422,20 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); } - Future> _buildLayerInstances(LayerEntry entry) async { + Future> _buildLayerInstances(String key, LayerEntry entry) async { + // Intercept specific layers to forcefully inject vector sublayers, bypassing + // the remote backend config which still requests slow MapImageLayers. + if (key == 'campusDistricts') { + return [FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse('https://admin-enterprise-gis.ucsd.edu/server/rest/services/AdministrationServices/Areas_and_Boundaries/MapServer/4')))]; + } + if (key == 'construction') { + return [ + FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse('https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/0'))), + FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse('https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/1'))), + FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse('https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/2'))), + ]; + } + if (entry.source == 'portalItem' && entry.portalKey != null && entry.itemId != null) { final portalUrl = _config?.portals[entry.portalKey!]; if (portalUrl != null) { @@ -454,8 +467,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Layer? _layerFromSublayer(SublayerEntry sub) { final isUrlSub = sub.source == 'url' && sub.url != null; if (isUrlSub) { - final isFeatureServer = sub.url!.contains('FeatureServer'); - return isFeatureServer + final isVectorSource = sub.url!.contains('FeatureServer') || RegExp(r'MapServer\/\d+').hasMatch(sub.url!); + return isVectorSource ? FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse(sub.url!))) : ArcGISMapImageLayer.withUri(Uri.parse(sub.url!)); } @@ -465,8 +478,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Layer? _layerFromEntry(LayerEntry entry) { final isUrlEntry = entry.source == 'url' && entry.url != null; if (isUrlEntry) { - final isFeatureServer = entry.url!.contains('FeatureServer'); - return isFeatureServer + final isVectorSource = entry.url!.contains('FeatureServer') || RegExp(r'MapServer\/\d+').hasMatch(entry.url!); + return isVectorSource ? FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse(entry.url!))) : ArcGISMapImageLayer.withUri(Uri.parse(entry.url!)); } From 4b6bf28581cb0a7d0b1e0c2bd3a7a79b1b37878f Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 29 Jul 2026 12:35:58 -0700 Subject: [PATCH 034/139] added transit routes --- lib/ui/esrimap/esrimap.dart | 118 ++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 0c4f6001e..1fbc617e0 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -28,6 +28,7 @@ import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_s import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; +import 'dart:ui' as ui; // Re-export MapSearchResult so callers importing esrimap.dart retain access export 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart' @@ -114,6 +115,11 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final Map> _layerInstances = {}; final Map _layerTimers = {}; + // Legend State + List _transitLegend = []; + Map _transitLegendSwatches = {}; + bool _isTransitLegendLoading = false; + // 3D Scene Widgets & Keys String _sceneMode = 'default'; EsriSceneWidget? _scene3DWidget; @@ -416,12 +422,62 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _startLayerRefreshTimer(key, entry); + if (key == 'tritonTransit') { + _fetchTransitLegendInfos(instances); + } + setState(() { _layerVisible[key] = true; _layerLoading[key] = false; }); } + Future _fetchTransitLegendInfos(List instances) async { + if (_transitLegend.isNotEmpty) return; + if (mounted) setState(() => _isTransitLegendLoading = true); + + try { + final uniqueInfosMap = {}; + for (final layer in instances.whereType()) { + final layerInfos = await layer.fetchLegendInfos(); + for (final info in layerInfos) { + String name = info.name.trim(); + if (name.isEmpty) continue; + + // Normalize the SIO typo so the shuttle/line overwrites the pin + name = name.replaceAll('Institute of', 'Institution of'); + + // By overwriting, we naturally keep the later entries (lines/shuttles) + // instead of the earlier entries (stop pins). + uniqueInfosMap[name] = info; + } + } + + final uniqueInfos = uniqueInfosMap.values.toList(); + + final swatches = {}; + for (final info in uniqueInfos) { + final swatchImage = await info.symbol?.createSwatch(screenScale: 2.0); + if (swatchImage != null) { + swatches[info.name] = await swatchImage.toImage(); + } + } + + if (mounted) { + setState(() { + _transitLegend = uniqueInfos + .where((info) => swatches.containsKey(info.name)) + .toList(); + _transitLegendSwatches = swatches; + }); + } + } catch (e) { + debugPrint('Failed to fetch transit legend: $e'); + } finally { + if (mounted) setState(() => _isTransitLegendLoading = false); + } + } + Future> _buildLayerInstances(String key, LayerEntry entry) async { // Intercept specific layers to forcefully inject vector sublayers, bypassing // the remote backend config which still requests slow MapImageLayers. @@ -1331,6 +1387,60 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Build Method // --------------------------------------------------------------------------- + Widget _buildTransitLegend() { + if (_isTransitLegendLoading) { + return Card( + color: Theme.of(context).cardColor.withOpacity(0.9), + elevation: 4, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + child: const Padding( + padding: EdgeInsets.all(12), + child: SizedBox( + width: 24, + height: 24, + child: CircularProgressIndicator(strokeWidth: 2), + ), + ), + ); + } + + if (_transitLegend.isEmpty) return const SizedBox.shrink(); + + return Card( + color: Theme.of(context).cardColor.withOpacity(0.9), + elevation: 4, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + const Text('Transit Routes', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 13)), + const SizedBox(height: 6), + for (final info in _transitLegend) + Padding( + padding: const EdgeInsets.only(bottom: 4), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + if (_transitLegendSwatches[info.name] != null) + RawImage( + image: _transitLegendSwatches[info.name], + width: 16, + height: 16, + ), + const SizedBox(width: 8), + Text(info.name, style: const TextStyle(fontSize: 12)), + ], + ), + ), + ], + ), + ), + ); + } + @override Widget build(BuildContext context) { super.build(context); @@ -1618,6 +1728,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), ), + // Transit Legend + if (_layerVisible['tritonTransit'] == true) + Positioned( + bottom: 24, + left: 16, + child: _buildTransitLegend(), + ), + // Basemap & Operational Layer Selector Panel if (isLayersPanelVisible) EsriMapLayersPanel( From e6b3d49d2cfdbe8275433df7b354b12e451a18f4 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 29 Jul 2026 12:39:22 -0700 Subject: [PATCH 035/139] Added legend --- lib/ui/esrimap/esrimap.dart | 67 +++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 25 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 1fbc617e0..eec3de5f8 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -119,6 +119,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { List _transitLegend = []; Map _transitLegendSwatches = {}; bool _isTransitLegendLoading = false; + bool _isTransitLegendMinimized = false; // 3D Scene Widgets & Keys String _sceneMode = 'default'; @@ -1410,32 +1411,48 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { color: Theme.of(context).cardColor.withOpacity(0.9), elevation: 4, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - const Text('Transit Routes', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 13)), - const SizedBox(height: 6), - for (final info in _transitLegend) - Padding( - padding: const EdgeInsets.only(bottom: 4), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - if (_transitLegendSwatches[info.name] != null) - RawImage( - image: _transitLegendSwatches[info.name], - width: 16, - height: 16, - ), - const SizedBox(width: 8), - Text(info.name, style: const TextStyle(fontSize: 12)), - ], - ), + child: InkWell( + borderRadius: BorderRadius.circular(8), + onTap: () => setState(() => _isTransitLegendMinimized = !_isTransitLegendMinimized), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Row( + mainAxisSize: MainAxisSize.min, + children: [ + const Text('Transit Routes', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 13)), + const SizedBox(width: 8), + Icon( + _isTransitLegendMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, + size: 18, + ), + ], ), - ], + if (!_isTransitLegendMinimized) ...[ + const SizedBox(height: 6), + for (final info in _transitLegend) + Padding( + padding: const EdgeInsets.only(bottom: 4), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + if (_transitLegendSwatches[info.name] != null) + RawImage( + image: _transitLegendSwatches[info.name], + width: 16, + height: 16, + ), + const SizedBox(width: 8), + Text(info.name, style: const TextStyle(fontSize: 12)), + ], + ), + ), + ], + ], + ), ), ), ); From acccfcbd5d2e37300ff1279050a9bc32e737f32b Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Wed, 29 Jul 2026 20:02:32 +0000 Subject: [PATCH 036/139] style: auto fix formatting violations --- lib/ui/esrimap/esrimap.dart | 106 ++++++++++++++++++------------------ 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index b475442ab..02c1fec68 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -231,7 +231,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); } - /// Silently preloads computationally expensive operational layers (e.g. portalItem Web Maps) + /// Silently preloads computationally expensive operational layers (e.g. portalItem Web Maps) /// in the background to ensure instantaneous layer toggling later. void _preloadHeavyLayers() async { if (_config == null) return; @@ -384,12 +384,12 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (isAlreadyVisible) { _layerTimers[key]?.cancel(); _layerTimers.remove(key); - + // Hide layers instead of destroying them to cache their loaded state for (final layer in _layerInstances[key] ?? []) { if (layer != null) layer.isVisible = false; } - + setState(() => _layerVisible[key] = false); return; } @@ -398,7 +398,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Retrieve cached layers, or build them if they don't exist yet List instances = _layerInstances[key] ?? []; - + if (instances.isEmpty) { instances = await _buildLayerInstances(key, entry); _layerInstances[key] = instances; @@ -422,9 +422,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _startLayerRefreshTimer(key, entry); - if (key == 'tritonTransit') { - _fetchTransitLegendInfos(instances); - } + if (key == 'tritonTransit') _fetchTransitLegendInfos(instances); setState(() { _layerVisible[key] = true; @@ -435,7 +433,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Future _fetchTransitLegendInfos(List instances) async { if (_transitLegend.isNotEmpty) return; if (mounted) setState(() => _isTransitLegendLoading = true); - + try { final uniqueInfosMap = {}; for (final layer in instances.whereType()) { @@ -443,31 +441,27 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { for (final info in layerInfos) { String name = info.name.trim(); if (name.isEmpty) continue; - + // Normalize the SIO typo so the shuttle/line overwrites the pin name = name.replaceAll('Institute of', 'Institution of'); - + // By overwriting, we naturally keep the later entries (lines/shuttles) // instead of the earlier entries (stop pins). uniqueInfosMap[name] = info; } } - + final uniqueInfos = uniqueInfosMap.values.toList(); - + final swatches = {}; for (final info in uniqueInfos) { final swatchImage = await info.symbol?.createSwatch(screenScale: 2.0); - if (swatchImage != null) { - swatches[info.name] = await swatchImage.toImage(); - } + if (swatchImage != null) swatches[info.name] = await swatchImage.toImage(); } - + if (mounted) { setState(() { - _transitLegend = uniqueInfos - .where((info) => swatches.containsKey(info.name)) - .toList(); + _transitLegend = uniqueInfos.where((info) => swatches.containsKey(info.name)).toList(); _transitLegendSwatches = swatches; }); } @@ -479,26 +473,48 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } Future> _buildLayerInstances(String key, LayerEntry entry) async { - // Intercept specific layers to forcefully inject vector sublayers, bypassing + // Intercept specific layers to forcefully inject vector sublayers, bypassing // the remote backend config which still requests slow MapImageLayers. - if (key == 'campusDistricts') { - return [FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse('https://admin-enterprise-gis.ucsd.edu/server/rest/services/AdministrationServices/Areas_and_Boundaries/MapServer/4')))]; - } + if (key == 'campusDistricts') + return [ + FeatureLayer.withFeatureTable( + ServiceFeatureTable.withUri( + Uri.parse( + 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/AdministrationServices/Areas_and_Boundaries/MapServer/4', + ), + ), + ), + ]; if (key == 'construction') { return [ - FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse('https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/0'))), - FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse('https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/1'))), - FeatureLayer.withFeatureTable(ServiceFeatureTable.withUri(Uri.parse('https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/2'))), + FeatureLayer.withFeatureTable( + ServiceFeatureTable.withUri( + Uri.parse( + 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/0', + ), + ), + ), + FeatureLayer.withFeatureTable( + ServiceFeatureTable.withUri( + Uri.parse( + 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/1', + ), + ), + ), + FeatureLayer.withFeatureTable( + ServiceFeatureTable.withUri( + Uri.parse( + 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/2', + ), + ), + ), ]; } if (entry.source == 'portalItem' && entry.portalKey != null && entry.itemId != null) { final portalUrl = _config?.portals[entry.portalKey!]; if (portalUrl != null) { - final portalItem = PortalItem.withPortalAndItemId( - portal: Portal(Uri.parse(portalUrl)), - itemId: entry.itemId!, - ); + final portalItem = PortalItem.withPortalAndItemId(portal: Portal(Uri.parse(portalUrl)), itemId: entry.itemId!); try { await portalItem.load(); if (portalItem.type == PortalItemType.webMap) { @@ -515,7 +531,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } } - + if (entry.hasSublayers) return entry.sublayers!.map(_layerFromSublayer).toList(); return [_layerFromEntry(entry)]; } @@ -1399,17 +1415,13 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), child: const Padding( padding: EdgeInsets.all(12), - child: SizedBox( - width: 24, - height: 24, - child: CircularProgressIndicator(strokeWidth: 2), - ), + child: SizedBox(width: 24, height: 24, child: CircularProgressIndicator(strokeWidth: 2)), ), ); } - + if (_transitLegend.isEmpty) return const SizedBox.shrink(); - + return Card( color: Theme.of(context).cardColor.withOpacity(0.9), elevation: 4, @@ -1428,10 +1440,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { children: [ const Text('Transit Routes', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 13)), const SizedBox(width: 8), - Icon( - _isTransitLegendMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, - size: 18, - ), + Icon(_isTransitLegendMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, size: 18), ], ), if (!_isTransitLegendMinimized) ...[ @@ -1443,11 +1452,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { mainAxisSize: MainAxisSize.min, children: [ if (_transitLegendSwatches[info.name] != null) - RawImage( - image: _transitLegendSwatches[info.name], - width: 16, - height: 16, - ), + RawImage(image: _transitLegendSwatches[info.name], width: 16, height: 16), const SizedBox(width: 8), Text(info.name, style: const TextStyle(fontSize: 12)), ], @@ -1749,12 +1754,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), // Transit Legend - if (_layerVisible['tritonTransit'] == true) - Positioned( - bottom: 24, - left: 16, - child: _buildTransitLegend(), - ), + if (_layerVisible['tritonTransit'] == true) Positioned(bottom: 24, left: 16, child: _buildTransitLegend()), // Basemap & Operational Layer Selector Panel if (isLayersPanelVisible) From abfc4c02c8d053a0569db40e48696c70d1d1f1f8 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 29 Jul 2026 13:39:27 -0700 Subject: [PATCH 037/139] added start and end labels for directions --- lib/ui/esrimap/esrimap.dart | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 02c1fec68..a5f9d251e 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1181,27 +1181,47 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } final whiteOutline = SimpleLineSymbol(style: SimpleLineSymbolStyle.solid, color: Colors.white, width: 2); + final destPoint = ArcGISPoint( + x: destination.longitude, + y: destination.latitude, + spatialReference: SpatialReference.wgs84, + ); _routeGraphicsOverlay.graphics.add( Graphic( - geometry: ArcGISPoint( - x: destination.longitude, - y: destination.latitude, - spatialReference: SpatialReference.wgs84, - ), + geometry: destPoint, symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.red, size: 12) ..outline = whiteOutline, ), ); + _routeGraphicsOverlay.graphics.add( + Graphic( + geometry: destPoint, + symbol: TextSymbol(text: 'Destination', color: Colors.black, size: 14) + ..haloColor = Colors.white + ..haloWidth = 2 + ..offsetY = -15, // Negative offsetY usually moves text up + ), + ); final hasOriginLatLng = originLatLng != null; if (hasOriginLatLng) { + final originPoint = ArcGISPoint(x: originLatLng.$2, y: originLatLng.$1, spatialReference: SpatialReference.wgs84); _routeGraphicsOverlay.graphics.add( Graphic( - geometry: ArcGISPoint(x: originLatLng.$2, y: originLatLng.$1, spatialReference: SpatialReference.wgs84), - symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.blue, size: 12) + geometry: originPoint, + symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.green, size: 12) ..outline = whiteOutline, ), ); + _routeGraphicsOverlay.graphics.add( + Graphic( + geometry: originPoint, + symbol: TextSymbol(text: 'Start', color: Colors.black, size: 14) + ..haloColor = Colors.white + ..haloWidth = 2 + ..offsetY = -15, + ), + ); } final hasPaddedExtent = routeRes.paddedExtent != null; From 728265528d863b716903a9f79f3e7fa4a5edc05b Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 29 Jul 2026 14:19:15 -0700 Subject: [PATCH 038/139] fixed toast in dark theme --- lib/main.dart | 4 + .../esrimap_detail_slide_over.dart | 144 +++++++----------- lib/ui/esrimap/esrimap.dart | 8 + 3 files changed, 66 insertions(+), 90 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 760730553..4413f7367 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -141,6 +141,10 @@ class CampusMobile extends StatelessWidget { selectedItemColor: Colors.white, backgroundColor: bottomTabBarColorDark, ), + snackBarTheme: const SnackBarThemeData( + contentTextStyle: TextStyle(color: Colors.white), + backgroundColor: Color(0xFF323232), + ), ); return MultiProvider( diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index b271ed7f0..70041fa98 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -244,6 +244,30 @@ class EsriMapDetailSlideOver extends StatelessWidget { headerTitle: isRouting ? 'Directions to ${result.name}' : result.name, headerIcon: resultIcon, onClose: isRouting ? onClearRoute : onClose, + trailing: isRouting + ? Padding( + padding: const EdgeInsets.only(right: 8), + child: TextButton.icon( + onPressed: () { + final originParam = fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''; + onLaunchWebsite( + 'https://www.google.com/maps/dir/?api=1' + '&destination=${result.latitude},${result.longitude}' + '&travelmode=walking' + '$originParam', + ); + }, + icon: const Icon(Icons.map_outlined, size: 16), + label: const Text('Open Google Maps', style: TextStyle(fontSize: 12)), + style: TextButton.styleFrom( + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 0), + minimumSize: Size.zero, + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + foregroundColor: isDark ? const Color(0xFFFFCD00) : Theme.of(context).primaryColor, + ), + ), + ) + : null, sliverBody: [ SliverToBoxAdapter( child: Padding( @@ -276,29 +300,8 @@ class EsriMapDetailSlideOver extends StatelessWidget { 'No route available from your current location.', style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[400] : Colors.grey[600]), ), - const SizedBox(height: 12), - SizedBox( - width: double.infinity, - child: FilledButton.icon( - onPressed: () { - final originParam = fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''; - onLaunchWebsite( - 'https://www.google.com/maps/dir/?api=1' - '&destination=${result.latitude},${result.longitude}' - '&travelmode=walking' - '$originParam', - ); - }, - icon: const Icon(Icons.map_outlined, size: 18), - label: const Text('Navigate in Google Maps'), - style: FilledButton.styleFrom( - padding: const EdgeInsets.symmetric(vertical: 12), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), - ), - ), - ), ] else if (hasRoute) ...[ - // Travel time estimate + // Travel time estimate and mode indicator Row( children: [ Icon(Icons.schedule, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), @@ -311,77 +314,34 @@ class EsriMapDetailSlideOver extends StatelessWidget { color: isDark ? Colors.white : Colors.grey[900], ), ), - ], - ), - const SizedBox(height: 12), - - // Travel mode toggle chips - Row( - children: [ - for (final mode in ['Walking', 'Accessible']) ...[ - if (mode != 'Walking') const SizedBox(width: 8), - GestureDetector( - onTap: mode == travelMode ? null : () => onTravelModeChanged(mode), - child: Container( - padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8), - decoration: BoxDecoration( - color: mode == travelMode - ? (isDark ? Colors.white : Colors.grey[900]) - : (isDark ? Colors.grey[800] : Colors.grey[100]), - borderRadius: BorderRadius.circular(16), + const SizedBox(width: 12), + Container( + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 6), + decoration: BoxDecoration( + color: isDark ? Colors.white : Colors.grey[900], + borderRadius: BorderRadius.circular(16), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + Icons.directions_walk, + size: 16, + color: isDark ? Colors.grey[900] : Colors.white, ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Icon( - mode == 'Walking' ? Icons.directions_walk : Icons.accessible, - size: 16, - color: mode == travelMode - ? (isDark ? Colors.grey[900] : Colors.white) - : (isDark ? Colors.white70 : Colors.grey[700]), - ), - const SizedBox(width: 6), - Text( - mode, - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w500, - color: mode == travelMode - ? (isDark ? Colors.grey[900] : Colors.white) - : (isDark ? Colors.white70 : Colors.grey[700]), - ), - ), - ], + const SizedBox(width: 6), + Text( + 'Walking', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w500, + color: isDark ? Colors.grey[900] : Colors.white, + ), ), - ), + ], ), - ], - ], - ), - const SizedBox(height: 12), - - // Google Maps fallback button - SizedBox( - width: double.infinity, - child: OutlinedButton.icon( - onPressed: () { - final originParam = fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''; - onLaunchWebsite( - 'https://www.google.com/maps/dir/?api=1' - '&destination=${result.latitude},${result.longitude}' - '&travelmode=walking' - '$originParam', - ); - }, - icon: const Icon(Icons.map_outlined, size: 18), - label: const Text('Navigate in Google Maps'), - style: OutlinedButton.styleFrom( - foregroundColor: isDark ? const Color(0xFFFFCD00) : null, - side: isDark ? const BorderSide(color: Color(0xFFFFCD00)) : null, - padding: const EdgeInsets.symmetric(vertical: 12), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), ), - ), + ], ), ] else // Directions + Website buttons @@ -440,6 +400,10 @@ class EsriMapDetailSlideOver extends StatelessWidget { final isNotLastManeuver = index < routeManeuvers.length - 1; final isFirstIndex = index == 0; + String directionText = step.directionText; + directionText = directionText.replaceAll('Location 1', 'My Location'); + directionText = directionText.replaceAll('Location 2', result.name); + return Column( children: [ if (isFirstIndex) const Divider(height: 1), @@ -449,7 +413,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { size: 20, color: isDark ? Colors.grey[400] : Colors.grey[600], ), - title: Text(step.directionText, style: const TextStyle(fontSize: 14)), + title: Text(directionText, style: const TextStyle(fontSize: 14)), trailing: distMeters > 0 ? Text( distLabel, diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index a5f9d251e..2ea8b37c0 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1139,6 +1139,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final isUserLatLngNull = userLatLng == null; if (isUserLatLngNull) { setState(() => _isRouting = false); + if (mounted) { + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar( + content: Text('Please enable location or manually enter starting location'), + duration: Duration(seconds: 3), + ), + ); + } return; } From ae1f8d7a39ce29e273e3d493e7cc391bb3953f0b Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 29 Jul 2026 14:23:20 -0700 Subject: [PATCH 039/139] fixed location fetching --- lib/ui/esrimap/esrimap.dart | 39 ++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 2ea8b37c0..747f6ee85 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -286,6 +286,27 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Starts the device location data source. Future _startLocationDisplay() async { if (!FeatureFlags.mapLocationTrackingEnabled) return; + + bool serviceEnabled = await Geolocator.isLocationServiceEnabled(); + if (!serviceEnabled) { + debugPrint('Location services are disabled.'); + return; + } + + LocationPermission permission = await Geolocator.checkPermission(); + if (permission == LocationPermission.denied) { + permission = await Geolocator.requestPermission(); + if (permission == LocationPermission.denied) { + debugPrint('Location permissions are denied'); + return; + } + } + + if (permission == LocationPermission.deniedForever) { + debugPrint('Location permissions are permanently denied'); + return; + } + try { await _locationDataSource.start(); } on ArcGISException catch (e) { @@ -969,6 +990,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Future _recenterOnUser() async { try { + await _startLocationDisplay(); final location = await Geolocator.getCurrentPosition( locationSettings: const LocationSettings(timeLimit: Duration(seconds: 10)), ); @@ -1135,7 +1157,22 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Future _solveRoute(MapSearchResult destination, {String? travelMode, (double, double)? originLatLng}) async { if (!FeatureFlags.mapRoutingEnabled) return; - final userLatLng = originLatLng ?? _getUserLatLng(); + + if (originLatLng == null && _getUserLatLng() == null) { + await _startLocationDisplay(); + } + + var userLatLng = originLatLng ?? _getUserLatLng(); + if (userLatLng == null && await Geolocator.isLocationServiceEnabled()) { + final permission = await Geolocator.checkPermission(); + if (permission == LocationPermission.whileInUse || permission == LocationPermission.always) { + try { + final loc = await Geolocator.getCurrentPosition(locationSettings: const LocationSettings(timeLimit: Duration(seconds: 3))); + userLatLng = (loc.latitude, loc.longitude); + } catch (_) {} + } + } + final isUserLatLngNull = userLatLng == null; if (isUserLatLngNull) { setState(() => _isRouting = false); From 8d3b2ce4946eb7d752d07e312044613e5be0362c Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 29 Jul 2026 14:28:25 -0700 Subject: [PATCH 040/139] Implemented driving navigation --- .../esrimap_detail_slide_over.dart | 23 ++++++++++++++++++- lib/ui/esrimap/esrimap.dart | 3 +++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index 70041fa98..b1a4b853b 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -297,9 +297,30 @@ class EsriMapDetailSlideOver extends StatelessWidget { // Routing or Action Buttons if (routeFailed) ...[ Text( - 'No route available from your current location.', + 'You are too far from campus for walking navigation.', style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[400] : Colors.grey[600]), ), + const SizedBox(height: 16), + SizedBox( + width: double.infinity, + child: FilledButton.icon( + onPressed: () { + final originParam = fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''; + onLaunchWebsite( + 'https://www.google.com/maps/dir/?api=1' + '&destination=${result.latitude},${result.longitude}' + '&travelmode=driving' + '$originParam', + ); + }, + icon: const Icon(Icons.directions_car, size: 18), + label: const Text('Open Google Maps Driving'), + style: FilledButton.styleFrom( + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ), + ), + ), ] else if (hasRoute) ...[ // Travel time estimate and mode indicator Row( diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 747f6ee85..03aae68c1 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1206,6 +1206,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { setState(() { _isRouting = false; _routeFailed = true; + _showRouteFields = true; + _selectedResult = destination; + _lastSelectedResult = destination; }); } return; From 3a689ef99c02599d5c7e7aad3b8ec1241b06685b Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 29 Jul 2026 14:38:03 -0700 Subject: [PATCH 041/139] polished ui --- .../esrimap_detail_slide_over.dart | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index b1a4b853b..c0f675cfb 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -303,7 +303,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { const SizedBox(height: 16), SizedBox( width: double.infinity, - child: FilledButton.icon( + child: OutlinedButton.icon( onPressed: () { final originParam = fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''; onLaunchWebsite( @@ -314,8 +314,10 @@ class EsriMapDetailSlideOver extends StatelessWidget { ); }, icon: const Icon(Icons.directions_car, size: 18), - label: const Text('Open Google Maps Driving'), - style: FilledButton.styleFrom( + label: const Text('Drive With Google Maps'), + style: OutlinedButton.styleFrom( + foregroundColor: isDark ? const Color(0xFFFFCD00) : Theme.of(context).primaryColor, + side: BorderSide(color: isDark ? const Color(0xFFFFCD00) : Theme.of(context).primaryColor), padding: const EdgeInsets.symmetric(vertical: 12), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), ), @@ -345,11 +347,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { child: Row( mainAxisSize: MainAxisSize.min, children: [ - Icon( - Icons.directions_walk, - size: 16, - color: isDark ? Colors.grey[900] : Colors.white, - ), + Icon(Icons.directions_walk, size: 16, color: isDark ? Colors.grey[900] : Colors.white), const SizedBox(width: 6), Text( 'Walking', From 1b06996e6ee8f7bab829d23924acb3b57e5b2039 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 29 Jul 2026 14:42:34 -0700 Subject: [PATCH 042/139] a --- lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index c0f675cfb..f76ba6f23 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -244,7 +244,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { headerTitle: isRouting ? 'Directions to ${result.name}' : result.name, headerIcon: resultIcon, onClose: isRouting ? onClearRoute : onClose, - trailing: isRouting + trailing: isRouting && !routeFailed ? Padding( padding: const EdgeInsets.only(right: 8), child: TextButton.icon( From 247633a7c675913bb67a7b345e81b021c75e7503 Mon Sep 17 00:00:00 2001 From: Albert Hoang Date: Wed, 29 Jul 2026 15:10:00 -0700 Subject: [PATCH 043/139] routing and navigation --- .../esrimap_detail_slide_over.dart | 30 +- .../esri_map_widgets/esrimap_search_bar.dart | 6 + .../esrimap_suggestions_panel.dart | 217 ++++++------ lib/ui/esrimap/esrimap.dart | 328 +++++++++++++----- .../esrimap_detail_slide_over_test.dart | 61 ++++ .../esrimap_suggestions_panel_test.dart | 69 ++++ 6 files changed, 516 insertions(+), 195 deletions(-) create mode 100644 test/ui/esrimap/esrimap_detail_slide_over_test.dart create mode 100644 test/ui/esrimap/esrimap_suggestions_panel_test.dart diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index b271ed7f0..518cb221b 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -142,6 +142,9 @@ class EsriMapDetailSlideOver extends StatelessWidget { /// Controller for managing sheet drag height. final DraggableScrollableController controller; + /// Height available to the sheet above the app's bottom navigation. + final double availableHeight; + /// Selected location search result. final MapSearchResult result; @@ -188,6 +191,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { const EsriMapDetailSlideOver({ Key? key, required this.controller, + required this.availableHeight, required this.result, required this.resultIcon, required this.isRoutingMode, @@ -214,15 +218,21 @@ class EsriMapDetailSlideOver extends StatelessWidget { final categoryLabel = isBuilding ? 'Building' : result.subtitle; // Content-aware sheet sizing - final screenHeight = MediaQuery.of(context).size.height; - double contentEst = 80.0 + 30 + 48 + 40; - if (detailText.isNotEmpty) contentEst += 60; + double contentEst = isRouting ? 230 : 198; + if (!isRouting && detailText.isNotEmpty) { + final detailTextPainter = TextPainter( + text: TextSpan(text: detailText, style: const TextStyle(fontSize: 16)), + textDirection: Directionality.of(context), + textScaler: MediaQuery.textScalerOf(context), + )..layout(maxWidth: MediaQuery.sizeOf(context).width - 40); + contentEst += 8 + detailTextPainter.height; + } final hasRouteManeuvers = hasRoute && routeManeuvers.isNotEmpty; if (hasRouteManeuvers) contentEst += routeManeuvers.length * 52.0; - final contentFraction = (contentEst / screenHeight).clamp(0.15, 0.80); + final contentFraction = (contentEst / availableHeight).clamp(0.15, 1.0); final initialSize = hasRoute ? 0.35 : (contentFraction < 0.30 ? contentFraction : 0.30); - final maxSize = hasRoute ? 0.80 : (contentFraction < 0.80 ? contentFraction.clamp(0.30, 0.80) : 0.80); + final maxSize = contentFraction.clamp(initialSize, 1.0); final snaps = [0.15]; final isInitialLarger = initialSize > 0.15 + 0.01; if (isInitialLarger) snaps.add(initialSize); @@ -236,7 +246,9 @@ class EsriMapDetailSlideOver extends StatelessWidget { snapSizes: snaps, builder: (context, scrollController) { final shouldShowDetailText = !isRouting && detailText.isNotEmpty; - final hasWebsiteUrl = result.websiteUrl != null; + final websiteUrl = result.websiteUrl?.trim(); + final hasWebsiteUrl = websiteUrl?.isNotEmpty == true; + final websiteHost = hasWebsiteUrl ? Uri.tryParse(websiteUrl!)?.host.replaceFirst('www.', '') : null; return buildSlideOverContent( context: context, @@ -264,8 +276,6 @@ class EsriMapDetailSlideOver extends StatelessWidget { Text( detailText, style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[400] : Colors.grey[600]), - maxLines: 3, - overflow: TextOverflow.ellipsis, ), ], if (!isRouting) const SizedBox(height: 16), @@ -390,9 +400,9 @@ class EsriMapDetailSlideOver extends StatelessWidget { if (hasWebsiteUrl) ...[ Expanded( child: OutlinedButton.icon( - onPressed: () => onLaunchWebsite(result.websiteUrl!), + onPressed: () => onLaunchWebsite(websiteUrl!), icon: const Icon(Icons.language, size: 18), - label: const Text('View website'), + label: Text(websiteHost?.isNotEmpty == true ? 'Visit $websiteHost' : 'View website'), style: OutlinedButton.styleFrom( foregroundColor: isDark ? const Color(0xFFFFCD00) : null, side: isDark ? const BorderSide(color: Color(0xFFFFCD00)) : null, diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index 006727f06..d358b0a0d 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -322,6 +322,12 @@ class EsriMapSearchBar extends StatelessWidget { ), ), + if (isSearching && !showResults) + const Padding( + padding: EdgeInsets.only(top: 4), + child: ClipRRect(borderRadius: BorderRadius.all(Radius.circular(2)), child: LinearProgressIndicator()), + ), + // Search Results Dropdown List if (shouldShowDropdown) Padding( diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart index 8df5e946a..595a198a8 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart @@ -34,6 +34,9 @@ class EsriMapSuggestionsPanel extends StatelessWidget { /// Callback when the clear 'X' button on a recent search item is tapped. final void Function(int index) onRemoveRecent; + /// Callback when all recent searches are cleared. + final VoidCallback onClearRecent; + /// Constructs an [EsriMapSuggestionsPanel] instance. const EsriMapSuggestionsPanel({ Key? key, @@ -45,6 +48,7 @@ class EsriMapSuggestionsPanel extends StatelessWidget { required this.onSelectCategory, required this.onSelectRecent, required this.onRemoveRecent, + required this.onClearRecent, }) : super(key: key); @override @@ -53,127 +57,140 @@ class EsriMapSuggestionsPanel extends StatelessWidget { final bgColor = isDark ? Colors.grey[850] : Colors.white; final isFromRouteFieldActive = showRouteFields && activeRouteField == 'from'; final topPadding = isFromRouteFieldActive ? 0.0 : 12.0; + final availableHeight = MediaQuery.sizeOf(context).height - MediaQuery.viewInsetsOf(context).bottom; return Material( elevation: 4, borderRadius: BorderRadius.circular(8), color: bgColor, - child: Padding( - padding: EdgeInsets.only(top: topPadding, bottom: 12), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // "Current Location" shortcut option when 'From' field is active - if (isFromRouteFieldActive) ...[ - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: onSelectCurrentLocation, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 20), + child: ConstrainedBox( + constraints: BoxConstraints(maxHeight: availableHeight * 0.55), + child: SingleChildScrollView( + padding: EdgeInsets.only(top: topPadding, bottom: 12), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (isFromRouteFieldActive) ...[ + ListTile( + contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4), + leading: Icon( + Icons.my_location, + size: 20, + color: isDark ? Colors.grey[400] : Theme.of(context).colorScheme.primary, + ), + title: Text( + 'Current Location', + style: TextStyle( + fontSize: 15, + fontWeight: FontWeight.w500, + color: isDark ? Colors.white : Theme.of(context).colorScheme.primary, + ), + ), + onTap: onSelectCurrentLocation, + ), + const Divider(height: 1), + const SizedBox(height: 12), + ], + if (categories.isNotEmpty) ...[ + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Text( + 'Quick search', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + ), + ), + const SizedBox(height: 8), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 8), child: Row( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Icon( - Icons.my_location, - size: 20, - color: isDark ? Colors.grey[500] : Theme.of(context).colorScheme.primary, - ), - const SizedBox(width: 12), - Text( - 'Current Location', - style: TextStyle( - fontSize: 15, - fontWeight: FontWeight.w500, - color: isDark ? Colors.white : Theme.of(context).colorScheme.primary, - ), - ), + for (final category in categories) Expanded(child: _buildCategoryChip(context, category)), ], ), ), - ), - const Divider(height: 1), - const SizedBox(height: 12), - ], - - // Suggested categories section header - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: Text( - 'Suggested', - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w600, - color: isDark ? Colors.grey[400] : Colors.grey[600], - ), - ), - ), - const SizedBox(height: 12), - - // Category circular icon chips row - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: categories.map((cat) => _buildCategoryChip(context, cat)).toList(), - ), - ), - - // Recent searches history list - if (recentSearches.isNotEmpty) ...[ - const SizedBox(height: 16), - const Divider(height: 1), - const SizedBox(height: 8), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: Text( - 'Recently viewed', - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w600, - color: isDark ? Colors.grey[400] : Colors.grey[600], + ], + if (recentSearches.isNotEmpty) ...[ + const SizedBox(height: 12), + const Divider(height: 1), + Padding( + padding: const EdgeInsets.fromLTRB(16, 4, 8, 0), + child: Row( + children: [ + Expanded( + child: Text( + 'Recently viewed', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + ), + ), + TextButton(onPressed: onClearRecent, child: const Text('Clear')), + ], ), ), - ), - const SizedBox(height: 4), - ...List.generate(recentSearches.length, (index) { - final recent = recentSearches[index]; - return ListTile( - splashColor: Colors.transparent, - dense: true, - leading: Icon(Icons.history, size: 20, color: isDark ? Colors.grey[500] : Colors.grey[400]), - title: Text(recent.name, maxLines: 1, overflow: TextOverflow.ellipsis), - trailing: GestureDetector( - onTap: () => onRemoveRecent(index), - child: Icon(Icons.close, size: 16, color: isDark ? Colors.grey[500] : Colors.grey[400]), - ), - onTap: () => onSelectRecent(recent), - ); - }), + ...List.generate(recentSearches.length, (index) { + final recent = recentSearches[index]; + final subtitle = recent.address.isNotEmpty ? recent.address : recent.subtitle; + return ListTile( + contentPadding: const EdgeInsets.only(left: 16, right: 4), + leading: CircleAvatar( + radius: 18, + backgroundColor: isDark ? Colors.grey[800] : Colors.grey[100], + child: Icon(Icons.history, size: 19, color: isDark ? Colors.grey[400] : Colors.grey[600]), + ), + title: Text(recent.name, maxLines: 1, overflow: TextOverflow.ellipsis), + subtitle: subtitle.isEmpty ? null : Text(subtitle, maxLines: 1, overflow: TextOverflow.ellipsis), + trailing: IconButton( + tooltip: 'Remove ${recent.name} from recents', + onPressed: () => onRemoveRecent(index), + icon: Icon(Icons.close, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), + ), + onTap: () => onSelectRecent(recent), + ); + }), + ], ], - ], + ), ), ), ); } - /// Builds a single circular category quick-search chip. + /// Builds a single quick-search category icon. Widget _buildCategoryChip(BuildContext context, EsriSearchCategory category) { final isDark = Theme.of(context).brightness == Brightness.dark; - return GestureDetector( - onTap: () => onSelectCategory(category), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Container( - width: 56, - height: 56, - decoration: BoxDecoration(color: category.color, shape: BoxShape.circle), - child: Icon(category.icon, size: 24, color: Colors.black), - ), - const SizedBox(height: 6), - Text(category.label, style: TextStyle(fontSize: 13, color: isDark ? Colors.grey[400] : Colors.grey[600])), - ], + return Tooltip( + message: 'Search ${category.label}', + child: GestureDetector( + onTap: () => onSelectCategory(category), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + width: 52, + height: 52, + decoration: BoxDecoration(color: category.color, shape: BoxShape.circle), + child: Icon(category.icon, size: 22, color: Colors.black), + ), + const SizedBox(height: 6), + Text( + category.label, + maxLines: 2, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center, + style: TextStyle(fontSize: 12, color: isDark ? Colors.grey[400] : Colors.grey[600]), + ), + ], + ), ), ); } diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index e240e3325..660b2960c 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -77,6 +77,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { bool _isSearching = false; bool _showSuggestions = false; List _recentSearches = []; + Timer? _searchDebounce; + int _searchRequestId = 0; // Active Category & Pin Plotting State MapSearchResult? _selectedResult; @@ -192,6 +194,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { await _mapReadyCompleter.future; _setupAgeAuthChallengeHandler(); _mapViewController.arcGISMap = _map; + _mapViewController.selectionProperties = SelectionProperties(color: const Color(0xFF34C759)); _mapViewController.interactionOptions.rotateEnabled = true; final isGraphicsOverlayMissing = !_mapViewController.graphicsOverlays.contains(_graphicsOverlay); @@ -232,6 +235,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { @override void dispose() { + _searchDebounce?.cancel(); _categorySheetController.dispose(); _detailSheetController.dispose(); _searchController.dispose(); @@ -492,16 +496,35 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { EsriMapSearchService.saveRecentSearches(_recentSearches); } + void _clearRecentSearches() { + setState(_recentSearches.clear); + EsriMapSearchService.saveRecentSearches(_recentSearches); + } + Future _fetchAllPoiClasses() async { final classes = await EsriMapSearchService.fetchAllPoiClasses(); if (mounted) setState(() => _allPoiClasses = classes); } - /// Text search: queries buildings and POIs concurrently. - Future _performSearch(String query) async { - final isQueryEmpty = query.trim().isEmpty; - if (isQueryEmpty) return; + void _queueSearch(String query) { + _searchDebounce?.cancel(); + final requestId = ++_searchRequestId; + final trimmedQuery = query.trim(); + if (trimmedQuery.isEmpty) return; + _searchDebounce = Timer(const Duration(milliseconds: 250), () { + _searchDebounce = null; + _performSearch(trimmedQuery, requestId); + }); + } + void _cancelPendingSearch() { + _searchDebounce?.cancel(); + _searchDebounce = null; + _searchRequestId++; + } + + /// Text search: queries buildings and POIs concurrently. + Future _performSearch(String query, int requestId) async { final q = query.toLowerCase(); final matched = _allPoiClasses.where((c) => c.toLowerCase().contains(q)).toList(); @@ -524,25 +547,27 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { EsriMapSearchService.queryPOIs(query), ]); final merged = [...results[0], ...results[1]]; - if (mounted) { - setState(() { - _searchResults = merged; - _isSearching = false; - }); - } + final isStale = !mounted || requestId != _searchRequestId; + if (isStale) return; + setState(() { + _searchResults = merged; + _isSearching = false; + }); } catch (e) { debugPrint('Search error: $e'); - if (mounted) { - setState(() { - _searchResults = []; - _isSearching = false; - }); - } + final isStale = !mounted || requestId != _searchRequestId; + if (isStale) return; + setState(() { + _searchResults = []; + _isSearching = false; + }); } } - /// Category search: queries POIs filtered by class and plots pins on the map. + /// Category search: queries matching locations and plots pins on the map. Future _performCategorySearch(EsriSearchCategory category) async { + _cancelPendingSearch(); + final requestId = _searchRequestId; setState(() { _isSearching = true; _showResults = false; @@ -558,21 +583,38 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _toFocusNode.unfocus(); try { - final allResults = await EsriMapSearchService.queryPOIsByClass(category.poiClassValue); + final searches = >>[ + EsriMapSearchService.queryPOIsByClass(category.poiClassValue), + if (category.poiClassValue == 'Recreation Facilities') EsriMapSearchService.queryBuildings('gym'), + ]; + final allResults = (await Future.wait(searches)).expand((results) => results).toList(); + final isStale = !mounted || requestId != _searchRequestId; + if (isStale) return; _plotResultsOnMap(allResults); + _zoomToResults(allResults); setState(() { _allCategoryResults = allResults; _showCategoryList = allResults.isNotEmpty; _isSearching = false; }); + if (allResults.isEmpty) { + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); + } } catch (e) { debugPrint('Category search error: $e'); + final isStale = !mounted || requestId != _searchRequestId; + if (isStale) return; setState(() { _mappedResults = []; _allCategoryResults = []; _isSearching = false; }); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); } } @@ -590,6 +632,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // --------------------------------------------------------------------------- void _plotResultsOnMap(List results) { + _dismissCallout(); _graphicsOverlay.graphics.clear(); _mappedResults = results; for (int i = 0; i < results.length; i++) { @@ -641,6 +684,12 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(envelope)); } + /// Dismisses the active map pin callout, if any. + void _dismissCallout() { + _mapViewController.callout.dismiss(); + _graphicsOverlay.clearSelection(); + } + void _seeAllCategoryResults() { final isAllCategoryResultsEmpty = _allCategoryResults.isEmpty; if (isAllCategoryResultsEmpty) return; @@ -648,6 +697,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _selectResult(MapSearchResult result) { + _cancelPendingSearch(); + _dismissCallout(); final isRouteModeActive = _showRouteFields && _activeRouteField != null; if (isRouteModeActive) { final isFromActive = _activeRouteField == 'from'; @@ -727,6 +778,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final isMappedResultsEmpty = _mappedResults.isEmpty; if (isMappedResultsEmpty) { + _dismissCallout(); final isSelectedResultNotNull = _selectedResult != null; if (isSelectedResultNotNull) _closeDetail(); return; @@ -745,8 +797,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final tappedGraphic = identifyResult.graphics.first; final index = tappedGraphic.attributes['resultIndex'] as int?; final isValidResultIndex = index != null && index >= 0 && index < _mappedResults.length; - if (isValidResultIndex) _selectResultFromPin(_mappedResults[index]); + if (isValidResultIndex) _handlePinTap(_mappedResults[index], tappedGraphic); } else { + _dismissCallout(); final isSelectedResultNotNull = _selectedResult != null; if (isSelectedResultNotNull) _closeDetail(); } @@ -755,7 +808,76 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } - void _selectResultFromPin(MapSearchResult result) { + /// Shows a place name above a plotted map pin without changing the search. + void _handlePinTap(MapSearchResult result, Graphic graphic) { + if (_showRouteFields) { + _selectResultFromPin(result); + return; + } + + final isBuilding = result.source == MapSearchSource.building; + final detail = isBuilding ? 'Building' : result.subtitle; + final isDark = Theme.of(context).brightness == Brightness.dark; + _graphicsOverlay.clearSelection(); + graphic.isSelected = true; + _mapViewController.callout.showCalloutForGeoElement( + graphic, + leaderPosition: LeaderPosition.bottom, + style: CalloutStyle( + backgroundColor: isDark ? const Color(0xFF242424) : Colors.white, + borderColor: isDark ? Colors.white24 : Colors.black26, + borderRadius: 12, + borderWidth: 0.5, + contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 9), + minWidth: 96, + maxWidth: 220, + offset: const Offset(0, -10), + ), + contentBuilder: (_, __) => Semantics( + label: detail.isEmpty ? result.name : '${result.name}. $detail', + excludeSemantics: true, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + result.name, + maxLines: 2, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center, + style: TextStyle( + color: isDark ? Colors.white : Colors.black87, + fontSize: 15, + fontWeight: FontWeight.w600, + height: 1.15, + ), + ), + if (detail.isNotEmpty) ...[ + const SizedBox(height: 3), + Text( + detail, + maxLines: 1, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center, + style: TextStyle(color: isDark ? Colors.white70 : Colors.black54, fontSize: 12, height: 1.15), + ), + ], + ], + ), + ), + ); + _selectResultFromPin(result, updateSearchText: false); + } + + void _selectResultFromList(MapSearchResult result) { + final index = _mappedResults.indexOf(result); + if (index < 0 || index >= _graphicsOverlay.graphics.length) { + _selectResultFromPin(result); + return; + } + _handlePinTap(result, _graphicsOverlay.graphics[index]); + } + + void _selectResultFromPin(MapSearchResult result, {bool updateSearchText = true}) { if (_showRouteFields) { final isFromActive = _activeRouteField == 'from'; if (isFromActive) { @@ -800,7 +922,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { setState(() { _selectedResult = result; _lastSelectedResult = result; - _searchController.text = result.name; + if (updateSearchText) _searchController.text = result.name; _showResults = false; _showSuggestions = false; _showCategoryList = false; @@ -810,6 +932,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _closeDetail() { + _dismissCallout(); final canShowCategoryResults = _allCategoryResults.isNotEmpty && !_showRouteFields && !_hasRoute && !_routeFailed; if (canShowCategoryResults) { setState(() { @@ -917,6 +1040,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _clearSearch() { + _cancelPendingSearch(); + _dismissCallout(); _searchController.clear(); _fromController.clear(); _toController.clear(); @@ -934,6 +1059,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mappedResults = []; _allCategoryResults = []; _showResults = false; + _isSearching = false; _showSuggestions = false; _showCategoryList = false; _activeCategory = null; @@ -946,6 +1072,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _clearRoute() { + _cancelPendingSearch(); + _dismissCallout(); _routeGraphicsOverlay.graphics.clear(); final destination = _selectedResult; final isDestinationNotNull = destination != null; @@ -971,6 +1099,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } setState(() { + _isSearching = false; _hasRoute = false; _routeFailed = false; _travelMode = 'Walking'; @@ -1195,6 +1324,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _onFocusChanged() { + _hideSearchOverlayWhenUnfocused(); + if (_focusNode.hasFocus) _dismissCallout(); final isSearchFocusEmpty = _focusNode.hasFocus && _searchController.text.isEmpty; if (isSearchFocusEmpty) { setState(() { @@ -1205,6 +1336,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _onFromFocusChanged() { + _hideSearchOverlayWhenUnfocused(); final hasFromFocus = _fromFocusNode.hasFocus; if (hasFromFocus) { setState(() { @@ -1222,6 +1354,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _onToFocusChanged() { + _hideSearchOverlayWhenUnfocused(); final hasToFocus = _toFocusNode.hasFocus; if (hasToFocus) { setState(() { @@ -1238,6 +1371,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } + void _hideSearchOverlayWhenUnfocused() { + if (_focusNode.hasFocus || _fromFocusNode.hasFocus || _toFocusNode.hasFocus) return; + setState(() { + _showSuggestions = false; + _showResults = false; + }); + } + void _onMapPointerDown(PointerDownEvent _) { if (_showLayersPanel) { setState(() => _showLayersPanel = false); @@ -1274,12 +1415,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final indexedStackIndex = isBuilding3dScene ? 1 : (isDroneViewScene ? 2 : 0); - final isFabVisible = - !keyboardVisible && - !_focusNode.hasFocus && - !_fromFocusNode.hasFocus && - !_toFocusNode.hasFocus && - !_showLayersPanel; + final isFabVisible = !keyboardVisible && !_showLayersPanel; final isLayersPanelVisible = _showLayersPanel && _config != null; @@ -1309,6 +1445,24 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ], ), + // Map controls stay behind search and slide-over panels. + if (isFabVisible) + Positioned( + top: MediaQuery.of(context).padding.top + 68, + right: 16, + child: EsriMapFabCluster( + isDark: isDark, + is3D: _sceneMode != 'default', + mapRotation: _mapRotation, + isLocationActive: _isLocationActive, + isRecenterActive: _isRecenterActive, + onShowLayersPanel: () => setState(() => _showLayersPanel = true), + onRecenterOnView: _recenterOnView, + onRecenterOnUser: _recenterOnUser, + onSnapToNorth: _snapToNorth, + ), + ), + // Floating top search bar & suggestion panel if (FeatureFlags.mapSearchEnabled && isDefaultScene) Positioned( @@ -1331,7 +1485,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { isSearching: _isSearching, searchResults: _searchResults, matchingPoiClasses: _matchingPoiClasses, - onPerformSearch: _performSearch, + onPerformSearch: _queueSearch, onPerformClassSearch: _performClassSearch, onSelectResult: _selectResult, onClearSearch: _clearSearch, @@ -1390,14 +1544,18 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final isLongEnough = text.length >= 3; final isTextEmpty = text.isEmpty; if (isLongEnough) { - _performSearch(text); + _queueSearch(text); } else if (isTextEmpty) { + _cancelPendingSearch(); setState(() { + _isSearching = false; _showResults = false; _showSuggestions = true; }); } else { + _cancelPendingSearch(); setState(() { + _isSearching = false; _showResults = false; _showSuggestions = false; }); @@ -1407,27 +1565,41 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final isLongEnough = text.length >= 3; final isTextEmpty = text.isEmpty; if (isLongEnough) { - _performSearch(text); + _queueSearch(text); } else if (isTextEmpty) { + _cancelPendingSearch(); setState(() { + _isSearching = false; _showResults = false; _showSuggestions = true; }); } else { + _cancelPendingSearch(); setState(() { + _isSearching = false; _showResults = false; _showSuggestions = false; }); } }, onClearFromField: () { + _cancelPendingSearch(); _fromController.clear(); _fromLatLng = null; - setState(() => _showSuggestions = true); + setState(() { + _isSearching = false; + _showResults = false; + _showSuggestions = true; + }); }, onClearToField: () { + _cancelPendingSearch(); _toController.clear(); - setState(() => _showSuggestions = true); + setState(() { + _isSearching = false; + _showResults = false; + _showSuggestions = true; + }); }, onOpenAiSearch: () => showModalBottomSheet( context: context, @@ -1471,6 +1643,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { onSelectCategory: _performCategorySearch, onSelectRecent: _selectResult, onRemoveRecent: _removeFromRecentSearches, + onClearRecent: _clearRecentSearches, ), ), ], @@ -1487,64 +1660,49 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { userLocation: _getUserLatLng(), onClearSearch: _clearSearch, onSeeAllResults: _seeAllCategoryResults, - onSelectResult: _selectResultFromPin, + onSelectResult: _selectResultFromList, iconForResult: _iconForResult, ), // Selected Result Detail Slide-over if (_selectedResult != null) - EsriMapDetailSlideOver( - controller: _detailSheetController, - result: _selectedResult!, - resultIcon: _iconForResult(_selectedResult!), - isRoutingMode: _isRouting, - hasRoute: _hasRoute, - routeFailed: _routeFailed, - travelMode: _travelMode, - routeTravelTimeMinutes: _routeTravelTimeMinutes, - routeManeuvers: _routeManeuvers, - fromLatLng: _fromLatLng, - onGetDirections: (res) { - final gps = _getUserLatLng(); - final hasGps = gps != null; - _fromController.text = hasGps ? 'My Location' : ''; - _toController.text = res.name; - _routeDestination = res; - _graphicsOverlay.graphics.clear(); - setState(() { - _showRouteFields = true; - _selectedResult = null; - _mappedResults = []; - _allCategoryResults = []; - _showCategoryList = false; - _activeCategory = null; - }); - _solveRoute(res); - }, - onTravelModeChanged: (mode) { - final hasSelectedResult = _selectedResult != null; - if (hasSelectedResult) _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); - }, - onLaunchWebsite: _launchWebsite, - onClose: _closeDetail, - onClearRoute: _clearRoute, - ), - - // Top-right FAB cluster (Compass, Recenter, Location, Layers) - if (isFabVisible) - Positioned( - top: MediaQuery.of(context).padding.top + 68, - right: 16, - child: EsriMapFabCluster( - isDark: isDark, - is3D: _sceneMode != 'default', - mapRotation: _mapRotation, - isLocationActive: _isLocationActive, - isRecenterActive: _isRecenterActive, - onShowLayersPanel: () => setState(() => _showLayersPanel = true), - onRecenterOnView: _recenterOnView, - onRecenterOnUser: _recenterOnUser, - onSnapToNorth: _snapToNorth, + LayoutBuilder( + builder: (context, constraints) => EsriMapDetailSlideOver( + controller: _detailSheetController, + availableHeight: constraints.maxHeight, + result: _selectedResult!, + resultIcon: _iconForResult(_selectedResult!), + isRoutingMode: _isRouting, + hasRoute: _hasRoute, + routeFailed: _routeFailed, + travelMode: _travelMode, + routeTravelTimeMinutes: _routeTravelTimeMinutes, + routeManeuvers: _routeManeuvers, + fromLatLng: _fromLatLng, + onGetDirections: (res) { + final gps = _getUserLatLng(); + final hasGps = gps != null; + _fromController.text = hasGps ? 'My Location' : ''; + _toController.text = res.name; + _routeDestination = res; + _graphicsOverlay.graphics.clear(); + setState(() { + _showRouteFields = true; + _selectedResult = null; + _mappedResults = []; + _allCategoryResults = []; + _showCategoryList = false; + _activeCategory = null; + }); + _solveRoute(res); + }, + onTravelModeChanged: (mode) { + final hasSelectedResult = _selectedResult != null; + if (hasSelectedResult) _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); + }, + onLaunchWebsite: _launchWebsite, + onClose: _closeDetail, + onClearRoute: _clearRoute, ), ), diff --git a/test/ui/esrimap/esrimap_detail_slide_over_test.dart b/test/ui/esrimap/esrimap_detail_slide_over_test.dart new file mode 100644 index 000000000..3a50da08e --- /dev/null +++ b/test/ui/esrimap/esrimap_detail_slide_over_test.dart @@ -0,0 +1,61 @@ +import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('detail sheet expands only as far as its content requires', (tester) async { + tester.view.physicalSize = const Size(320, 500); + tester.view.devicePixelRatio = 1; + addTearDown(tester.view.resetPhysicalSize); + addTearDown(tester.view.resetDevicePixelRatio); + + Future pumpDetail(String description) async { + await tester.pumpWidget( + MaterialApp( + home: Scaffold( + body: EsriMapDetailSlideOver( + controller: DraggableScrollableController(), + availableHeight: 500, + result: MapSearchResult( + name: 'Test place', + subtitle: 'Campus place', + latitude: 0, + longitude: 0, + source: MapSearchSource.poi, + description: description, + websiteUrl: 'https://blink.ucsd.edu/facilities/services/general/personal/dining.html', + ), + resultIcon: Icons.place, + isRoutingMode: false, + hasRoute: false, + routeFailed: false, + travelMode: 'Walking', + routeTravelTimeMinutes: 0, + routeManeuvers: const [], + fromLatLng: null, + onGetDirections: (_) {}, + onTravelModeChanged: (_) {}, + onLaunchWebsite: (_) {}, + onClose: () {}, + onClearRoute: () {}, + ), + ), + ), + ); + } + + await pumpDetail('A short description.'); + expect(tester.widget(find.byType(DraggableScrollableSheet)).maxChildSize, lessThan(1)); + expect(find.text('Visit blink.ucsd.edu'), findsOneWidget); + + final longDescription = List.filled( + 30, + 'This longer place description remains readable when the information sheet is expanded.', + ).join(' '); + await pumpDetail(longDescription); + + expect(tester.widget(find.byType(DraggableScrollableSheet)).maxChildSize, 1); + expect(tester.widget(find.text(longDescription)).maxLines, isNull); + }); +} diff --git a/test/ui/esrimap/esrimap_suggestions_panel_test.dart b/test/ui/esrimap/esrimap_suggestions_panel_test.dart new file mode 100644 index 000000000..7ec36b7c0 --- /dev/null +++ b/test/ui/esrimap/esrimap_suggestions_panel_test.dart @@ -0,0 +1,69 @@ +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_search_category.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('quick search and recent controls invoke their callbacks', (tester) async { + tester.view.physicalSize = const Size(320, 640); + tester.view.devicePixelRatio = 1; + addTearDown(tester.view.resetPhysicalSize); + addTearDown(tester.view.resetDevicePixelRatio); + + const category = EsriSearchCategory(label: 'Dining', icon: Icons.restaurant, poiClassValue: 'Dining and Beverage'); + const categories = [ + category, + EsriSearchCategory(label: 'Library', icon: Icons.menu_book, poiClassValue: 'Library'), + EsriSearchCategory(label: 'Parking', icon: Icons.local_parking, poiClassValue: 'Parking'), + EsriSearchCategory(label: 'Recreation', icon: Icons.fitness_center, poiClassValue: 'Recreation Facilities'), + ]; + const recent = MapSearchResult( + name: 'Starbucks', + subtitle: 'Dining and Beverage', + latitude: 32.880184, + longitude: -117.23642, + source: MapSearchSource.poi, + ); + EsriSearchCategory? selectedCategory; + MapSearchResult? selectedRecent; + int? removedIndex; + var clearCount = 0; + + await tester.pumpWidget( + MaterialApp( + home: Scaffold( + body: EsriMapSuggestionsPanel( + categories: categories, + recentSearches: const [recent], + showRouteFields: false, + activeRouteField: null, + onSelectCurrentLocation: () {}, + onSelectCategory: (value) => selectedCategory = value, + onSelectRecent: (value) => selectedRecent = value, + onRemoveRecent: (index) => removedIndex = index, + onClearRecent: () => clearCount++, + ), + ), + ), + ); + + await tester.tap(find.byTooltip('Search Dining')); + expect(selectedCategory, same(category)); + expect(find.byType(ListView), findsNothing); + expect( + tester.getRect(find.byTooltip('Search Recreation')).right, + lessThanOrEqualTo(tester.getRect(find.byType(Scaffold)).right), + ); + + await tester.ensureVisible(find.text('Starbucks')); + await tester.tap(find.text('Starbucks')); + expect(selectedRecent, same(recent)); + + await tester.tap(find.byTooltip('Remove Starbucks from recents')); + expect(removedIndex, 0); + + await tester.tap(find.text('Clear')); + expect(clearCount, 1); + }); +} From 24a2f6bd5f9b74bfff5627fa4c663fbef7bea72b Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Thu, 30 Jul 2026 08:32:44 -0700 Subject: [PATCH 044/139] fixed existing bug of "Current Location" not working from the starting location when Navigating --- lib/ui/esrimap/esrimap.dart | 166 ++++++++++++++++++++++-------------- 1 file changed, 104 insertions(+), 62 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 03aae68c1..f8641f249 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1201,31 +1201,34 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ); final isRouteResNull = routeRes == null; - if (isRouteResNull) { - if (mounted) { - setState(() { - _isRouting = false; - _routeFailed = true; - _showRouteFields = true; - _selectedResult = destination; - _lastSelectedResult = destination; - }); - } - return; + if (!isRouteResNull) { + _routeTravelTimeMinutes = routeRes.travelTimeMinutes; + _routeManeuvers = routeRes.directionManeuvers; } - _routeTravelTimeMinutes = routeRes.travelTimeMinutes; - _routeManeuvers = routeRes.directionManeuvers; - _routeGraphicsOverlay.graphics.clear(); - final hasRouteGeometry = routeRes.routeGeometry != null; - if (hasRouteGeometry) { + + if (isRouteResNull) { + final builder = PolylineBuilder(spatialReference: SpatialReference.wgs84); + builder.addPoint(ArcGISPoint(x: userLatLng.$2, y: userLatLng.$1, spatialReference: SpatialReference.wgs84)); + builder.addPoint(ArcGISPoint(x: destination.longitude, y: destination.latitude, spatialReference: SpatialReference.wgs84)); + _routeGraphicsOverlay.graphics.add( Graphic( - geometry: routeRes.routeGeometry!, - symbol: SimpleLineSymbol(style: SimpleLineSymbolStyle.solid, color: Colors.blue, width: 4), + geometry: builder.toGeometry(), + symbol: SimpleLineSymbol(style: SimpleLineSymbolStyle.dash, color: Colors.blue, width: 3), ), ); + } else { + final hasRouteGeometry = routeRes.routeGeometry != null; + if (hasRouteGeometry) { + _routeGraphicsOverlay.graphics.add( + Graphic( + geometry: routeRes.routeGeometry!, + symbol: SimpleLineSymbol(style: SimpleLineSymbolStyle.solid, color: Colors.blue, width: 4), + ), + ); + } } final whiteOutline = SimpleLineSymbol(style: SimpleLineSymbolStyle.solid, color: Colors.white, width: 2); @@ -1247,46 +1250,62 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { symbol: TextSymbol(text: 'Destination', color: Colors.black, size: 14) ..haloColor = Colors.white ..haloWidth = 2 - ..offsetY = -15, // Negative offsetY usually moves text up + ..offsetY = -15, ), ); - final hasOriginLatLng = originLatLng != null; - if (hasOriginLatLng) { - final originPoint = ArcGISPoint(x: originLatLng.$2, y: originLatLng.$1, spatialReference: SpatialReference.wgs84); - _routeGraphicsOverlay.graphics.add( - Graphic( - geometry: originPoint, - symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.green, size: 12) - ..outline = whiteOutline, - ), - ); - _routeGraphicsOverlay.graphics.add( - Graphic( - geometry: originPoint, - symbol: TextSymbol(text: 'Start', color: Colors.black, size: 14) - ..haloColor = Colors.white - ..haloWidth = 2 - ..offsetY = -15, - ), + final originPoint = ArcGISPoint(x: userLatLng.$2, y: userLatLng.$1, spatialReference: SpatialReference.wgs84); + _routeGraphicsOverlay.graphics.add( + Graphic( + geometry: originPoint, + symbol: SimpleMarkerSymbol(style: SimpleMarkerSymbolStyle.circle, color: Colors.green, size: 12) + ..outline = whiteOutline, + ), + ); + _routeGraphicsOverlay.graphics.add( + Graphic( + geometry: originPoint, + symbol: TextSymbol(text: 'Start', color: Colors.black, size: 14) + ..haloColor = Colors.white + ..haloWidth = 2 + ..offsetY = -15, + ), + ); + + if (isRouteResNull) { + final builder = PolylineBuilder(spatialReference: SpatialReference.wgs84); + builder.addPoint(originPoint); + builder.addPoint(destPoint); + final extent = builder.toGeometry().extent; + final padded = Envelope.fromXY( + xMin: extent.xMin - 0.005, + yMin: extent.yMin - 0.005, + xMax: extent.xMax + 0.005, + yMax: extent.yMax + 0.005, + spatialReference: SpatialReference.wgs84, ); + _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(padded)); + } else { + final hasPaddedExtent = routeRes.paddedExtent != null; + if (hasPaddedExtent) _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(routeRes.paddedExtent!)); } - final hasPaddedExtent = routeRes.paddedExtent != null; - if (hasPaddedExtent) _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(routeRes.paddedExtent!)); - _graphicsOverlay.graphics.clear(); _mappedResults = []; _allCategoryResults = []; - setState(() { - _isRouting = false; - _hasRoute = true; - _showCategoryList = false; - _activeCategory = null; - _selectedResult = destination; - _lastSelectedResult = destination; - }); + if (mounted) { + setState(() { + _isRouting = false; + _routeFailed = isRouteResNull; + _hasRoute = !isRouteResNull; + _showRouteFields = true; + _showCategoryList = false; + _activeCategory = null; + _selectedResult = destination; + _lastSelectedResult = destination; + }); + } } // --------------------------------------------------------------------------- @@ -1409,11 +1428,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _onFocusChanged() { - final isSearchFocusEmpty = _focusNode.hasFocus && _searchController.text.isEmpty; - if (isSearchFocusEmpty) { + final hasFocus = _focusNode.hasFocus; + if (hasFocus) { setState(() { - _showSuggestions = true; - _showResults = false; + _isTransitLegendMinimized = true; + if (_searchController.text.isEmpty) { + _showSuggestions = true; + _showResults = false; + } }); } } @@ -1422,6 +1444,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final hasFromFocus = _fromFocusNode.hasFocus; if (hasFromFocus) { setState(() { + _isTransitLegendMinimized = true; _activeRouteField = 'from'; final isFromEmpty = _fromController.text.isEmpty; if (isFromEmpty) { @@ -1439,6 +1462,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final hasToFocus = _toFocusNode.hasFocus; if (hasToFocus) { setState(() { + _isTransitLegendMinimized = true; _activeRouteField = 'to'; final isToEmpty = _toController.text.isEmpty; if (isToEmpty) { @@ -1727,16 +1751,33 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { recentSearches: _recentSearches, showRouteFields: _showRouteFields, activeRouteField: _activeRouteField, - onSelectCurrentLocation: () { - final gps = _getUserLatLng(); - final isGpsNull = gps == null; - if (isGpsNull) return; + onSelectCurrentLocation: () async { + await _startLocationDisplay(); + (double, double)? gps = _getUserLatLng(); + if (gps == null) { + try { + final pos = await Geolocator.getCurrentPosition( + locationSettings: const LocationSettings(timeLimit: Duration(seconds: 10)), + ); + gps = (pos.latitude, pos.longitude); + } catch (_) {} + } + if (gps == null) { + if (mounted) { + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar(content: Text('Unable to get your current location.')), + ); + } + return; + } _fromController.text = 'My Location'; _fromLatLng = gps; - setState(() { - _showSuggestions = false; - _showResults = false; - }); + if (mounted) { + setState(() { + _showSuggestions = false; + _showResults = false; + }); + } _fromFocusNode.unfocus(); final hasRouteDestination = _routeDestination != null; if (hasRouteDestination) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); @@ -1764,6 +1805,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { iconForResult: _iconForResult, ), + // Transit Legend + if (_layerVisible['tritonTransit'] == true) Positioned(bottom: 24, left: 16, child: _buildTransitLegend()), + // Selected Result Detail Slide-over if (_selectedResult != null) EsriMapDetailSlideOver( @@ -1821,8 +1865,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), ), - // Transit Legend - if (_layerVisible['tritonTransit'] == true) Positioned(bottom: 24, left: 16, child: _buildTransitLegend()), // Basemap & Operational Layer Selector Panel if (isLayersPanelVisible) From 858cdf27665c92d7e5aa70344c797d0c3b3cb733 Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Thu, 30 Jul 2026 15:44:45 +0000 Subject: [PATCH 045/139] style: auto fix formatting violations --- lib/ui/esrimap/esrimap.dart | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index f8641f249..2f94ce35f 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1158,16 +1158,16 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Future _solveRoute(MapSearchResult destination, {String? travelMode, (double, double)? originLatLng}) async { if (!FeatureFlags.mapRoutingEnabled) return; - if (originLatLng == null && _getUserLatLng() == null) { - await _startLocationDisplay(); - } + if (originLatLng == null && _getUserLatLng() == null) await _startLocationDisplay(); var userLatLng = originLatLng ?? _getUserLatLng(); if (userLatLng == null && await Geolocator.isLocationServiceEnabled()) { final permission = await Geolocator.checkPermission(); if (permission == LocationPermission.whileInUse || permission == LocationPermission.always) { try { - final loc = await Geolocator.getCurrentPosition(locationSettings: const LocationSettings(timeLimit: Duration(seconds: 3))); + final loc = await Geolocator.getCurrentPosition( + locationSettings: const LocationSettings(timeLimit: Duration(seconds: 3)), + ); userLatLng = (loc.latitude, loc.longitude); } catch (_) {} } @@ -1207,12 +1207,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } _routeGraphicsOverlay.graphics.clear(); - + if (isRouteResNull) { final builder = PolylineBuilder(spatialReference: SpatialReference.wgs84); builder.addPoint(ArcGISPoint(x: userLatLng.$2, y: userLatLng.$1, spatialReference: SpatialReference.wgs84)); - builder.addPoint(ArcGISPoint(x: destination.longitude, y: destination.latitude, spatialReference: SpatialReference.wgs84)); - + builder.addPoint( + ArcGISPoint(x: destination.longitude, y: destination.latitude, spatialReference: SpatialReference.wgs84), + ); + _routeGraphicsOverlay.graphics.add( Graphic( geometry: builder.toGeometry(), @@ -1269,7 +1271,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ..haloColor = Colors.white ..haloWidth = 2 ..offsetY = -15, - ), + ), ); if (isRouteResNull) { @@ -1764,9 +1766,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } if (gps == null) { if (mounted) { - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar(content: Text('Unable to get your current location.')), - ); + ScaffoldMessenger.of( + context, + ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } @@ -1865,7 +1867,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), ), - // Basemap & Operational Layer Selector Panel if (isLayersPanelVisible) EsriMapLayersPanel( From bfa81a02339d37f419acf32c78909280da5be61a Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Thu, 30 Jul 2026 10:27:23 -0700 Subject: [PATCH 046/139] added search history up to 10 items --- .../esrimap_suggestions_panel.dart | 138 ++++++++++++------ lib/ui/esrimap/esrimap.dart | 17 ++- 2 files changed, 101 insertions(+), 54 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart index 595a198a8..b46ea3e1d 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart @@ -8,36 +8,17 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_s import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; import 'package:flutter/material.dart'; -/// Suggestions panel widget rendered below the search bar when focused. -class EsriMapSuggestionsPanel extends StatelessWidget { - /// List of category items to display as icon chips. +class EsriMapSuggestionsPanel extends StatefulWidget { final List categories; - - /// List of recently viewed search results. final List recentSearches; - - /// Whether route directions fields are currently active. final bool showRouteFields; - - /// Which route field is active ('from' or 'to'). final String? activeRouteField; - - /// Callback when "Current Location" option is tapped in routing mode. final VoidCallback onSelectCurrentLocation; - - /// Callback when a category chip is selected. final void Function(EsriSearchCategory category) onSelectCategory; - - /// Callback when a recent search item is tapped. final void Function(MapSearchResult result) onSelectRecent; - - /// Callback when the clear 'X' button on a recent search item is tapped. final void Function(int index) onRemoveRecent; - - /// Callback when all recent searches are cleared. final VoidCallback onClearRecent; - /// Constructs an [EsriMapSuggestionsPanel] instance. const EsriMapSuggestionsPanel({ Key? key, required this.categories, @@ -51,11 +32,18 @@ class EsriMapSuggestionsPanel extends StatelessWidget { required this.onClearRecent, }) : super(key: key); + @override + State createState() => _EsriMapSuggestionsPanelState(); +} + +class _EsriMapSuggestionsPanelState extends State { + bool _isHistoryExpanded = false; + @override Widget build(BuildContext context) { final isDark = Theme.of(context).brightness == Brightness.dark; final bgColor = isDark ? Colors.grey[850] : Colors.white; - final isFromRouteFieldActive = showRouteFields && activeRouteField == 'from'; + final isFromRouteFieldActive = widget.showRouteFields && widget.activeRouteField == 'from'; final topPadding = isFromRouteFieldActive ? 0.0 : 12.0; final availableHeight = MediaQuery.sizeOf(context).height - MediaQuery.viewInsetsOf(context).bottom; @@ -87,12 +75,12 @@ class EsriMapSuggestionsPanel extends StatelessWidget { color: isDark ? Colors.white : Theme.of(context).colorScheme.primary, ), ), - onTap: onSelectCurrentLocation, + onTap: widget.onSelectCurrentLocation, ), const Divider(height: 1), const SizedBox(height: 12), ], - if (categories.isNotEmpty) ...[ + if (widget.categories.isNotEmpty) ...[ Padding( padding: const EdgeInsets.symmetric(horizontal: 16), child: Text( @@ -110,12 +98,12 @@ class EsriMapSuggestionsPanel extends StatelessWidget { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - for (final category in categories) Expanded(child: _buildCategoryChip(context, category)), + for (final category in widget.categories) Expanded(child: _buildCategoryChip(context, category)), ], ), ), ], - if (recentSearches.isNotEmpty) ...[ + if (widget.recentSearches.isNotEmpty) ...[ const SizedBox(height: 12), const Divider(height: 1), Padding( @@ -132,30 +120,17 @@ class EsriMapSuggestionsPanel extends StatelessWidget { ), ), ), - TextButton(onPressed: onClearRecent, child: const Text('Clear')), + TextButton( + onPressed: widget.onClearRecent, + style: TextButton.styleFrom( + foregroundColor: isDark ? Colors.grey[400] : Colors.grey[600], + ), + child: const Text('Clear'), + ), ], ), ), - ...List.generate(recentSearches.length, (index) { - final recent = recentSearches[index]; - final subtitle = recent.address.isNotEmpty ? recent.address : recent.subtitle; - return ListTile( - contentPadding: const EdgeInsets.only(left: 16, right: 4), - leading: CircleAvatar( - radius: 18, - backgroundColor: isDark ? Colors.grey[800] : Colors.grey[100], - child: Icon(Icons.history, size: 19, color: isDark ? Colors.grey[400] : Colors.grey[600]), - ), - title: Text(recent.name, maxLines: 1, overflow: TextOverflow.ellipsis), - subtitle: subtitle.isEmpty ? null : Text(subtitle, maxLines: 1, overflow: TextOverflow.ellipsis), - trailing: IconButton( - tooltip: 'Remove ${recent.name} from recents', - onPressed: () => onRemoveRecent(index), - icon: Icon(Icons.close, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), - ), - onTap: () => onSelectRecent(recent), - ); - }), + _buildRecentSearchesList(isDark), ], ], ), @@ -164,14 +139,80 @@ class EsriMapSuggestionsPanel extends StatelessWidget { ); } - /// Builds a single quick-search category icon. + Widget _buildRecentSearchesList(bool isDark) { + final maxTotal = widget.recentSearches.length > 10 ? 10 : widget.recentSearches.length; + final displayCount = _isHistoryExpanded ? maxTotal : (maxTotal > 2 ? 2 : maxTotal); + + // ListTile height is approximately 64. 5 items = 320. + final double listHeight = _isHistoryExpanded && maxTotal > 5 ? (5 * 64.0) : (displayCount * 64.0); + + return Column( + children: [ + ConstrainedBox( + constraints: BoxConstraints(maxHeight: listHeight), + child: ListView.builder( + padding: EdgeInsets.zero, + physics: _isHistoryExpanded ? const ClampingScrollPhysics() : const NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: displayCount, + itemBuilder: (context, index) { + final recent = widget.recentSearches[index]; + final subtitle = recent.address.isNotEmpty ? recent.address : recent.subtitle; + return SizedBox( + height: 64, + child: ListTile( + contentPadding: const EdgeInsets.only(left: 16, right: 4), + leading: CircleAvatar( + radius: 16, + backgroundColor: isDark ? Colors.grey[800] : Colors.grey[100], + child: Icon(Icons.history, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), + ), + title: Text( + recent.name, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle(fontSize: 14, color: isDark ? Colors.white : Colors.black87), + ), + subtitle: subtitle.isEmpty ? null : Text( + subtitle, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle(fontSize: 12, color: isDark ? Colors.grey[400] : Colors.grey[600]), + ), + trailing: IconButton( + tooltip: 'Remove ${recent.name} from recents', + onPressed: () => widget.onRemoveRecent(index), + icon: Icon(Icons.close, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), + ), + onTap: () => widget.onSelectRecent(recent), + ), + ); + }, + ), + ), + if (maxTotal > 2) + TextButton( + style: TextButton.styleFrom( + foregroundColor: isDark ? Colors.grey[400] : Colors.grey[600], + ), + onPressed: () { + setState(() { + _isHistoryExpanded = !_isHistoryExpanded; + }); + }, + child: Text(_isHistoryExpanded ? 'Show Less' : 'Show More'), + ), + ], + ); + } + Widget _buildCategoryChip(BuildContext context, EsriSearchCategory category) { final isDark = Theme.of(context).brightness == Brightness.dark; return Tooltip( message: 'Search ${category.label}', child: GestureDetector( - onTap: () => onSelectCategory(category), + onTap: () => widget.onSelectCategory(category), child: Column( mainAxisSize: MainAxisSize.min, children: [ @@ -195,3 +236,4 @@ class EsriMapSuggestionsPanel extends StatelessWidget { ); } } + diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 6d7653549..2aec8e019 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1560,16 +1560,19 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { void _onFocusChanged() { _hideSearchOverlayWhenUnfocused(); - if (_focusNode.hasFocus) _dismissCallout(); - final isSearchFocusEmpty = _focusNode.hasFocus && _searchController.text.isEmpty; - if (isSearchFocusEmpty) { + if (_focusNode.hasFocus) { + _dismissCallout(); setState(() { + _showLayersPanel = false; _isTransitLegendMinimized = true; - if (_searchController.text.isEmpty) { + }); + final isSearchFocusEmpty = _searchController.text.isEmpty; + if (isSearchFocusEmpty) { + setState(() { _showSuggestions = true; _showResults = false; - } - }); + }); + } } } @@ -1578,6 +1581,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final hasFromFocus = _fromFocusNode.hasFocus; if (hasFromFocus) { setState(() { + _showLayersPanel = false; _isTransitLegendMinimized = true; _activeRouteField = 'from'; final isFromEmpty = _fromController.text.isEmpty; @@ -1597,6 +1601,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final hasToFocus = _toFocusNode.hasFocus; if (hasToFocus) { setState(() { + _showLayersPanel = false; _isTransitLegendMinimized = true; _activeRouteField = 'to'; final isToEmpty = _toController.text.isEmpty; From 53abd01c0d67c6101715f0a015395d117d1867ad Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Thu, 30 Jul 2026 10:38:14 -0700 Subject: [PATCH 047/139] fixed location details formatting --- .../esrimap_detail_slide_over.dart | 44 ++++++++++++++----- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index c052268b3..a0c9c5964 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -214,25 +214,36 @@ class EsriMapDetailSlideOver extends StatelessWidget { final isRouting = isRoutingMode || hasRoute || routeFailed; final isBuilding = result.source == MapSearchSource.building; - final detailText = isBuilding ? result.address : result.description; + String detailText = isBuilding ? result.address : result.description; + + // Format the detail text nicely + if (!isBuilding) { + // Remove any URLs from the description since we have a dedicated button + detailText = detailText.replaceAll(RegExp(r'https?://[^\s]+'), ''); + // Add a space after a period if it is immediately followed by a letter + detailText = detailText.replaceAllMapped(RegExp(r'\.([A-Za-z])'), (m) => '. ${m.group(1)}'); + detailText = detailText.trim(); + } + final categoryLabel = isBuilding ? 'Building' : result.subtitle; - // Content-aware sheet sizing - double contentEst = isRouting ? 230 : 198; + // Content-aware sheet sizing (added 80 for bottom nav bar padding) + double contentEst = (isRouting ? 230 : 198) + 80; if (!isRouting && detailText.isNotEmpty) { final detailTextPainter = TextPainter( - text: TextSpan(text: detailText, style: const TextStyle(fontSize: 16)), + text: TextSpan(text: detailText, style: const TextStyle(fontSize: 15)), textDirection: Directionality.of(context), textScaler: MediaQuery.textScalerOf(context), )..layout(maxWidth: MediaQuery.sizeOf(context).width - 40); - contentEst += 8 + detailTextPainter.height; + contentEst += 16 + detailTextPainter.height; } final hasRouteManeuvers = hasRoute && routeManeuvers.isNotEmpty; if (hasRouteManeuvers) contentEst += routeManeuvers.length * 52.0; final contentFraction = (contentEst / availableHeight).clamp(0.15, 1.0); final initialSize = hasRoute ? 0.35 : (contentFraction < 0.30 ? contentFraction : 0.30); - final maxSize = contentFraction.clamp(initialSize, 1.0); + // Allow the sheet to be dragged up past its initial content size to prevent it from getting stuck + final maxSize = isRouting ? 1.0 : (contentFraction < 0.6 ? 0.6 : contentFraction.clamp(0.6, 1.0)); final snaps = [0.15]; final isInitialLarger = initialSize > 0.15 + 0.01; if (isInitialLarger) snaps.add(initialSize); @@ -291,18 +302,26 @@ class EsriMapDetailSlideOver extends StatelessWidget { if (!isRouting) Text( categoryLabel, - style: TextStyle(fontSize: 14, color: isDark ? Colors.grey[400] : Colors.grey[600]), + style: TextStyle( + fontSize: 17, + fontWeight: FontWeight.w600, + color: isDark ? Colors.white : Colors.black87, + ), ), // Detail description text (hidden in routing mode) if (shouldShowDetailText) ...[ - const SizedBox(height: 8), + const SizedBox(height: 10), Text( detailText, - style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[400] : Colors.grey[600]), + style: TextStyle( + fontSize: 15, + height: 1.4, + color: isDark ? Colors.grey[300] : Colors.grey[700], + ), ), ], - if (!isRouting) const SizedBox(height: 16), + if (!isRouting) const SizedBox(height: 20), // Routing or Action Buttons if (routeFailed) ...[ @@ -451,11 +470,14 @@ class EsriMapDetailSlideOver extends StatelessWidget { : null, dense: true, ), - if (isNotLastManeuver) const Divider(height: 1), + if (isNotLastManeuver) const Divider(height: 1, indent: 56), ], ); }, childCount: routeManeuvers.length), ), + + // Bottom padding for navigation bar + const SliverToBoxAdapter(child: SizedBox(height: 80)), ], ); }, From bf7d5a13388377c56399afcb384ac0659ee7a869 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Thu, 30 Jul 2026 11:21:17 -0700 Subject: [PATCH 048/139] added collapsible UI for the location details, removing the unstable drag UI --- .../esrimap_detail_slide_over.dart | 674 +++++++++--------- lib/ui/esrimap/esrimap.dart | 25 +- 2 files changed, 364 insertions(+), 335 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index a0c9c5964..b16f150b5 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -1,53 +1,10 @@ -/// ============================================================================ -/// File: esrimap_detail_slide_over.dart -/// Description: Draggable slide-over sheet displaying building/POI details, -/// travel time, navigation buttons, and turn-by-turn directions. -/// ============================================================================ - import 'package:arcgis_maps/arcgis_maps.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; import 'package:campus_mobile_experimental/core/utils/esri_map_feature_flags.dart'; import 'package:flutter/material.dart'; -/// Persistent header delegate for pinned slide-over bottom sheet headers. -class SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { - /// Header widget content. - final Widget child; - - /// Fixed height of the persistent header. - final double height; - - /// Background color matching dark/light mode. - final Color backgroundColor; - - /// Constructs a [SlideOverHeaderDelegate] instance. - SlideOverHeaderDelegate({required this.child, required this.height, required this.backgroundColor}); - - @override - double get minExtent => height; - - @override - double get maxExtent => height; - - @override - Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) { - final isTopPositioned = shrinkOffset == 0; - return Container( - height: height, - decoration: BoxDecoration( - color: backgroundColor, - borderRadius: isTopPositioned ? const BorderRadius.vertical(top: Radius.circular(16)) : null, - ), - child: child, - ); - } - @override - bool shouldRebuild(covariant SlideOverHeaderDelegate oldDelegate) => - child != oldDelegate.child || height != oldDelegate.height || backgroundColor != oldDelegate.backgroundColor; -} -/// Helper function building a consistent DraggableScrollableSheet template with a pinned header. Widget buildSlideOverContent({ required BuildContext context, required ScrollController scrollController, @@ -78,7 +35,6 @@ Widget buildSlideOverContent({ backgroundColor: bgColor, child: Column( children: [ - // Drag handle bar Padding( padding: const EdgeInsets.only(top: 10, bottom: 4), child: Container( @@ -90,7 +46,6 @@ Widget buildSlideOverContent({ ), ), ), - // Header title row with icon & close button Padding( padding: const EdgeInsets.fromLTRB(20, 6, 20, 8), child: Row( @@ -129,7 +84,6 @@ Widget buildSlideOverContent({ ), ), ), - // Divider below header const SliverToBoxAdapter(child: Divider(height: 1)), ...sliverBody, ], @@ -137,60 +91,152 @@ Widget buildSlideOverContent({ ); } -/// Slide-over drawer widget presenting location details, route options, and maneuvers. -class EsriMapDetailSlideOver extends StatelessWidget { - /// Controller for managing sheet drag height. - final DraggableScrollableController controller; +/// ============================================================================ +/// File: esrimap_detail_slide_over.dart +/// Description: Draggable slide-over sheet displaying building/POI details, +/// travel time, navigation buttons, and turn-by-turn directions. +/// ============================================================================ - /// Height available to the sheet above the app's bottom navigation. - final double availableHeight; - /// Selected location search result. - final MapSearchResult result; +/// Persistent header delegate for pinned slide-over bottom sheet headers. +class SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { + /// Header widget content. + final Widget child; - /// Icon visual representation for the location. - final IconData resultIcon; + /// Fixed height of the persistent header. + final double height; - /// Whether routing or direction mode is active. - final bool isRoutingMode; + /// Background color matching dark/light mode. + final Color backgroundColor; - /// Whether a calculated route is currently active. - final bool hasRoute; + /// Constructs a [SlideOverHeaderDelegate] instance. + SlideOverHeaderDelegate({required this.child, required this.height, required this.backgroundColor}); - /// Whether route calculation failed. - final bool routeFailed; + @override + double get minExtent => height; - /// Selected travel mode (e.g. 'Walking', 'Accessible'). - final String travelMode; + @override + double get maxExtent => height; - /// Estimated route travel duration in minutes. - final double routeTravelTimeMinutes; + @override + Widget build(BuildContext context, double shrinkOffset, bool overlapsContent) { + final isTopPositioned = shrinkOffset == 0; + return Container( + height: height, + decoration: BoxDecoration( + color: backgroundColor, + borderRadius: isTopPositioned ? const BorderRadius.vertical(top: Radius.circular(16)) : null, + ), + child: child, + ); + } - /// Turn-by-turn direction maneuvers. - final List routeManeuvers; + @override + bool shouldRebuild(covariant SlideOverHeaderDelegate oldDelegate) => + child != oldDelegate.child || height != oldDelegate.height || backgroundColor != oldDelegate.backgroundColor; +} - /// Origin coordinates for route navigation, if custom. - final (double, double)? fromLatLng; +/// Helper function building a consistent DraggableScrollableSheet template with a pinned header. +Widget buildDetailSlideOverContent({ + required BuildContext context, + required String headerTitle, + IconData? headerIcon, + required VoidCallback onClose, + required VoidCallback onToggle, + required bool isMinimized, + Widget? trailing, + required List sliverBody, +}) { + final isDark = Theme.of(context).brightness == Brightness.dark; + final bgColor = isDark ? Colors.grey[900]! : Colors.white; + final hasHeaderIcon = headerIcon != null; + final hasTrailing = trailing != null; - /// Callback when "Get Directions" is tapped. - final void Function(MapSearchResult result) onGetDirections; + return Material( + elevation: 8, + color: bgColor, + borderRadius: const BorderRadius.vertical(top: Radius.circular(16)), + clipBehavior: Clip.antiAlias, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + // Header + GestureDetector( + onVerticalDragEnd: (details) { + if (details.primaryVelocity != null && details.primaryVelocity! > 0) { + if (!isMinimized) onToggle(); + } else if (details.primaryVelocity != null && details.primaryVelocity! < 0) { + if (isMinimized) onToggle(); + } + }, + child: InkWell( + onTap: onToggle, + child: Padding( + padding: const EdgeInsets.fromLTRB(20, 16, 20, 16), + child: Row( + children: [ + if (hasHeaderIcon) ...[ + Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), + const SizedBox(width: 8), + ], + Expanded( + child: Text( + headerTitle, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + color: isDark ? Colors.white : Colors.grey[900], + ), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ), + if (hasTrailing && !isMinimized) trailing, + const SizedBox(width: 8), + Icon( + isMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, + size: 24, + color: isDark ? Colors.white70 : Colors.grey[700], + ), + ], + ), + ), + ), + ), + if (!isMinimized) const Divider(height: 1), + if (!isMinimized) + Flexible( + child: CustomScrollView( + shrinkWrap: true, + slivers: sliverBody, + ), + ), + ], + ), + ); +} - /// Callback when travel mode toggle chip is tapped. +class EsriMapDetailSlideOver extends StatelessWidget { + final ValueNotifier minimizedNotifier; + final double availableHeight; + final MapSearchResult result; + final IconData resultIcon; + final bool isRoutingMode; + final bool hasRoute; + final bool routeFailed; + final String travelMode; + final double routeTravelTimeMinutes; + final List routeManeuvers; + final (double, double)? fromLatLng; + final void Function(MapSearchResult result) onGetDirections; final void Function(String mode) onTravelModeChanged; - - /// Callback when external website button is tapped. final void Function(String url) onLaunchWebsite; - - /// Callback when clear/close button is tapped. final VoidCallback onClose; - - /// Callback when route is cleared. final VoidCallback onClearRoute; - /// Constructs an [EsriMapDetailSlideOver] instance. const EsriMapDetailSlideOver({ Key? key, - required this.controller, + required this.minimizedNotifier, required this.availableHeight, required this.result, required this.resultIcon, @@ -216,271 +262,255 @@ class EsriMapDetailSlideOver extends StatelessWidget { String detailText = isBuilding ? result.address : result.description; - // Format the detail text nicely if (!isBuilding) { - // Remove any URLs from the description since we have a dedicated button detailText = detailText.replaceAll(RegExp(r'https?://[^\s]+'), ''); - // Add a space after a period if it is immediately followed by a letter detailText = detailText.replaceAllMapped(RegExp(r'\.([A-Za-z])'), (m) => '. ${m.group(1)}'); detailText = detailText.trim(); } final categoryLabel = isBuilding ? 'Building' : result.subtitle; - // Content-aware sheet sizing (added 80 for bottom nav bar padding) - double contentEst = (isRouting ? 230 : 198) + 80; - if (!isRouting && detailText.isNotEmpty) { - final detailTextPainter = TextPainter( - text: TextSpan(text: detailText, style: const TextStyle(fontSize: 15)), - textDirection: Directionality.of(context), - textScaler: MediaQuery.textScalerOf(context), - )..layout(maxWidth: MediaQuery.sizeOf(context).width - 40); - contentEst += 16 + detailTextPainter.height; - } - final hasRouteManeuvers = hasRoute && routeManeuvers.isNotEmpty; - if (hasRouteManeuvers) contentEst += routeManeuvers.length * 52.0; - - final contentFraction = (contentEst / availableHeight).clamp(0.15, 1.0); - final initialSize = hasRoute ? 0.35 : (contentFraction < 0.30 ? contentFraction : 0.30); - // Allow the sheet to be dragged up past its initial content size to prevent it from getting stuck - final maxSize = isRouting ? 1.0 : (contentFraction < 0.6 ? 0.6 : contentFraction.clamp(0.6, 1.0)); - final snaps = [0.15]; - final isInitialLarger = initialSize > 0.15 + 0.01; - if (isInitialLarger) snaps.add(initialSize); - - return DraggableScrollableSheet( - controller: controller, - initialChildSize: initialSize, - minChildSize: 0.15, - maxChildSize: maxSize, - snap: true, - snapSizes: snaps, - builder: (context, scrollController) { - final shouldShowDetailText = !isRouting && detailText.isNotEmpty; - final websiteUrl = result.websiteUrl?.trim(); - final hasWebsiteUrl = websiteUrl?.isNotEmpty == true; - final websiteHost = hasWebsiteUrl ? Uri.tryParse(websiteUrl!)?.host.replaceFirst('www.', '') : null; - - return buildSlideOverContent( - context: context, - scrollController: scrollController, - headerTitle: isRouting ? 'Directions to ${result.name}' : result.name, - headerIcon: resultIcon, - onClose: isRouting ? onClearRoute : onClose, - trailing: isRouting && !routeFailed - ? Padding( - padding: const EdgeInsets.only(right: 8), - child: TextButton.icon( - onPressed: () { - final originParam = fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''; - onLaunchWebsite( - 'https://www.google.com/maps/dir/?api=1' - '&destination=${result.latitude},${result.longitude}' - '&travelmode=walking' - '$originParam', - ); - }, - icon: const Icon(Icons.map_outlined, size: 16), - label: const Text('Open Google Maps', style: TextStyle(fontSize: 12)), - style: TextButton.styleFrom( - padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 0), - minimumSize: Size.zero, - tapTargetSize: MaterialTapTargetSize.shrinkWrap, - foregroundColor: isDark ? const Color(0xFFFFCD00) : Theme.of(context).primaryColor, - ), - ), - ) - : null, - sliverBody: [ - SliverToBoxAdapter( - child: Padding( - padding: const EdgeInsets.fromLTRB(20, 8, 20, 12), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // Category label (hidden in routing mode) - if (!isRouting) - Text( - categoryLabel, - style: TextStyle( - fontSize: 17, - fontWeight: FontWeight.w600, - color: isDark ? Colors.white : Colors.black87, - ), - ), - - // Detail description text (hidden in routing mode) - if (shouldShowDetailText) ...[ - const SizedBox(height: 10), - Text( - detailText, - style: TextStyle( - fontSize: 15, - height: 1.4, - color: isDark ? Colors.grey[300] : Colors.grey[700], + // Constrain height to a maximum of 50% of screen height + final maxHeight = availableHeight * 0.50; + + return Align( + alignment: Alignment.bottomCenter, + child: ValueListenableBuilder( + valueListenable: minimizedNotifier, + builder: (context, isMinimized, child) { + final shouldShowDetailText = !isRouting && detailText.isNotEmpty; + final websiteUrl = result.websiteUrl?.trim(); + final hasWebsiteUrl = websiteUrl?.isNotEmpty == true; + final websiteHost = hasWebsiteUrl ? Uri.tryParse(websiteUrl!)?.host.replaceFirst('www.', '') : null; + + return ConstrainedBox( + constraints: BoxConstraints(maxHeight: maxHeight), + child: buildDetailSlideOverContent( + context: context, + headerTitle: isRouting ? 'Directions to ${result.name}' : result.name, + headerIcon: resultIcon, + onClose: isRouting ? onClearRoute : onClose, + onToggle: () => minimizedNotifier.value = !isMinimized, + isMinimized: isMinimized, + trailing: isRouting && !routeFailed + ? Padding( + padding: const EdgeInsets.only(right: 8), + child: TextButton.icon( + onPressed: () { + final originParam = fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''; + onLaunchWebsite( + 'https://www.google.com/maps/dir/?api=1' + '&destination=${result.latitude},${result.longitude}' + '&travelmode=walking' + '$originParam', + ); + }, + icon: const Icon(Icons.map_outlined, size: 16), + label: const Text('Open Google Maps', style: TextStyle(fontSize: 12)), + style: TextButton.styleFrom( + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 0), + minimumSize: Size.zero, + tapTargetSize: MaterialTapTargetSize.shrinkWrap, + foregroundColor: isDark ? const Color(0xFFFFCD00) : Theme.of(context).primaryColor, ), ), - ], - if (!isRouting) const SizedBox(height: 20), - - // Routing or Action Buttons - if (routeFailed) ...[ - Text( - 'You are too far from campus for walking navigation.', - style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[400] : Colors.grey[600]), - ), - const SizedBox(height: 16), - SizedBox( - width: double.infinity, - child: OutlinedButton.icon( - onPressed: () { - final originParam = fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''; - onLaunchWebsite( - 'https://www.google.com/maps/dir/?api=1' - '&destination=${result.latitude},${result.longitude}' - '&travelmode=driving' - '$originParam', - ); - }, - icon: const Icon(Icons.directions_car, size: 18), - label: const Text('Drive With Google Maps'), - style: OutlinedButton.styleFrom( - foregroundColor: isDark ? const Color(0xFFFFCD00) : Theme.of(context).primaryColor, - side: BorderSide(color: isDark ? const Color(0xFFFFCD00) : Theme.of(context).primaryColor), - padding: const EdgeInsets.symmetric(vertical: 12), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), - ), - ), - ), - ] else if (hasRoute) ...[ - // Travel time estimate and mode indicator - Row( - children: [ - Icon(Icons.schedule, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), - const SizedBox(width: 6), + ) + : null, + sliverBody: [ + SliverToBoxAdapter( + child: Padding( + padding: const EdgeInsets.fromLTRB(20, 16, 20, 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (!isRouting) Text( - routeTravelTimeMinutes < 1 ? '< 1 min' : '${routeTravelTimeMinutes.ceil()} min', + categoryLabel, style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - color: isDark ? Colors.white : Colors.grey[900], + fontSize: 17, + fontWeight: FontWeight.w600, + color: isDark ? Colors.white : Colors.black87, ), ), - const SizedBox(width: 12), - Container( - padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 6), - decoration: BoxDecoration( - color: isDark ? Colors.white : Colors.grey[900], - borderRadius: BorderRadius.circular(16), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Icon(Icons.directions_walk, size: 16, color: isDark ? Colors.grey[900] : Colors.white), - const SizedBox(width: 6), - Text( - 'Walking', - style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w500, - color: isDark ? Colors.grey[900] : Colors.white, - ), - ), - ], + if (shouldShowDetailText) ...[ + const SizedBox(height: 10), + Text( + detailText, + style: TextStyle( + fontSize: 15, + height: 1.4, + color: isDark ? Colors.grey[300] : Colors.grey[700], ), ), ], - ), - ] else - // Directions + Website buttons - Row( - children: [ - if (hasWebsiteUrl) ...[ - Expanded( - child: OutlinedButton.icon( - onPressed: () => onLaunchWebsite(websiteUrl!), - icon: const Icon(Icons.language, size: 18), - label: Text(websiteHost?.isNotEmpty == true ? 'Visit $websiteHost' : 'View website'), - style: OutlinedButton.styleFrom( - foregroundColor: isDark ? const Color(0xFFFFCD00) : null, - side: isDark ? const BorderSide(color: Color(0xFFFFCD00)) : null, - padding: const EdgeInsets.symmetric(vertical: 12), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), - ), + if (!isRouting) const SizedBox(height: 20), + + if (routeFailed) ...[ + Text( + 'You are too far from campus for walking navigation.', + style: TextStyle(fontSize: 16, color: isDark ? Colors.grey[400] : Colors.grey[600]), + ), + const SizedBox(height: 16), + SizedBox( + width: double.infinity, + child: OutlinedButton.icon( + onPressed: () { + final originParam = fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''; + onLaunchWebsite( + 'https://www.google.com/maps/dir/?api=1' + '&destination=${result.latitude},${result.longitude}' + '&travelmode=driving' + '$originParam', + ); + }, + icon: const Icon(Icons.directions_car, size: 18), + label: const Text('Drive With Google Maps'), + style: OutlinedButton.styleFrom( + foregroundColor: isDark ? const Color(0xFFFFCD00) : Theme.of(context).primaryColor, + side: BorderSide(color: isDark ? const Color(0xFFFFCD00) : Theme.of(context).primaryColor), + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), ), ), - const SizedBox(width: 12), - ], - if (FeatureFlags.mapRoutingEnabled) - Expanded( - child: FilledButton.icon( - onPressed: isRoutingMode ? null : () => onGetDirections(result), - icon: isRoutingMode - ? const SizedBox( - width: 18, - height: 18, - child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white), - ) - : const Icon(Icons.directions, size: 18), - label: Text(isRoutingMode ? 'Routing...' : 'Get Directions'), - style: FilledButton.styleFrom( - padding: const EdgeInsets.symmetric(vertical: 12), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ), + ] else if (hasRoute) ...[ + Row( + children: [ + Icon(Icons.schedule, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), + const SizedBox(width: 6), + Text( + routeTravelTimeMinutes < 1 ? '< 1 min' : '${routeTravelTimeMinutes.ceil()} min', + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: isDark ? Colors.white : Colors.grey[900], ), ), + const SizedBox(width: 12), + Container( + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 6), + decoration: BoxDecoration( + color: isDark ? Colors.white : Colors.grey[900], + borderRadius: BorderRadius.circular(16), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon(Icons.directions_walk, size: 16, color: isDark ? Colors.grey[900] : Colors.white), + const SizedBox(width: 6), + Text( + 'Walking', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w500, + color: isDark ? Colors.grey[900] : Colors.white, + ), + ), + ], + ), + ), + ], + ), + ] else + Row( + children: [ + if (hasWebsiteUrl) ...[ + Expanded( + child: OutlinedButton.icon( + onPressed: () => onLaunchWebsite(websiteUrl!), + icon: const Icon(Icons.language, size: 18), + label: websiteHost?.isNotEmpty == true + ? Text.rich( + TextSpan( + children: [ + const TextSpan(text: 'Visit Website\n'), + TextSpan( + text: websiteHost, + style: const TextStyle(fontSize: 11), + ), + ], + ), + textAlign: TextAlign.center, + ) + : const Text('View website'), + style: OutlinedButton.styleFrom( + foregroundColor: isDark ? const Color(0xFFFFCD00) : null, + side: isDark ? const BorderSide(color: Color(0xFFFFCD00)) : null, + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ), + ), + ), + const SizedBox(width: 12), + ], + if (FeatureFlags.mapRoutingEnabled) + Expanded( + child: FilledButton.icon( + onPressed: isRoutingMode ? null : () => onGetDirections(result), + icon: isRoutingMode + ? const SizedBox( + width: 18, + height: 18, + child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white), + ) + : const Icon(Icons.directions, size: 18), + label: Text(isRoutingMode ? 'Routing...' : 'Get Directions'), + style: FilledButton.styleFrom( + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ), + ), + ), + ], + ), + ], + ), + ), + ), + if (routeManeuvers.isNotEmpty) + SliverList( + delegate: SliverChildBuilderDelegate((context, index) { + final step = routeManeuvers[index]; + final distMeters = step.length; + final distLabel = distMeters < 1000 + ? '${distMeters.round()} m' + : '${(distMeters / 1000).toStringAsFixed(1)} km'; + final isNotLastManeuver = index < routeManeuvers.length - 1; + final isFirstIndex = index == 0; + + String directionText = step.directionText; + directionText = directionText.replaceAll('Location 1', 'My Location'); + directionText = directionText.replaceAll('Location 2', result.name); + + return Column( + children: [ + if (isFirstIndex) const Divider(height: 1), + ListTile( + leading: Icon( + Icons.subdirectory_arrow_right, + size: 20, + color: isDark ? Colors.grey[400] : Colors.grey[600], ), + title: Text(directionText, style: const TextStyle(fontSize: 14)), + trailing: distMeters > 0 + ? Text( + distLabel, + style: TextStyle(fontSize: 13, color: isDark ? Colors.grey[500] : Colors.grey[500]), + ) + : null, + dense: true, + ), + if (isNotLastManeuver) const Divider(height: 1, indent: 56), ], - ), - ], - ), - ), + ); + }, childCount: routeManeuvers.length), + ), + const SliverToBoxAdapter(child: SizedBox(height: 80)), + ], ), - - // Turn-by-turn maneuver list - if (hasRouteManeuvers) - SliverList( - delegate: SliverChildBuilderDelegate((context, index) { - final step = routeManeuvers[index]; - final distMeters = step.length; - final distLabel = distMeters < 1000 - ? '${distMeters.round()} m' - : '${(distMeters / 1000).toStringAsFixed(1)} km'; - final isNotLastManeuver = index < routeManeuvers.length - 1; - final isFirstIndex = index == 0; - - String directionText = step.directionText; - directionText = directionText.replaceAll('Location 1', 'My Location'); - directionText = directionText.replaceAll('Location 2', result.name); - - return Column( - children: [ - if (isFirstIndex) const Divider(height: 1), - ListTile( - leading: Icon( - Icons.subdirectory_arrow_right, - size: 20, - color: isDark ? Colors.grey[400] : Colors.grey[600], - ), - title: Text(directionText, style: const TextStyle(fontSize: 14)), - trailing: distMeters > 0 - ? Text( - distLabel, - style: TextStyle(fontSize: 13, color: isDark ? Colors.grey[500] : Colors.grey[500]), - ) - : null, - dense: true, - ), - if (isNotLastManeuver) const Divider(height: 1, indent: 56), - ], - ); - }, childCount: routeManeuvers.length), - ), - - // Bottom padding for navigation bar - const SliverToBoxAdapter(child: SizedBox(height: 80)), - ], - ); - }, + ); + }, + ), ); } } diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 2aec8e019..a168b59c1 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -62,7 +62,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final _toFocusNode = FocusNode(); final _categorySheetController = DraggableScrollableController(); - final _detailSheetController = DraggableScrollableController(); + final _detailSheetMinimized = ValueNotifier(false); // --------------------------------------------------------------------------- // Map State & Services @@ -82,7 +82,12 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { int _searchRequestId = 0; // Active Category & Pin Plotting State - MapSearchResult? _selectedResult; + MapSearchResult? _selectedResultValue; + MapSearchResult? get _selectedResult => _selectedResultValue; + set _selectedResult(MapSearchResult? value) { + _selectedResultValue = value; + if (value != null) _detailSheetMinimized.value = false; + } MapSearchResult? _lastSelectedResult; List _mappedResults = []; List _allCategoryResults = []; @@ -269,7 +274,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { void dispose() { _searchDebounce?.cancel(); _categorySheetController.dispose(); - _detailSheetController.dispose(); + _detailSheetMinimized.dispose(); _searchController.dispose(); _fromController.dispose(); _toController.dispose(); @@ -1590,9 +1595,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _showResults = false; } }); - final isAttached = _detailSheetController.isAttached; - if (isAttached) - _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + _detailSheetMinimized.value = true; } } @@ -1610,9 +1613,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _showResults = false; } }); - final isAttached = _detailSheetController.isAttached; - if (isAttached) - _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + _detailSheetMinimized.value = true; } } @@ -1637,9 +1638,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } final isSelectedResultOpen = _selectedResult != null; if (isSelectedResultOpen) { - final isAttached = _detailSheetController.isAttached; - if (isAttached) - _detailSheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); + _detailSheetMinimized.value = true; } } @@ -1992,7 +1991,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (_selectedResult != null) LayoutBuilder( builder: (context, constraints) => EsriMapDetailSlideOver( - controller: _detailSheetController, + minimizedNotifier: _detailSheetMinimized, availableHeight: constraints.maxHeight, result: _selectedResult!, resultIcon: _iconForResult(_selectedResult!), From cd49b8c33f853eb914d5d024ec7a7e9b764f798a Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Thu, 30 Jul 2026 18:23:06 +0000 Subject: [PATCH 049/139] style: auto fix formatting violations --- .../esrimap_detail_slide_over.dart | 94 +++++++++---------- .../esrimap_suggestions_panel.dart | 29 +++--- lib/ui/esrimap/esrimap.dart | 5 +- 3 files changed, 60 insertions(+), 68 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index b16f150b5..b7b0a906f 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -3,8 +3,6 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/map_searc import 'package:campus_mobile_experimental/core/utils/esri_map_feature_flags.dart'; import 'package:flutter/material.dart'; - - Widget buildSlideOverContent({ required BuildContext context, required ScrollController scrollController, @@ -97,7 +95,6 @@ Widget buildSlideOverContent({ /// travel time, navigation buttons, and turn-by-turn directions. /// ============================================================================ - /// Persistent header delegate for pinned slide-over bottom sheet headers. class SlideOverHeaderDelegate extends SliverPersistentHeaderDelegate { /// Header widget content. @@ -171,46 +168,40 @@ Widget buildDetailSlideOverContent({ }, child: InkWell( onTap: onToggle, - child: Padding( - padding: const EdgeInsets.fromLTRB(20, 16, 20, 16), - child: Row( - children: [ - if (hasHeaderIcon) ...[ - Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), - const SizedBox(width: 8), - ], - Expanded( - child: Text( - headerTitle, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - color: isDark ? Colors.white : Colors.grey[900], + child: Padding( + padding: const EdgeInsets.fromLTRB(20, 16, 20, 16), + child: Row( + children: [ + if (hasHeaderIcon) ...[ + Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), + const SizedBox(width: 8), + ], + Expanded( + child: Text( + headerTitle, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + color: isDark ? Colors.white : Colors.grey[900], + ), + maxLines: 1, + overflow: TextOverflow.ellipsis, ), - maxLines: 1, - overflow: TextOverflow.ellipsis, ), - ), - if (hasTrailing && !isMinimized) trailing, - const SizedBox(width: 8), - Icon( - isMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, - size: 24, - color: isDark ? Colors.white70 : Colors.grey[700], - ), - ], + if (hasTrailing && !isMinimized) trailing, + const SizedBox(width: 8), + Icon( + isMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, + size: 24, + color: isDark ? Colors.white70 : Colors.grey[700], + ), + ], + ), ), ), ), - ), if (!isMinimized) const Divider(height: 1), - if (!isMinimized) - Flexible( - child: CustomScrollView( - shrinkWrap: true, - slivers: sliverBody, - ), - ), + if (!isMinimized) Flexible(child: CustomScrollView(shrinkWrap: true, slivers: sliverBody)), ], ), ); @@ -261,7 +252,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { final isBuilding = result.source == MapSearchSource.building; String detailText = isBuilding ? result.address : result.description; - + if (!isBuilding) { detailText = detailText.replaceAll(RegExp(r'https?://[^\s]+'), ''); detailText = detailText.replaceAllMapped(RegExp(r'\.([A-Za-z])'), (m) => '. ${m.group(1)}'); @@ -327,8 +318,8 @@ class EsriMapDetailSlideOver extends StatelessWidget { Text( categoryLabel, style: TextStyle( - fontSize: 17, - fontWeight: FontWeight.w600, + fontSize: 17, + fontWeight: FontWeight.w600, color: isDark ? Colors.white : Colors.black87, ), ), @@ -337,14 +328,14 @@ class EsriMapDetailSlideOver extends StatelessWidget { Text( detailText, style: TextStyle( - fontSize: 15, + fontSize: 15, height: 1.4, color: isDark ? Colors.grey[300] : Colors.grey[700], ), ), ], if (!isRouting) const SizedBox(height: 20), - + if (routeFailed) ...[ Text( 'You are too far from campus for walking navigation.', @@ -355,7 +346,9 @@ class EsriMapDetailSlideOver extends StatelessWidget { width: double.infinity, child: OutlinedButton.icon( onPressed: () { - final originParam = fromLatLng != null ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' : ''; + final originParam = fromLatLng != null + ? '&origin=${fromLatLng!.$1},${fromLatLng!.$2}' + : ''; onLaunchWebsite( 'https://www.google.com/maps/dir/?api=1' '&destination=${result.latitude},${result.longitude}' @@ -367,7 +360,9 @@ class EsriMapDetailSlideOver extends StatelessWidget { label: const Text('Drive With Google Maps'), style: OutlinedButton.styleFrom( foregroundColor: isDark ? const Color(0xFFFFCD00) : Theme.of(context).primaryColor, - side: BorderSide(color: isDark ? const Color(0xFFFFCD00) : Theme.of(context).primaryColor), + side: BorderSide( + color: isDark ? const Color(0xFFFFCD00) : Theme.of(context).primaryColor, + ), padding: const EdgeInsets.symmetric(vertical: 12), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), ), @@ -396,7 +391,11 @@ class EsriMapDetailSlideOver extends StatelessWidget { child: Row( mainAxisSize: MainAxisSize.min, children: [ - Icon(Icons.directions_walk, size: 16, color: isDark ? Colors.grey[900] : Colors.white), + Icon( + Icons.directions_walk, + size: 16, + color: isDark ? Colors.grey[900] : Colors.white, + ), const SizedBox(width: 6), Text( 'Walking', @@ -424,10 +423,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { TextSpan( children: [ const TextSpan(text: 'Visit Website\n'), - TextSpan( - text: websiteHost, - style: const TextStyle(fontSize: 11), - ), + TextSpan(text: websiteHost, style: const TextStyle(fontSize: 11)), ], ), textAlign: TextAlign.center, diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart index b46ea3e1d..bf0d2aee7 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart @@ -122,9 +122,7 @@ class _EsriMapSuggestionsPanelState extends State { ), TextButton( onPressed: widget.onClearRecent, - style: TextButton.styleFrom( - foregroundColor: isDark ? Colors.grey[400] : Colors.grey[600], - ), + style: TextButton.styleFrom(foregroundColor: isDark ? Colors.grey[400] : Colors.grey[600]), child: const Text('Clear'), ), ], @@ -142,7 +140,7 @@ class _EsriMapSuggestionsPanelState extends State { Widget _buildRecentSearchesList(bool isDark) { final maxTotal = widget.recentSearches.length > 10 ? 10 : widget.recentSearches.length; final displayCount = _isHistoryExpanded ? maxTotal : (maxTotal > 2 ? 2 : maxTotal); - + // ListTile height is approximately 64. 5 items = 320. final double listHeight = _isHistoryExpanded && maxTotal > 5 ? (5 * 64.0) : (displayCount * 64.0); @@ -168,17 +166,19 @@ class _EsriMapSuggestionsPanelState extends State { child: Icon(Icons.history, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), ), title: Text( - recent.name, - maxLines: 1, + recent.name, + maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle(fontSize: 14, color: isDark ? Colors.white : Colors.black87), ), - subtitle: subtitle.isEmpty ? null : Text( - subtitle, - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle(fontSize: 12, color: isDark ? Colors.grey[400] : Colors.grey[600]), - ), + subtitle: subtitle.isEmpty + ? null + : Text( + subtitle, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle(fontSize: 12, color: isDark ? Colors.grey[400] : Colors.grey[600]), + ), trailing: IconButton( tooltip: 'Remove ${recent.name} from recents', onPressed: () => widget.onRemoveRecent(index), @@ -192,9 +192,7 @@ class _EsriMapSuggestionsPanelState extends State { ), if (maxTotal > 2) TextButton( - style: TextButton.styleFrom( - foregroundColor: isDark ? Colors.grey[400] : Colors.grey[600], - ), + style: TextButton.styleFrom(foregroundColor: isDark ? Colors.grey[400] : Colors.grey[600]), onPressed: () { setState(() { _isHistoryExpanded = !_isHistoryExpanded; @@ -236,4 +234,3 @@ class _EsriMapSuggestionsPanelState extends State { ); } } - diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index a168b59c1..06bf3fd50 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -88,6 +88,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _selectedResultValue = value; if (value != null) _detailSheetMinimized.value = false; } + MapSearchResult? _lastSelectedResult; List _mappedResults = []; List _allCategoryResults = []; @@ -1637,9 +1638,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _categorySheetController.animateTo(0.15, duration: const Duration(milliseconds: 250), curve: Curves.easeOut); } final isSelectedResultOpen = _selectedResult != null; - if (isSelectedResultOpen) { - _detailSheetMinimized.value = true; - } + if (isSelectedResultOpen) _detailSheetMinimized.value = true; } // --------------------------------------------------------------------------- From 09dfe79088db3755ca94c033b9fbdd568dd5f4b1 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Thu, 30 Jul 2026 11:26:50 -0700 Subject: [PATCH 050/139] fixed red dot pill on an adge case --- lib/ui/esrimap/esrimap.dart | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index a168b59c1..765bb8734 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -923,7 +923,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), ); _graphicsOverlay.graphics.add(graphic); - + _showCalloutForGraphic(result, graphic); _mapViewController.setViewpointAnimated(Viewpoint.fromCenter(point, scale: 5000)); setState(() { @@ -981,15 +981,12 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } /// Shows a place name above a plotted map pin without changing the search. - void _handlePinTap(MapSearchResult result, Graphic graphic) { - if (_showRouteFields) { - _selectResultFromPin(result); - return; - } + void _showCalloutForGraphic(MapSearchResult result, Graphic graphic) { final isBuilding = result.source == MapSearchSource.building; final detail = isBuilding ? 'Building' : result.subtitle; final isDark = Theme.of(context).brightness == Brightness.dark; + _graphicsOverlay.clearSelection(); graphic.isSelected = true; _mapViewController.callout.showCalloutForGeoElement( @@ -1037,6 +1034,15 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), ), ); + } + + void _handlePinTap(MapSearchResult result, Graphic graphic) { + if (_showRouteFields) { + _selectResultFromPin(result); + return; + } + + _showCalloutForGraphic(result, graphic); _selectResultFromPin(result, updateSearchText: false); } From 934fd43aa5e789d59c25b2da2360fea45a990692 Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Thu, 30 Jul 2026 18:28:35 +0000 Subject: [PATCH 051/139] style: auto fix formatting violations --- lib/ui/esrimap/esrimap.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index eed8d78b2..2d1cf53f0 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -987,7 +987,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final isBuilding = result.source == MapSearchSource.building; final detail = isBuilding ? 'Building' : result.subtitle; final isDark = Theme.of(context).brightness == Brightness.dark; - + _graphicsOverlay.clearSelection(); graphic.isSelected = true; _mapViewController.callout.showCalloutForGeoElement( From 25b60b88fa62ac86bda25cb8278e7da93075f7dd Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Thu, 30 Jul 2026 11:44:48 -0700 Subject: [PATCH 052/139] added pills on top of red dots for missing cases --- lib/ui/esrimap/esrimap.dart | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index eed8d78b2..830b79604 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -763,8 +763,26 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final allResults = (await Future.wait(searches)).expand((results) => results).toList(); final isStale = !mounted || requestId != _searchRequestId; if (isStale) return; - _plotResultsOnMap(allResults); - _zoomToResults(allResults); + + final userLoc = _getUserLatLng(); + if (userLoc != null) { + allResults.sort((a, b) { + final distA = EsriMapSearchService.distanceMeters(userLoc.$1, userLoc.$2, a.latitude, a.longitude); + final distB = EsriMapSearchService.distanceMeters(userLoc.$1, userLoc.$2, b.latitude, b.longitude); + return distA.compareTo(distB); + }); + _plotResultsOnMap(allResults); + if (allResults.isNotEmpty) { + final closest = allResults.first; + final p = ArcGISPoint(x: closest.longitude, y: closest.latitude, spatialReference: SpatialReference.wgs84); + _showCalloutForGraphic(closest, _graphicsOverlay.graphics.first); + _mapViewController.setViewpointAnimated(Viewpoint.fromCenter(p, scale: 5000)); + } + } else { + allResults.sort((a, b) => a.name.compareTo(b.name)); + _plotResultsOnMap(allResults); + _zoomToResults(allResults); + } setState(() { _allCategoryResults = allResults; From 8133eade030f2980375c9a6ff15ea73d5c9da768 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Thu, 30 Jul 2026 11:56:52 -0700 Subject: [PATCH 053/139] pushing all i have --- .../esrimap_detail_slide_over_test.dart | 61 ------------------- 1 file changed, 61 deletions(-) delete mode 100644 test/ui/esrimap/esrimap_detail_slide_over_test.dart diff --git a/test/ui/esrimap/esrimap_detail_slide_over_test.dart b/test/ui/esrimap/esrimap_detail_slide_over_test.dart deleted file mode 100644 index 3a50da08e..000000000 --- a/test/ui/esrimap/esrimap_detail_slide_over_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; -import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -void main() { - testWidgets('detail sheet expands only as far as its content requires', (tester) async { - tester.view.physicalSize = const Size(320, 500); - tester.view.devicePixelRatio = 1; - addTearDown(tester.view.resetPhysicalSize); - addTearDown(tester.view.resetDevicePixelRatio); - - Future pumpDetail(String description) async { - await tester.pumpWidget( - MaterialApp( - home: Scaffold( - body: EsriMapDetailSlideOver( - controller: DraggableScrollableController(), - availableHeight: 500, - result: MapSearchResult( - name: 'Test place', - subtitle: 'Campus place', - latitude: 0, - longitude: 0, - source: MapSearchSource.poi, - description: description, - websiteUrl: 'https://blink.ucsd.edu/facilities/services/general/personal/dining.html', - ), - resultIcon: Icons.place, - isRoutingMode: false, - hasRoute: false, - routeFailed: false, - travelMode: 'Walking', - routeTravelTimeMinutes: 0, - routeManeuvers: const [], - fromLatLng: null, - onGetDirections: (_) {}, - onTravelModeChanged: (_) {}, - onLaunchWebsite: (_) {}, - onClose: () {}, - onClearRoute: () {}, - ), - ), - ), - ); - } - - await pumpDetail('A short description.'); - expect(tester.widget(find.byType(DraggableScrollableSheet)).maxChildSize, lessThan(1)); - expect(find.text('Visit blink.ucsd.edu'), findsOneWidget); - - final longDescription = List.filled( - 30, - 'This longer place description remains readable when the information sheet is expanded.', - ).join(' '); - await pumpDetail(longDescription); - - expect(tester.widget(find.byType(DraggableScrollableSheet)).maxChildSize, 1); - expect(tester.widget(find.text(longDescription)).maxLines, isNull); - }); -} From b0929a17a759236ed456e4f3a121aaab332a7d53 Mon Sep 17 00:00:00 2001 From: Albert Hoang Date: Thu, 30 Jul 2026 12:23:59 -0700 Subject: [PATCH 054/139] UI fixes and route calcuation loading --- .../esrimap_detail_slide_over.dart | 8 ++- .../esri_map_widgets/esrimap_search_bar.dart | 6 --- lib/ui/esrimap/esrimap.dart | 15 +++--- .../esrimap_detail_slide_over_test.dart | 49 +++++++++++++++++++ 4 files changed, 62 insertions(+), 16 deletions(-) create mode 100644 test/ui/esrimap/esrimap_detail_slide_over_test.dart diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index b7b0a906f..ea1282e79 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -447,10 +447,14 @@ class EsriMapDetailSlideOver extends StatelessWidget { ? const SizedBox( width: 18, height: 18, - child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white), + child: CircularProgressIndicator( + strokeWidth: 2, + color: Colors.white, + semanticsLabel: 'Calculating route', + ), ) : const Icon(Icons.directions, size: 18), - label: Text(isRoutingMode ? 'Routing...' : 'Get Directions'), + label: Text(isRoutingMode ? 'Calculating...' : 'Get Directions'), style: FilledButton.styleFrom( padding: const EdgeInsets.symmetric(vertical: 12), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index d358b0a0d..006727f06 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -322,12 +322,6 @@ class EsriMapSearchBar extends StatelessWidget { ), ), - if (isSearching && !showResults) - const Padding( - padding: EdgeInsets.only(top: 4), - child: ClipRRect(borderRadius: BorderRadius.all(Radius.circular(2)), child: LinearProgressIndicator()), - ), - // Search Results Dropdown List if (shouldShowDropdown) Padding( diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 3574464b8..5178e1207 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1317,6 +1317,13 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Future _solveRoute(MapSearchResult destination, {String? travelMode, (double, double)? originLatLng}) async { if (!FeatureFlags.mapRoutingEnabled) return; + final mode = travelMode ?? _travelMode; + setState(() { + _isRouting = true; + _routeFailed = false; + _travelMode = mode; + }); + if (originLatLng == null && _getUserLatLng() == null) await _startLocationDisplay(); var userLatLng = originLatLng ?? _getUserLatLng(); @@ -1346,13 +1353,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return; } - final mode = travelMode ?? _travelMode; - setState(() { - _isRouting = true; - _routeFailed = false; - _travelMode = mode; - }); - final routeRes = await EsriMapRouteService.solveRoute( originLatLng: userLatLng, destination: destination, @@ -2034,7 +2034,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _graphicsOverlay.graphics.clear(); setState(() { _showRouteFields = true; - _selectedResult = null; _mappedResults = []; _allCategoryResults = []; _showCategoryList = false; diff --git a/test/ui/esrimap/esrimap_detail_slide_over_test.dart b/test/ui/esrimap/esrimap_detail_slide_over_test.dart new file mode 100644 index 000000000..ba700b3c9 --- /dev/null +++ b/test/ui/esrimap/esrimap_detail_slide_over_test.dart @@ -0,0 +1,49 @@ +import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('shows route calculation progress', (tester) async { + final minimized = ValueNotifier(false); + addTearDown(minimized.dispose); + + await tester.pumpWidget( + MaterialApp( + home: Scaffold( + body: EsriMapDetailSlideOver( + minimizedNotifier: minimized, + availableHeight: 800, + result: const MapSearchResult( + name: 'Price Center', + subtitle: 'Building', + latitude: 32.8797, + longitude: -117.2362, + source: MapSearchSource.building, + ), + resultIcon: Icons.business, + isRoutingMode: true, + hasRoute: false, + routeFailed: false, + travelMode: 'Walking', + routeTravelTimeMinutes: 0, + routeManeuvers: const [], + fromLatLng: null, + onGetDirections: (_) {}, + onTravelModeChanged: (_) {}, + onLaunchWebsite: (_) {}, + onClose: () {}, + onClearRoute: () {}, + ), + ), + ), + ); + + expect( + tester.widget(find.byType(CircularProgressIndicator)).semanticsLabel, + 'Calculating route', + ); + expect(find.text('Calculating...'), findsOneWidget); + expect(tester.widget(find.byType(FilledButton)).onPressed, isNull); + }); +} From b87f9e82c7f773f101524e63971d836f8095fe9e Mon Sep 17 00:00:00 2001 From: Albert Hoang Date: Thu, 30 Jul 2026 12:40:17 -0700 Subject: [PATCH 055/139] search bar loading animation --- .../esri_map_widgets/esrimap_search_bar.dart | 13 +++- lib/ui/esrimap/esrimap.dart | 32 +++++---- test/ui/esrimap/esrimap_search_bar_test.dart | 68 +++++++++++++++++++ 3 files changed, 97 insertions(+), 16 deletions(-) create mode 100644 test/ui/esrimap/esrimap_search_bar_test.dart diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index 006727f06..4725b70b5 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -139,6 +139,7 @@ class EsriMapSearchBar extends StatelessWidget { @override Widget build(BuildContext context) { final isDark = Theme.of(context).brightness == Brightness.dark; + final searchTextColor = Theme.of(context).textTheme.titleMedium?.color; final hasSearchResults = isSearching || searchResults.isNotEmpty; final shouldShowResultsDivider = showResults && hasSearchResults; @@ -148,7 +149,7 @@ class EsriMapSearchBar extends StatelessWidget { matchingPoiClasses.isNotEmpty && isSearchNotEmpty && !showSuggestions; - final shouldShowDropdown = showResults || hasClassMatches; + final shouldShowDropdown = isSearching ? showRouteFields && showResults : showResults || hasClassMatches; return Column( children: [ @@ -283,7 +284,13 @@ class EsriMapSearchBar extends StatelessWidget { children: [ Padding( padding: const EdgeInsets.only(left: 12), - child: Icon(Icons.search, color: isDark ? Colors.white70 : Colors.grey[600]), + child: SizedBox( + width: 24, + height: 24, + child: isSearching + ? CircularProgressIndicator(strokeWidth: 2, color: searchTextColor, semanticsLabel: 'Searching') + : Icon(Icons.search, color: isDark ? Colors.white70 : Colors.grey[600]), + ), ), Expanded( child: TextField( @@ -300,7 +307,7 @@ class EsriMapSearchBar extends StatelessWidget { } }, onTap: onTapSearchField, - style: const TextStyle(fontSize: 16), + style: TextStyle(fontSize: 16, color: searchTextColor), decoration: const InputDecoration( border: InputBorder.none, contentPadding: EdgeInsets.symmetric(horizontal: 12, vertical: 16), diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 5178e1207..072871397 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -71,6 +71,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final _locationDataSource = SystemLocationDataSource(); // Search State + static const _minimumSearchLoadingDuration = Duration(milliseconds: 400); List _searchResults = []; List _allPoiClasses = []; List _matchingPoiClasses = []; @@ -696,8 +697,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _searchRequestId++; } + Future _waitForMinimumSearchLoadingTime(Stopwatch stopwatch) async { + final remaining = _minimumSearchLoadingDuration - stopwatch.elapsed; + if (remaining > Duration.zero) await Future.delayed(remaining); + } + /// Text search: queries buildings and POIs concurrently. Future _performSearch(String query, int requestId) async { + final loadingStopwatch = Stopwatch()..start(); final q = query.toLowerCase(); final matched = _allPoiClasses.where((c) => c.toLowerCase().contains(q)).toList(); @@ -714,32 +721,29 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _matchingPoiClasses = matched; }); + var merged = []; try { final results = await Future.wait([ EsriMapSearchService.queryBuildings(query), EsriMapSearchService.queryPOIs(query), ]); - final merged = [...results[0], ...results[1]]; - final isStale = !mounted || requestId != _searchRequestId; - if (isStale) return; - setState(() { - _searchResults = merged; - _isSearching = false; - }); + merged = [...results[0], ...results[1]]; } catch (e) { debugPrint('Search error: $e'); - final isStale = !mounted || requestId != _searchRequestId; - if (isStale) return; - setState(() { - _searchResults = []; - _isSearching = false; - }); } + await _waitForMinimumSearchLoadingTime(loadingStopwatch); + final isStale = !mounted || requestId != _searchRequestId; + if (isStale) return; + setState(() { + _searchResults = merged; + _isSearching = false; + }); } /// Category search: queries matching locations and plots pins on the map. Future _performCategorySearch(EsriSearchCategory category) async { _cancelPendingSearch(); + final loadingStopwatch = Stopwatch()..start(); final requestId = _searchRequestId; setState(() { _isSearching = true; @@ -761,6 +765,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (category.poiClassValue == 'Recreation Facilities') EsriMapSearchService.queryBuildings('gym'), ]; final allResults = (await Future.wait(searches)).expand((results) => results).toList(); + await _waitForMinimumSearchLoadingTime(loadingStopwatch); final isStale = !mounted || requestId != _searchRequestId; if (isStale) return; @@ -796,6 +801,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } catch (e) { debugPrint('Category search error: $e'); + await _waitForMinimumSearchLoadingTime(loadingStopwatch); final isStale = !mounted || requestId != _searchRequestId; if (isStale) return; setState(() { diff --git a/test/ui/esrimap/esrimap_search_bar_test.dart b/test/ui/esrimap/esrimap_search_bar_test.dart new file mode 100644 index 000000000..c22db9627 --- /dev/null +++ b/test/ui/esrimap/esrimap_search_bar_test.dart @@ -0,0 +1,68 @@ +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('shows one inline search progress indicator', (tester) async { + final searchController = TextEditingController(text: 'library'); + final fromController = TextEditingController(); + final toController = TextEditingController(); + final focusNode = FocusNode(); + final fromFocusNode = FocusNode(); + final toFocusNode = FocusNode(); + addTearDown(() { + searchController.dispose(); + fromController.dispose(); + toController.dispose(); + focusNode.dispose(); + fromFocusNode.dispose(); + toFocusNode.dispose(); + }); + + await tester.pumpWidget( + MaterialApp( + home: Scaffold( + body: EsriMapSearchBar( + config: null, + showRouteFields: false, + searchController: searchController, + focusNode: focusNode, + fromController: fromController, + fromFocusNode: fromFocusNode, + toController: toController, + toFocusNode: toFocusNode, + showSuggestions: false, + showResults: true, + isSearching: true, + searchResults: const [], + matchingPoiClasses: const [], + onPerformSearch: (_) {}, + onPerformClassSearch: (_) {}, + onSelectResult: (_) {}, + onClearSearch: () {}, + onClearRoute: () {}, + onSwapRouteFields: () {}, + onTapSearchField: () {}, + onTapFromField: () {}, + onTapToField: () {}, + onChangedFromField: (_) {}, + onChangedToField: (_) {}, + onClearFromField: () {}, + onClearToField: () {}, + onOpenAiSearch: () {}, + iconForClass: (_) => Icons.category, + labelForClass: (value) => value, + iconForResult: (_) => Icons.place, + ), + ), + ), + ); + + final indicator = tester.widget(find.byType(CircularProgressIndicator)); + final searchField = tester.widget(find.byType(TextField)); + expect(indicator.semanticsLabel, 'Searching'); + expect(indicator.color, searchField.style?.color); + expect(find.byIcon(Icons.search), findsNothing); + expect(find.text('No results found'), findsNothing); + }); +} From 4b57d3e1a9035202e857751db8fdfbe1dd5e1513 Mon Sep 17 00:00:00 2001 From: Albert Hoang Date: Thu, 30 Jul 2026 12:51:29 -0700 Subject: [PATCH 056/139] fixed ui bugs --- lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart | 8 ++++++-- test/ui/esrimap/esrimap_search_bar_test.dart | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index 4725b70b5..ff165bbfa 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -138,6 +138,7 @@ class EsriMapSearchBar extends StatelessWidget { @override Widget build(BuildContext context) { + const searchFontSize = 16.0; final isDark = Theme.of(context).brightness == Brightness.dark; final searchTextColor = Theme.of(context).textTheme.titleMedium?.color; final hasSearchResults = isSearching || searchResults.isNotEmpty; @@ -307,11 +308,14 @@ class EsriMapSearchBar extends StatelessWidget { } }, onTap: onTapSearchField, - style: TextStyle(fontSize: 16, color: searchTextColor), + style: TextStyle(fontSize: searchFontSize, color: searchTextColor), decoration: const InputDecoration( border: InputBorder.none, contentPadding: EdgeInsets.symmetric(horizontal: 12, vertical: 16), - hintText: 'Search buildings, places...', + hint: Padding( + padding: EdgeInsets.only(left: 4), + child: Text('Search buildings, places...', style: TextStyle(fontSize: searchFontSize)), + ), ), ), ), diff --git a/test/ui/esrimap/esrimap_search_bar_test.dart b/test/ui/esrimap/esrimap_search_bar_test.dart index c22db9627..d1778df3e 100644 --- a/test/ui/esrimap/esrimap_search_bar_test.dart +++ b/test/ui/esrimap/esrimap_search_bar_test.dart @@ -60,8 +60,12 @@ void main() { final indicator = tester.widget(find.byType(CircularProgressIndicator)); final searchField = tester.widget(find.byType(TextField)); + final hintPadding = searchField.decoration!.hint! as Padding; + final hintText = hintPadding.child as Text; expect(indicator.semanticsLabel, 'Searching'); expect(indicator.color, searchField.style?.color); + expect(hintPadding.padding, const EdgeInsets.only(left: 4)); + expect(hintText.style?.fontSize, searchField.style?.fontSize); expect(find.byIcon(Icons.search), findsNothing); expect(find.text('No results found'), findsNothing); }); From 0644de56dff7c6d3d1bc418df4462a69108927c0 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 3 Aug 2026 15:10:00 -0700 Subject: [PATCH 057/139] fixed iOS builds --- scripts/codemagic-ci/post-clone.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/codemagic-ci/post-clone.sh b/scripts/codemagic-ci/post-clone.sh index e646b20ca..6b83ba64b 100644 --- a/scripts/codemagic-ci/post-clone.sh +++ b/scripts/codemagic-ci/post-clone.sh @@ -82,4 +82,15 @@ else echo "$BUILD_ENV Environment Build (Branch: $FCI_BRANCH)" > ./release_notes.txt fi +# ArcGIS native iOS frameworks are downloaded outside the Git repository. +# Install them before CocoaPods resolves the local podspec paths in ios/Podfile. +if [ "$BUILD_PLATFORM" = "IOS" ]; then + echo "Installing ArcGIS native SDK for iOS ..." + flutter pub get + dart run arcgis_maps install + + test -f ./arcgis_maps_core/ios/Runtimecore.podspec + test -f ./arcgis_maps_core/ios/arcgis_maps_ffi.podspec +fi + echo "End: post-clone.sh" From 44a73d50700d470198bcf65432eaa97439f456fb Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 3 Aug 2026 15:28:14 -0700 Subject: [PATCH 058/139] made post-clone download arcgis --- scripts/codemagic-ci/Readme.md | 12 +++++++++++- scripts/codemagic-ci/post-clone.sh | 20 ++++++++++++++++---- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/scripts/codemagic-ci/Readme.md b/scripts/codemagic-ci/Readme.md index 25937a7db..5f7b6dd84 100644 --- a/scripts/codemagic-ci/Readme.md +++ b/scripts/codemagic-ci/Readme.md @@ -36,7 +36,17 @@ ## iii. Post-Clone Script -1. Copy and paste the contents of `post-clone.sh` from `campus-mobile/scripts/codemagic-ci` +1. In Codemagic's Workflow Editor, set the Post-clone script to invoke the + checked-in script directly: + + ```sh + sh ./scripts/codemagic-ci/post-clone.sh + ``` + + Invoking the repository file ensures future script changes are used by + Codemagic without copying them into the Workflow Editor again. +2. Save the workflow and confirm the next build log contains + `Start: post-clone.sh` before dependency resolution begins. ## iv. Build for Platforms diff --git a/scripts/codemagic-ci/post-clone.sh b/scripts/codemagic-ci/post-clone.sh index 6b83ba64b..e0cb92688 100644 --- a/scripts/codemagic-ci/post-clone.sh +++ b/scripts/codemagic-ci/post-clone.sh @@ -53,7 +53,7 @@ fi # 7. BUILD_PLATFORM if [ -n "$BUILD_PLATFORM" ]; then - echo "BUILD_PLATFORM: Found" + echo "BUILD_PLATFORM: $BUILD_PLATFORM" else echo "Error: BUILD_PLATFORM not found, exiting." exit 1 @@ -84,13 +84,25 @@ fi # ArcGIS native iOS frameworks are downloaded outside the Git repository. # Install them before CocoaPods resolves the local podspec paths in ios/Podfile. -if [ "$BUILD_PLATFORM" = "IOS" ]; then +# Normalize the value so both "IOS" and "iOS" select the iOS setup. +BUILD_PLATFORM_NORMALIZED=$(printf '%s' "$BUILD_PLATFORM" | tr '[:lower:]' '[:upper:]') +if [ "$BUILD_PLATFORM_NORMALIZED" = "IOS" ]; then echo "Installing ArcGIS native SDK for iOS ..." + echo "Repository root: $(pwd)" flutter pub get dart run arcgis_maps install - test -f ./arcgis_maps_core/ios/Runtimecore.podspec - test -f ./arcgis_maps_core/ios/arcgis_maps_ffi.podspec + echo "Verifying ArcGIS CocoaPods podspecs ..." + for podspec in \ + ./arcgis_maps_core/ios/Runtimecore.podspec \ + ./arcgis_maps_core/ios/arcgis_maps_ffi.podspec + do + if [ ! -f "$podspec" ]; then + echo "Error: ArcGIS installation did not create $podspec" + exit 1 + fi + echo "Found: $podspec" + done fi echo "End: post-clone.sh" From 1a115949787dc0f583ec8f32e65ca5c0d0c4a410 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 11:11:35 -0700 Subject: [PATCH 059/139] Changed basemap to render vectors in the client side to get rid of the "Map Data Unavailable" message AND make the map more responsive --- assets/esri_map_assets/mapConfig.json | 28 ------- .../esri_map_models/esrimap_config.dart | 4 +- .../esrimap_basemap_factory.dart | 84 +++++++++++-------- .../esrimap_basemap_factory_test.dart | 55 ++++++++++++ 4 files changed, 106 insertions(+), 65 deletions(-) create mode 100644 test/core/services/esrimap_basemap_factory_test.dart diff --git a/assets/esri_map_assets/mapConfig.json b/assets/esri_map_assets/mapConfig.json index ea5b058a6..a9fe0914c 100644 --- a/assets/esri_map_assets/mapConfig.json +++ b/assets/esri_map_assets/mapConfig.json @@ -17,14 +17,6 @@ "label": "Default", "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/default-thumbnail.png", "baseLayers": [ - { - "type": "arcgisTiled", - "serviceKey": "hillshade" - }, - { - "type": "arcgisTiled", - "serviceKey": "lightGrayBase" - }, { "type": "arcgisVectorTiled", "portalKey": "age", @@ -36,14 +28,6 @@ "label": "Light", "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/light-thumbnail.png", "baseLayers": [ - { - "type": "arcgisTiled", - "serviceKey": "hillshade" - }, - { - "type": "arcgisTiled", - "serviceKey": "lightGrayBase" - }, { "type": "arcgisVectorTiled", "portalKey": "age", @@ -55,14 +39,6 @@ "label": "Dark", "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/dark-thumbnail.png", "baseLayers": [ - { - "type": "arcgisTiled", - "serviceKey": "hillshade" - }, - { - "type": "arcgisTiled", - "serviceKey": "darkGrayBase" - }, { "type": "arcgisVectorTiled", "portalKey": "age", @@ -77,10 +53,6 @@ { "type": "arcgisTiled", "serviceKey": "worldImagery" - }, - { - "type": "arcgisMapImage", - "serviceKey": "nearmap" } ] } diff --git a/lib/core/models/esri_map_models/esrimap_config.dart b/lib/core/models/esri_map_models/esrimap_config.dart index 9583f4a1d..6fa66a653 100644 --- a/lib/core/models/esri_map_models/esrimap_config.dart +++ b/lib/core/models/esri_map_models/esrimap_config.dart @@ -92,8 +92,8 @@ class SublayerEntry { /// Factory constructor to deserialize [SublayerEntry] from a JSON map. factory SublayerEntry.fromJson(Map json) => SublayerEntry( - name: json['name'] as String, - source: json['source'] as String, + name: json['name'] as String? ?? '', + source: json['source'] as String? ?? '', url: json['url'] as String?, portalKey: json['portalKey'] as String?, itemId: json['itemId'] as String?, diff --git a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart index 9c0ace224..31628fa40 100644 --- a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart +++ b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart @@ -9,9 +9,13 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_b import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; /// Constructs an ArcGIS [Basemap] for the requested [type] using configuration settings in [config]. +/// +/// Vector Tile Basemaps ([BasemapStyle.arcGISLightGrayBase] and [BasemapStyle.arcGISDarkGrayBase]) +/// are used as the foundation layer because they provide seamless worldwide vector coverage down +/// to room/building level (Level 22+) without triggering "Map data not yet available" raster tile cutoffs. +/// Custom UCSD campus vector tile layers are layered on top. Basemap buildBasemap(BasemapType type, EsriMapConfig config) { - // Intercept the satellite basemap to forcefully inject the global World Imagery layer, - // since the backend remote config might still be serving the old lightGrayBase street map. + // 1. Satellite Basemap: Use global World Imagery layer. if (type == BasemapType.satellite) { final basemap = Basemap(); basemap.baseLayers.add( @@ -19,45 +23,55 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { Uri.parse('https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer'), ), ); - // Removed the detailed satellite image that would load every 5 seconds to avoid making unnecessary requests, - // and increase performance since the detailed image would go blurry the moment you move in the map. return basemap; } + // 2. Vector Basemaps: Initialize with global vector tile base styles. + // arcGISLightGrayBase for Default/Light, and arcGISDarkGrayBase for Dark mode. + final basemap = switch (type) { + BasemapType.dark => Basemap.withStyle(BasemapStyle.arcGISDarkGrayBase), + _ => Basemap.withStyle(BasemapStyle.arcGISLightGrayBase), + }; + + // 3. Retrieve campus vector tile layer specifications from configuration. final entry = config.basemaps[basemapKey(type)]; - final isEntryNull = entry == null; - if (isEntryNull) return Basemap(); - - final basemap = Basemap(); - for (final layer in entry.baseLayers) { - switch (layer.type) { - case 'arcgisTiled': - final hasServiceKey = layer.serviceKey != null; - final url = hasServiceKey ? config.serviceUrls[layer.serviceKey!] : null; - final isUrlNotNull = url != null; - if (isUrlNotNull) basemap.baseLayers.add(ArcGISTiledLayer.withUri(Uri.parse(url))); - break; - - case 'arcgisVectorTiled': - final hasPortalKey = layer.portalKey != null; - final portalUrl = hasPortalKey ? config.portals[layer.portalKey!] : null; - final hasPortalAndItem = portalUrl != null && layer.itemId != null; - if (hasPortalAndItem) { - basemap.baseLayers.add( - ArcGISVectorTiledLayer.withItem( - PortalItem.withPortalAndItemId(portal: Portal(Uri.parse(portalUrl)), itemId: layer.itemId!), + final portalUrl = config.portals['age'] ?? 'https://admin-enterprise-gis.ucsd.edu/portal'; + + // Extract vector layers from config entry if present (ignoring legacy raster arcgisTiled layers) + final vectorLayers = entry?.baseLayers.where((l) => l.type == 'arcgisVectorTiled').toList() ?? []; + + if (vectorLayers.isNotEmpty) { + for (final layer in vectorLayers) { + final pUrl = layer.portalKey != null ? config.portals[layer.portalKey!] : portalUrl; + if (pUrl != null && layer.itemId != null) { + basemap.baseLayers.add( + ArcGISVectorTiledLayer.withItem( + PortalItem.withPortalAndItemId( + portal: Portal(Uri.parse(pUrl)), + itemId: layer.itemId!, ), - ); - } - break; - - case 'arcgisMapImage': - final hasServiceKey = layer.serviceKey != null; - final url = hasServiceKey ? config.serviceUrls[layer.serviceKey!] : null; - final isUrlNotNull = url != null; - if (isUrlNotNull) basemap.baseLayers.add(ArcGISMapImageLayer.withUri(Uri.parse(url))); - break; + ), + ); + } } + } else { + // Fallback: Use known default UCSD campus vector layer item IDs if config entry is missing + final fallbackItemId = switch (type) { + BasemapType.light => '6643ee62af494f5bafe7dfdb8eb3f857', + BasemapType.dark => '09d7b3934b6c4c2cad8380c04e08c1b1', + _ => 'e19f33d2c1f44967aef673306c483913', + }; + + basemap.baseLayers.add( + ArcGISVectorTiledLayer.withItem( + PortalItem.withPortalAndItemId( + portal: Portal(Uri.parse(portalUrl)), + itemId: fallbackItemId, + ), + ), + ); } + return basemap; } + diff --git a/test/core/services/esrimap_basemap_factory_test.dart b/test/core/services/esrimap_basemap_factory_test.dart new file mode 100644 index 000000000..1abc1cafd --- /dev/null +++ b/test/core/services/esrimap_basemap_factory_test.dart @@ -0,0 +1,55 @@ +import 'dart:convert'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_basemaps.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + TestWidgetsFlutterBinding.ensureInitialized(); + + group('EsriMapConfig & Vector Tile Basemaps', () { + test('mapConfig.json parses vector tile basemap configurations correctly', () async { + final configString = await rootBundle.loadString('assets/esri_map_assets/mapConfig.json'); + final jsonMap = jsonDecode(configString) as Map; + final config = EsriMapConfig.fromJson(jsonMap); + + // Verify Default basemap uses vector tiled layer without legacy raster layers + final defaultBasemap = config.basemaps['defaultMap']; + expect(defaultBasemap, isNotNull); + expect(defaultBasemap!.baseLayers.length, 1); + expect(defaultBasemap.baseLayers.first.type, 'arcgisVectorTiled'); + expect(defaultBasemap.baseLayers.first.itemId, 'e19f33d2c1f44967aef673306c483913'); + + // Verify Light basemap uses vector tiled layer + final lightBasemap = config.basemaps['light']; + expect(lightBasemap, isNotNull); + expect(lightBasemap!.baseLayers.length, 1); + expect(lightBasemap.baseLayers.first.type, 'arcgisVectorTiled'); + expect(lightBasemap.baseLayers.first.itemId, '6643ee62af494f5bafe7dfdb8eb3f857'); + + // Verify Dark basemap uses vector tiled layer + final darkBasemap = config.basemaps['dark']; + expect(darkBasemap, isNotNull); + expect(darkBasemap!.baseLayers.length, 1); + expect(darkBasemap.baseLayers.first.type, 'arcgisVectorTiled'); + expect(darkBasemap.baseLayers.first.itemId, '09d7b3934b6c4c2cad8380c04e08c1b1'); + + // Verify Satellite basemap uses worldImagery + final satelliteBasemap = config.basemaps['satellite']; + expect(satelliteBasemap, isNotNull); + expect(satelliteBasemap!.baseLayers.any((l) => l.serviceKey == 'worldImagery'), isTrue); + }); + + test('basemapKey and basemapTypeFromKey mapping', () { + expect(basemapKey(BasemapType.defaultMap), 'defaultMap'); + expect(basemapKey(BasemapType.light), 'light'); + expect(basemapKey(BasemapType.dark), 'dark'); + expect(basemapKey(BasemapType.satellite), 'satellite'); + + expect(basemapTypeFromKey('defaultMap'), BasemapType.defaultMap); + expect(basemapTypeFromKey('light'), BasemapType.light); + expect(basemapTypeFromKey('dark'), BasemapType.dark); + expect(basemapTypeFromKey('satellite'), BasemapType.satellite); + }); + }); +} From 6353e805744f9dfb039b07f65c2db370d8ebb9e3 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 11:26:31 -0700 Subject: [PATCH 060/139] added UCSD boundaries to let the user know where UCSD is and the areas we support --- assets/esri_map_assets/ucsd_boundary.json | 1 + .../esrimap_boundary_service.dart | 223 ++++++++++++++++++ lib/ui/esrimap/esrimap.dart | 30 +++ .../esrimap_boundary_service_test.dart | 46 ++++ 4 files changed, 300 insertions(+) create mode 100644 assets/esri_map_assets/ucsd_boundary.json create mode 100644 lib/core/services/esri_map_services/esrimap_boundary_service.dart create mode 100644 test/core/services/esrimap_boundary_service_test.dart diff --git a/assets/esri_map_assets/ucsd_boundary.json b/assets/esri_map_assets/ucsd_boundary.json new file mode 100644 index 000000000..ec11c431f --- /dev/null +++ b/assets/esri_map_assets/ucsd_boundary.json @@ -0,0 +1 @@ +{"displayFieldName":"FeatureID","fieldAliases":{"OBJECTID":"OBJECTID","Campus":"Campus Area","FeatureID":"Feature Identifier","SHAPE.STLength()":"SHAPE_Length","SHAPE.STArea()":"SHAPE_Area","GlobalID":"GlobalID","created_user":"created_user","created_date":"created_date","last_edited_user":"last_edited_user","last_edited_date":"last_edited_date","Clery":"Clery","Region":"Region"},"geometryType":"esriGeometryPolygon","spatialReference":{"wkid":4326,"latestWkid":4326},"fields":[{"name":"OBJECTID","type":"esriFieldTypeOID","alias":"OBJECTID"},{"name":"Campus","type":"esriFieldTypeString","alias":"Campus Area","length":255},{"name":"FeatureID","type":"esriFieldTypeString","alias":"Feature Identifier","length":50},{"name":"SHAPE.STLength()","type":"esriFieldTypeDouble","alias":"SHAPE_Length"},{"name":"SHAPE.STArea()","type":"esriFieldTypeDouble","alias":"SHAPE_Area"},{"name":"GlobalID","type":"esriFieldTypeGlobalID","alias":"GlobalID","length":38},{"name":"created_user","type":"esriFieldTypeString","alias":"created_user","length":255},{"name":"created_date","type":"esriFieldTypeDate","alias":"created_date","length":8},{"name":"last_edited_user","type":"esriFieldTypeString","alias":"last_edited_user","length":255},{"name":"last_edited_date","type":"esriFieldTypeDate","alias":"last_edited_date","length":8},{"name":"Clery","type":"esriFieldTypeString","alias":"Clery","length":50},{"name":"Region","type":"esriFieldTypeString","alias":"Region","length":255}],"features":[{"attributes":{"OBJECTID":37,"Campus":"La Jolla Campus","FeatureID":null,"SHAPE.STLength()":13876.894869037975,"SHAPE.STArea()":11536296.981464531,"GlobalID":"{E960D7DA-60FE-4E5A-B0F3-CB33CC9C0214}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887928000,"Clery":"Yes","Region":"East Campus"},"geometry":{"rings":[[[-117.22099292733958,32.882509370498568],[-117.22098222325303,32.882499013285418],[-117.22097149586861,32.88248867519107],[-117.22096074091183,32.882478356249145],[-117.22094996155867,32.882468053729426],[-117.22093915784895,32.882457771238585],[-117.22092833085131,32.882447508768259],[-117.22091747199691,32.882437264582215],[-117.22090659303056,32.882427037686497],[-117.2208956886291,32.882416829926356],[-117.22088475773387,32.882406642211819],[-117.22087380247211,32.882396473624532],[-117.2208628239125,32.882386324155988],[-117.22085181881928,32.882376191126411],[-117.22084079153663,32.882366080813853],[-117.22082973879888,32.882355987833535],[-117.22081865957746,32.882345915800464],[-117.22080755810673,32.882335861074438],[-117.22079643120101,32.882325825483925],[-117.22078528100731,32.88231580991382],[-117.22077410537851,32.882305813479206],[-117.22076290434448,32.88229583888517],[-117.22075167995283,32.882285877999813],[-117.22074043019578,32.882275942561584],[-117.22072916031679,32.88226602351191],[-117.22071786183668,32.88225612722961],[-117.22070653789164,32.882246247377715],[-117.22069519388435,32.882236389324362],[-117.2206838254908,32.882226548594744],[-117.22067242955467,32.882216729722359],[-117.22066101566375,32.882206929926689],[-117.22064957100463,32.882197150210061],[-117.22063810838074,32.882187388668434],[-117.22062661930286,32.882177650779006],[-117.22061510475014,32.882167928418355],[-117.22060357121379,32.882158228749418],[-117.22059201118363,32.882148549125894],[-117.22058042570848,32.882138887736161],[-117.22056882018103,32.8821292490465],[-117.22056977490762,32.882086757554106],[-117.22057335371784,32.881927771334382],[-117.22057537027534,32.881838354520774],[-117.22051806536719,32.881780963879834],[-117.22040998381004,32.881672715805593],[-117.22040848020197,32.881673785362906],[-117.22040723641166,32.881674672530359],[-117.22040599154276,32.881675558804588],[-117.22040474777228,32.881676447775362],[-117.22040350718774,32.881677334917647],[-117.22040226234861,32.881678223896799],[-117.22040102178384,32.88167911284237],[-117.22039978016043,32.881680002698026],[-117.22039853962548,32.881680894348563],[-117.22039729799205,32.88168178330249],[-117.22039606067277,32.881682675829552],[-117.2203948233137,32.881683564749892],[-117.22039358495562,32.881684459990339],[-117.22039234765616,32.881685354320659],[-117.22039110929803,32.881686249561014],[-117.22038987199855,32.881687143891298],[-117.22038863791478,32.881688039098137],[-117.22038740275244,32.88168893341161],[-117.22038616869844,32.881689831323392],[-117.22038493460465,32.881690725628445],[-117.22038369947208,32.881691622646905],[-117.22038246865365,32.881692523238485],[-117.22038123459953,32.881693421150224],[-117.22038000270248,32.881694320848482],[-117.22037877188399,32.881695221439998],[-117.22037754105553,32.881696121129835],[-117.22037631344277,32.881697021696162],[-117.22037508154567,32.88169792139437],[-117.22037385396268,32.881698824665676],[-117.22037262637971,32.881699727936976],[-117.2203713987867,32.881700630306561],[-117.22037017334091,32.881701533561071],[-117.22036894577772,32.881702438635671],[-117.22036772143022,32.881703344586768],[-117.22036649705292,32.881704247832801],[-117.22036527272532,32.881705155587191],[-117.22036404727932,32.881706058841587],[-117.22036282299143,32.881706970202664],[-117.22036160183971,32.881707875226795],[-117.22036038072773,32.881708783857647],[-117.22035915643976,32.881709695218667],[-117.22035793852362,32.881710602922617],[-117.22035671637281,32.88171151426684],[-117.22035549526069,32.8817124228976],[-117.22035427738425,32.8817133342082],[-117.22035305952767,32.881714247322137],[-117.22035184165112,32.881715158632709],[-117.22035062380445,32.881716072648281],[-117.22034940595769,32.881716986663832],[-117.22034819131676,32.881717900654202],[-117.22034697666582,32.8817188137429],[-117.22034576208446,32.881719733143299],[-117.22034454741366,32.881720644428626],[-117.2203433328024,32.881721561123932],[-117.220342121397,32.881722477794121],[-117.22034090681554,32.881723397194385],[-117.22033969540007,32.881724312962866],[-117.22033848720039,32.881725229607774],[-117.22033727264869,32.881726151713096],[-117.22033606447876,32.881727071062983],[-117.22033485310304,32.881727990438094],[-117.22033364493304,32.881728909787974],[-117.2203324368227,32.881729834547841],[-117.22033122868247,32.881730756602757],[-117.22033002054231,32.881731678657623],[-117.22032881560781,32.881732600687286],[-117.22032761070319,32.881733525421943],[-117.22032640582835,32.881734452861643],[-117.22032520089383,32.881735374891242],[-117.22032399598909,32.881736299625906],[-117.22032279111419,32.88173722706555],[-117.22032158941521,32.881738151774989],[-117.2203203888147,32.881739079180988],[-117.22031918714552,32.881740006595471],[-117.22031798550616,32.881740936714863],[-117.22031678383689,32.881741864129268],[-117.22031558540331,32.881742794223491],[-117.22031438376385,32.88174372434284],[-117.22031318639877,32.881744654428701],[-117.22031198796506,32.881745584522861],[-117.22031079273717,32.881746514591825],[-117.22030959433324,32.881747447390993],[-117.22030839913509,32.881748380164979],[-117.22030720501553,32.881749313832238],[-117.22030600984709,32.881750249311217],[-117.22030481464893,32.881751182085168],[-117.22030361948052,32.881752117564076],[-117.22030242858649,32.881753053009454],[-117.22030123982968,32.881753988438021],[-117.22030004467112,32.881754924818594],[-117.22029885273822,32.881755862977307],[-117.22029766507973,32.881756801102469],[-117.22029647314683,32.881757739261204],[-117.22029528122384,32.88175867832156],[-117.22029409356527,32.881759616446679],[-117.2202929048679,32.881760557285141],[-117.22029171934652,32.881761495393484],[-117.22029053175748,32.881762439830247],[-117.22028934626583,32.881763380643534],[-117.22028815756838,32.881764321481974],[-117.22028697638095,32.881765264966731],[-117.22028579092901,32.88176620938664],[-117.22028460653569,32.881767152896487],[-117.22028342427957,32.881768096389543],[-117.22028223882758,32.881769040809473],[-117.22028105766987,32.881769986999139],[-117.22027987864927,32.881770933172049],[-117.22027869750143,32.881771880263337],[-117.22027751848083,32.881772826436126],[-117.22027633733292,32.881773773527463],[-117.22027515834209,32.881774722405282],[-117.22027398041985,32.881775671274738],[-117.22027280464471,32.881776621029005],[-117.22027162672241,32.881777569898425],[-117.22027045094723,32.88177851965272],[-117.22026927626047,32.881779471201924],[-117.22026810051507,32.881780423661176],[-117.22026692582828,32.881781375210394],[-117.22026565340695,32.88178237982828],[-117.22026443555842,32.881783293843021],[-117.22026319069654,32.881784181017458],[-117.22026191986994,32.881785039539871],[-117.22026062631437,32.881785872090035],[-117.22025930683382,32.881786679594867],[-117.22025796347614,32.881787453922549],[-117.22025659637052,32.881788206794816],[-117.22025521073076,32.881788926447932],[-117.22025380125358,32.881789616530504],[-117.22025237541921,32.881790276983942],[-117.22025092572747,32.881790906063522],[-117.22024946075713,32.881791506407161],[-117.22024797834116,32.881792075326679],[-117.22024647954805,32.88179261281352],[-117.22024496327941,32.881793116171337],[-117.22024343492798,32.881793589866263],[-117.22024189232675,32.881794031210219],[-117.22024033971036,32.881794436562942],[-117.22023877075665,32.881794814089723],[-117.22023719393491,32.881795156510186],[-117.22023560816658,32.881795462930988],[-117.22023401137412,32.881795738778926],[-117.22023240888068,32.881795982208772],[-117.22023079848935,32.881796187827227],[-117.22022918131846,32.881796360134253],[-117.22022756380952,32.881796501784557],[-117.22022593946136,32.881796604713415],[-117.2202243115494,32.881796675207326],[-117.22022268324963,32.881796710536172],[-117.22022105458193,32.881796712503252],[-117.22021942554638,32.88179668110854],[-117.22021779932876,32.881796614523616],[-117.22021617594898,32.881796514551738],[-117.22021455644594,32.881796378479486],[-117.22021293872204,32.881796209930407],[-117.22021133021791,32.881796005239067],[-117.22020972456157,32.881795768062389],[-117.22020812922331,32.881795497440095],[-117.22020653989894,32.881795190700721],[-117.22020496200108,32.881794854113899],[-117.22020339439145,32.881794481376474],[-117.22020183607113,32.881794078808447],[-117.22020029445071,32.881793640039369],[-117.22019876105094,32.881793171448123],[-117.2201972475867,32.881792669335717],[-117.22019574340185,32.881792136491015],[-117.22019426129962,32.881791571010012],[-117.22019279596694,32.881790975639667],[-117.22019134204085,32.881790348618694],[-117.22018991451162,32.881789692534504],[-117.22018850053612,32.88178900568446],[-117.22018711400621,32.881788287959566],[-117.2201857442458,32.881787540345321],[-117.22018440095189,32.88178676997962],[-117.22018307867198,32.881785966985994],[-117.22018177959318,32.881785135856099],[-117.22018050696086,32.881784280171338],[-117.22017925856839,32.881783393636873],[-117.22004213948567,32.881685955226395],[-117.21993300745433,32.881611477284487],[-117.21982234920601,32.881538619040576],[-117.21971020131917,32.881467402747099],[-117.21959659925349,32.881397846156737],[-117.21948157321492,32.881329975179163],[-117.21936516508399,32.881263808418346],[-117.21924740177042,32.881199363694343],[-117.21912832519391,32.881136663218193],[-117.2190079719107,32.881075727439487],[-117.21888637523116,32.881016573226418],[-117.21841828694274,32.880813731879492],[-117.21840491670291,32.880806065413708],[-117.21839322742584,32.880796644499995],[-117.21838353934103,32.880785726332086],[-117.21837611542034,32.880773609131268],[-117.21837116130853,32.880760625834192],[-117.21836881235147,32.880747130668638],[-117.21836913033079,32.880733493768425],[-117.2183721097269,32.8807200875981],[-117.21837766694395,32.880707278921747],[-117.21841013677202,32.88064117350536],[-117.21843610924576,32.880573053101664],[-117.21845541306436,32.880503373537778],[-117.21846791761443,32.880432597534849],[-117.21847354046919,32.880361196452817],[-117.21852068573098,32.878804462773928],[-117.21858421355041,32.878748783321669],[-117.21858737250582,32.878671517647575],[-117.21859294065327,32.878535469866193],[-117.21852619509869,32.878479012594866],[-117.21853042576792,32.877757839117088],[-117.21852959591982,32.877679447768095],[-117.21851268393004,32.877054604973473],[-117.21858140347669,32.87699654297942],[-117.21858277601633,32.876762839159795],[-117.21850348070468,32.87669715710301],[-117.2184992854103,32.876541847892],[-117.21848878648795,32.876386750404691],[-117.21847199773954,32.876232047586093],[-117.21846138680186,32.876132586940585],[-117.21845518531373,32.876032860885473],[-117.21844150917012,32.875690944580924],[-117.2184689528757,32.872668790475593],[-117.21846117408812,32.872434579448424],[-117.21846277831993,32.872416840336221],[-117.21846733375645,32.872399470350906],[-117.21847474910177,32.872382815576763],[-117.21848487524318,32.87236721173015],[-117.21849151496785,32.872356979864641],[-117.21849637754539,32.872346059468583],[-117.218499363872,32.872334669541758],[-117.21850041661421,32.872323037773981],[-117.21850505521286,32.871597770680559],[-117.21852413711379,32.871571407320324],[-117.21881805281237,32.871425189584947],[-117.22129875385129,32.871437722716635],[-117.22383797028941,32.871450581661897],[-117.22403273207054,32.871451565871325],[-117.22422542498836,32.871452539034692],[-117.22428642229312,32.871452847074437],[-117.22558327801897,32.87207090164619],[-117.22571800266782,32.872132345094812],[-117.22585534513176,32.87218951417951],[-117.22599511430545,32.872242329243683],[-117.22613711594636,32.872290716968685],[-117.22610385485589,32.872313307010451],[-117.22655909713492,32.872494282887722],[-117.22712399935932,32.872587505634762],[-117.22797044284758,32.872727185678656],[-117.22843983257712,32.873827628593787],[-117.22817642810324,32.87568138867131],[-117.2282448549295,32.876377788614334],[-117.22813880209398,32.877473465936269],[-117.22802003456577,32.878430389088564],[-117.228068566118,32.878716726347264],[-117.22809180789663,32.879178182032796],[-117.22795510240074,32.880823300123851],[-117.22775783249112,32.881833951682147],[-117.227752467415,32.881861432502127],[-117.22761796330286,32.88187246915372],[-117.22761485277802,32.881904534648172],[-117.22759516214354,32.882107469051419],[-117.22748207782952,32.882157292471994],[-117.22736618923321,32.882206741200015],[-117.22724881216499,32.882253624396469],[-117.2270955177668,32.882310197624726],[-117.22694005856611,32.882362396267332],[-117.22678261027194,32.882410162117445],[-117.22658652156082,32.882462527278136],[-117.22638803833775,32.882508020796202],[-117.22618749963306,32.882546565137119],[-117.2259852467366,32.88257809357151],[-117.22578162431608,32.882602554675259],[-117.22557697818937,32.882619904231326],[-117.22537165863993,32.882630115122915],[-117.22516601496339,32.882633167457378],[-117.22496039664578,32.882629058475906],[-117.22475515433153,32.88261779352878],[-117.22455063774595,32.882599391501927],[-117.22434719570479,32.88257388571877],[-117.22414517390661,32.882541317645249],[-117.2241447723592,32.882541246867589],[-117.22399510324145,32.882512538292545],[-117.22384655194206,32.882479954937928],[-117.22334872925619,32.883131695935184],[-117.22239688404929,32.884377761799648],[-117.22239228037233,32.884383791937999],[-117.22210836123335,32.883865542073494],[-117.22199983165515,32.883700130842058],[-117.22188586287378,32.883537344900965],[-117.22176654500898,32.883377310672969],[-117.22164197138419,32.883220154555154],[-117.22151223848624,32.883065999312507],[-117.22137744810297,32.882914964061079],[-117.22128649042301,32.882815843964487],[-117.2212855832979,32.882814507492171],[-117.22128477929382,32.882813315390443],[-117.22128396460363,32.882812123372744],[-117.22128315311933,32.882810931329821],[-117.22128233845909,32.882809742017137],[-117.22128152700469,32.882808552679201],[-117.22128071338318,32.882807360653075],[-117.22127989872295,32.882806171340313],[-117.22127908085697,32.882804982052839],[-117.22127826620675,32.882803793641706],[-117.2212774515466,32.882802604328994],[-117.22127662726894,32.882801415091834],[-117.22127581370735,32.882800228475716],[-117.22127498945957,32.882799041943528],[-117.22127458868063,32.882798459860119],[-117.22127222731753,32.882795889506092],[-117.22126222526944,32.882785045265706],[-117.22125219351163,32.882774220194719],[-117.22124213202433,32.882763412489844],[-117.22123204827778,32.882752621190548],[-117.22122193910597,32.882741849928649],[-117.22121180019469,32.882731095131206],[-117.22120163581833,32.882720356764516],[-117.22119144597696,32.882709634828586],[-117.22118123284757,32.882698932913314],[-117.22117099104729,32.882688247453935],[-117.22116072274328,32.882677581138744],[-117.22115042577832,32.882666932181223],[-117.22114010660394,32.882656304137512],[-117.2211297608561,32.882645688926225],[-117.22111938966314,32.882635091949034],[-117.22110899304506,32.882624515009283],[-117.22109856992311,32.882613957213593],[-117.22108812134614,32.882603416750285],[-117.22107764622562,32.88259289182438],[-117.22106714570977,32.882582389640859],[-117.22105661864033,32.882571902093126],[-117.2210460672343,32.882561436377614],[-117.22103549140196,32.882550984379407],[-117.22102488802716,32.882540554238673],[-117.22101426133452,32.882530141413476],[-117.22100360600093,32.882519747749136],[-117.22099292733958,32.882509370498568]]]}},{"attributes":{"OBJECTID":38,"Campus":"La Jolla Campus","FeatureID":null,"SHAPE.STLength()":32113.368541068307,"SHAPE.STArea()":8838828.3304704335,"GlobalID":"{4A1FBC00-E2AB-4F0C-A5D5-CA952EC2C574}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887928000,"Clery":"Yes","Region":"Coastal Campus"},"geometry":{"rings":[[[-117.24245966347868,32.869961497347454],[-117.24272279110461,32.86879051047643],[-117.24413647173397,32.868806628577858],[-117.24414627032347,32.8673637415489],[-117.24415114529096,32.866646160855659],[-117.24416091370605,32.866645978548718],[-117.24429443440906,32.86664346935644],[-117.24456794746467,32.866638329005781],[-117.24488378272738,32.866632391860009],[-117.24525172973607,32.866626305541899],[-117.245766199972,32.866616662936288],[-117.24645323488967,32.866602877950541],[-117.24646532732564,32.866520327182542],[-117.24653459360987,32.866022280697905],[-117.24657985894318,32.865692108029243],[-117.24668923625373,32.864894273280896],[-117.24677224490212,32.864288785060303],[-117.24724764920606,32.864280542480905],[-117.24787607396638,32.864269641924253],[-117.24792165711453,32.864268938277931],[-117.24835146471754,32.864262290642131],[-117.24908410260036,32.864249401023351],[-117.24957902055989,32.864241370394581],[-117.25038002277283,32.864227056053451],[-117.25106705951541,32.864215578966196],[-117.25137967303993,32.864209747733405],[-117.25210899508411,32.864196137530811],[-117.25228481238011,32.864191962724135],[-117.25244760281856,32.864187890666166],[-117.25243971227462,32.864199913696105],[-117.25243169704603,32.864211871909475],[-117.25242355404063,32.864223775250586],[-117.25241528959677,32.864235617355838],[-117.25240689405787,32.864247394696442],[-117.25239838450781,32.864259106232062],[-117.25238974926623,32.86427075836967],[-117.25238099037735,32.864282342976928],[-117.25237066936972,32.864295710392639],[-117.25236360670112,32.864308092810766],[-117.25235663847998,32.864320512335652],[-117.25234975829579,32.864332969019323],[-117.252342970371,32.864345458318837],[-117.25233627476713,32.864357985644112],[-117.25232967252185,32.864370548281556],[-117.25232315932048,32.864383142659236],[-117.25231674053586,32.864395771438673],[-117.25231041722616,32.864408433709691],[-117.25230418512808,32.864421130408616],[-117.25229804421089,32.864433858830388],[-117.25229199872756,32.864446617137148],[-117.25228604767142,32.864459410747443],[-117.25228019200819,32.864472230636018],[-117.252274427526,32.86448508224759],[-117.2522687606557,32.864497967333378],[-117.25226318486374,32.864510875125504],[-117.25225770885135,32.864523819079686],[-117.25225232287981,32.864536788453798],[-117.25224703552712,32.864549785883639],[-117.25224184248893,32.864562808698835],[-117.25223674810043,32.864575862274698],[-117.25223174479049,32.864588938556999],[-117.25222683902089,32.864602042002026],[-117.25222203186001,32.864615172601077],[-117.2522173200617,32.864628326773598],[-117.25221495400665,32.864635044164267],[-117.25221026684079,32.864648203547119],[-117.25220565258077,32.864661384882126],[-117.25220110685044,32.864674579187231],[-117.25219663291651,32.864687791846499],[-117.25219223077912,32.86470102285994],[-117.25218789718173,32.864714267745207],[-117.2521836353808,32.86472753098456],[-117.25217944107214,32.864740809907737],[-117.25217532388146,32.86475410533847],[-117.25217127738827,32.864767416427064],[-117.25216729945573,32.864780743190799],[-117.25216339326852,32.864794083800383],[-117.25215955883701,32.864807439157538],[-117.25215579615086,32.864820808360605],[-117.25215210630937,32.864834194105789],[-117.25214848712442,32.864847591902262],[-117.25214494075335,32.864861003535964],[-117.25214146507999,32.864874430827506],[-117.25213806217947,32.864887868349669],[-117.2521347299562,32.864901319726407],[-117.25213147052641,32.864914783137039],[-117.25212828604741,32.864928260367606],[-117.25212517006788,32.86494174786344],[-117.25212212903925,32.864955249179189],[-117.25211915649984,32.864968759858598],[-117.25211625888062,32.864982281652935],[-117.25211343299691,32.86499581639152],[-117.25211068199242,32.865009358638389],[-117.25210799952856,32.865022914757269],[-117.25210539196449,32.865036480187712],[-117.25210285715312,32.865050054045525],[-117.25210039618344,32.865063638125299],[-117.25209800475115,32.865077229756686],[-117.25209568719143,32.865090834315133],[-117.25209344558972,32.865104447274852],[-117.25209127562117,32.865118064162175],[-117.25208917629959,32.865131692199228],[-117.25208714972065,32.865145327761937],[-117.25208519802129,32.865158970832958],[-117.25208332117069,32.865172618707362],[-117.25208151923043,32.865186276795079],[-117.25207978253371,32.86519994066586],[-117.25207812177474,32.865213611134557],[-117.25207653798095,32.865227284586034],[-117.25207502270783,32.865240970106157],[-117.25207358333155,32.865254658617637],[-117.25207221773584,32.86526835194114],[-117.2520709248523,32.865282050085405],[-117.25206970682817,32.865295753934646],[-117.25206856043759,32.865309461711583],[-117.25206748782776,32.865323174300585],[-117.25206648794058,32.865336892611936],[-117.25206556283074,32.865350609415003],[-117.25206471044355,32.865364331940462],[-117.25206393185773,32.865378061081266],[-117.25206323127513,32.865391790491174],[-117.25206259696382,32.865405522068741],[-117.25206203640269,32.865419255753409],[-117.25206155171828,32.865432990626104],[-117.25206114079437,32.865446728507514],[-117.25206080575754,32.865460468478638],[-117.25206054230337,32.865474207869163],[-117.25206035046271,32.865487949384047],[-117.25206023341008,32.865501690292341],[-117.25206019117621,32.865515433299031],[-117.25206022055598,32.865529178430108],[-117.2520603246622,32.86554291754458],[-117.25206050358736,32.865556658757399],[-117.2520607551638,32.865570399380964],[-117.25206108042927,32.865584136701592],[-117.25206147837692,32.86559787613794],[-117.25206195001358,32.865611612271316],[-117.25206249747615,32.865625345084439],[-117.25206311652178,32.865639077316963],[-117.25206381035576,32.865652808942805],[-117.25206457568051,32.865666531873053],[-117.25206541585528,32.865680259606719],[-117.25206632751063,32.865693977743071],[-117.2520673139647,32.865707696174447],[-117.25206837621408,32.865721408580548],[-117.25206951214253,32.865735116782083],[-117.25207071749708,32.865748822616943],[-117.25207199649989,32.865762521542131],[-117.25207335130841,32.865776215343757],[-117.25207477765932,32.865789904958064],[-117.25207627766906,32.865803588564361],[-117.25207785347422,32.865817266145413],[-117.25207950084248,32.865830941342473],[-117.25208121965058,32.865844603335518],[-117.2520830131962,32.865858260213642],[-117.2520848793323,32.865871911092377],[-117.25208681911701,32.865885555061503],[-117.25208883363935,32.865899193915631],[-117.2520909174752,32.865912820484802],[-117.25209286094629,32.865925099175051],[-117.25209591351968,32.865938597051944],[-117.25209890105474,32.865952107179105],[-117.25210182029484,32.865965625074118],[-117.25210467342819,32.865979155228075],[-117.2521074593452,32.865992694042951],[-117.25211018021352,32.866006244206339],[-117.2521128360023,32.866019803013309],[-117.25211542347549,32.866033367784901],[-117.25211794270491,32.866046944832689],[-117.25212039684445,32.866060529622445],[-117.25212278164096,32.866074123992128],[-117.25212510242619,32.86608772699671],[-117.25212735489562,32.866101335965908],[-117.25212954228535,32.866114953578695],[-117.2521316614003,32.866128580762776],[-117.25213371215835,32.86614221030478],[-117.25213569786739,32.866155851195408],[-117.25213761523992,32.866169496247323],[-117.25213946753257,32.866183149942856],[-117.25214124830404,32.86619680962901],[-117.25214296716996,32.866210475227795],[-117.25214461451461,32.866224146817238],[-117.25214619674844,32.866237824345291],[-117.25214770743014,32.866251505158942],[-117.25214915944215,32.866265194564264],[-117.25215053990202,32.866278887255199],[-117.25215185202515,32.866292584107505],[-117.25215309902707,32.866306285996778],[-117.25215427769211,32.866319992047323],[-117.25215538480485,32.866333701383532],[-117.25215643106992,32.866347415722061],[-117.25215740469363,32.866361131551571],[-117.25215831320621,32.866374853319748],[-117.25215915337154,32.866388578347525],[-117.25215992835383,32.866402303002346],[-117.25216024449627,32.866408295269267],[-117.25216204447612,32.866421952094122],[-117.25216361710046,32.866435629699858],[-117.25216496447534,32.866449325364286],[-117.25216608761757,32.866463034570401],[-117.25216698331155,32.866476756442452],[-117.25216765149571,32.866490485570552],[-117.25216809433739,32.866504224642334],[-117.25216830957655,32.86651796285512],[-117.25216830051068,32.866531708297885],[-117.25216806271199,32.866545447480313],[-117.25216759727965,32.86655918309885],[-117.2521669063092,32.866572911529296],[-117.2521659876536,32.866586631887479],[-117.25216484446644,32.866600339639021],[-117.252163473522,32.866614033006535],[-117.25216187692608,32.866627709267725],[-117.25216005570599,32.866641364807236],[-117.25215800877262,32.866654997830366],[-117.25215573715322,32.866668604721816],[-117.2521535737484,32.866680455028948],[-117.252005576575,32.86730024934716],[-117.25191421092075,32.867682864135638],[-117.25166231788224,32.868729350825426],[-117.25165848641872,32.868742707041747],[-117.25165472345739,32.8687560735235],[-117.25165102591612,32.868769461116742],[-117.25164739792496,32.868782857163474],[-117.25164383735732,32.868796262582713],[-117.25164034863076,32.868809689963172],[-117.25163692304378,32.86882312584909],[-117.25163356808569,32.868836571081566],[-117.25163027525024,32.868850029336485],[-117.25162706057412,32.868863501385675],[-117.25162390905824,32.868876983743704],[-117.25162082819196,32.868890477251632],[-117.25161780940729,32.868903980175432],[-117.25161486664528,32.868917496910782],[-117.25161198811205,32.868931023946303],[-117.25160917805056,32.868944558542488],[-117.25160644079632,32.868958106074516],[-117.25160376774016,32.868971661201812],[-117.25160116316611,32.868985224791317],[-117.25159863459439,32.868998800389114],[-117.25159616382045,32.869012384535786],[-117.25159376792918,32.869025976191011],[-117.25159144161942,32.869039579004905],[-117.25158918267219,32.869053185781389],[-117.2515869933065,32.869066803716464],[-117.25158487133422,32.869080428319172],[-117.25158282211807,32.869094061349486],[-117.25158084030572,32.869107701949027],[-117.25157892159247,32.869121347447589],[-117.25157708310437,32.869135000411404],[-117.25157530775661,32.869148661880843],[-117.25157359977159,32.869162327312893],[-117.25157196454293,32.86917600117259],[-117.25157039667718,32.86918967899495],[-117.25156890474238,32.869203362513943],[-117.25156747163318,32.869217050966569],[-117.25156696184726,32.869222112110492],[-117.25144808288915,32.870223544283817],[-117.25139434248699,32.870652750925629],[-117.25139213592519,32.870666366290386],[-117.25138922835963,32.870679885439138],[-117.25138563879661,32.870693288379279],[-117.25138135729127,32.870706546335292],[-117.25137639851449,32.870719633939366],[-117.25137077723984,32.87073253484008],[-117.2513644994262,32.870745209312126],[-117.25135757240901,32.870757644671421],[-117.25135001834872,32.870769816390997],[-117.25134184552603,32.870781700958219],[-117.25133725491854,32.870787892603786],[-117.2513275249507,32.870798910584391],[-117.25131725665372,32.870809573129101],[-117.2513064626542,32.870819863002176],[-117.25129516944818,32.870829761052001],[-117.25128338860414,32.870839250953246],[-117.25127115409744,32.870848313493617],[-117.25126632727816,32.870851683673237],[-117.2512551127798,32.870861644203906],[-117.25124338802088,32.870871180537691],[-117.25123117731965,32.870880269933622],[-117.25121850509701,32.870888898667403],[-117.25120539360597,32.870897050327017],[-117.25119187252788,32.870904703931657],[-117.25117582818491,32.870912887470119],[-117.25116194373823,32.8709200669905],[-117.25114778442224,32.870926849261537],[-117.25113336300753,32.870933229671039],[-117.25111869650753,32.870939200866907],[-117.25110380082631,32.870944751899358],[-117.25108869406648,32.870949877211039],[-117.25107339116609,32.870954574877373],[-117.25105791019701,32.87095883663612],[-117.25104226498804,32.870962656964629],[-117.25102648329889,32.870966033834449],[-117.25101057363655,32.870968963569631],[-117.25099455837751,32.870971440578323],[-117.25097845248052,32.870973464739286],[-117.25096227404822,32.87097503049538],[-117.25094541266674,32.87097677221287],[-117.25092920129022,32.870978072215415],[-117.25091295554458,32.870978981135025],[-117.25089668299131,32.870979506124371],[-117.25088039958584,32.870979640741993],[-117.250864118191,32.870979388490738],[-117.2508478516081,32.870978747463319],[-117.25083161374801,32.870977719350535],[-117.2508154174222,32.870976303147017],[-117.25079927441476,32.870974501462427],[-117.25078319972555,32.870972317782353],[-117.25076720081351,32.870969750242871],[-117.25075129590428,32.870966804106949],[-117.25073549781965,32.870963479270728],[-117.25071981510757,32.870959775664979],[-117.2507042628191,32.870955701283656],[-117.25068885169024,32.87095126054853],[-117.25067359988518,32.870946453312598],[-117.25065851064024,32.870941282254975],[-117.25064360220155,32.870935754441838],[-117.25062888529493,32.870929873393429],[-117.25061436960844,32.87092364534373],[-117.2506000722788,32.870917073760793],[-117.25058599762087,32.870910162216916],[-117.250572158559,32.870902919624903],[-117.25055856899355,32.870895346774155],[-117.25055022999511,32.870890467308975],[-117.25053848511141,32.870880950675236],[-117.25052696242412,32.870871240168412],[-117.25051566836451,32.870861337539985],[-117.25050460734994,32.870851255378689],[-117.25049378467162,32.870840989133079],[-117.25048319719578,32.870830545140763],[-117.25047285991168,32.870819925985728],[-117.2504627676,32.870809142531265],[-117.25045293092488,32.870798192887577],[-117.25044334885884,32.870787080670056],[-117.25043402682614,32.870775813048766],[-117.25042496915184,32.870764394497641],[-117.25041618118847,32.870752825874995],[-117.25002423227329,32.870174608678745],[-117.2500159266931,32.870162789044606],[-117.25000779857399,32.870150882307456],[-117.24999985215885,32.870138885727549],[-117.24999208755018,32.870126808321771],[-117.24998450684387,32.870114646466057],[-117.24997710792341,32.870102401981114],[-117.24996989408642,32.87009008295604],[-117.2499628674389,32.870077686668608],[-117.24995603012798,32.870065214003169],[-117.24994938008845,32.870052671288718],[-117.24994292159404,32.870040058490687],[-117.24993665036062,32.870027374742122],[-117.24993057498702,32.870014624482074],[-117.24992468696649,32.870001811386487],[-117.24991899700399,32.869988937172224],[-117.24991350294209,32.869976000053285],[-117.24990820271556,32.869963006358653],[-117.24990310063899,32.869949959660488],[-117.24990111245316,32.869944728471602],[-117.24974577939463,32.86945949443637],[-117.24974083923253,32.869446398628867],[-117.24973554227896,32.869433405802411],[-117.24972988857495,32.869420519563675],[-117.24972388139778,32.869407746198362],[-117.2497175261512,32.869395091073152],[-117.24971082195134,32.869382570426623],[-117.24970377308237,32.869370185125781],[-117.249696387044,32.869357936913481],[-117.2496886640002,32.869345840216234],[-117.24968061035159,32.869333894080469],[-117.24967223374124,32.869322112872275],[-117.2496635298955,32.869310496626177],[-117.24965451175866,32.869299056058345],[-117.2496451793924,32.86928779657871],[-117.24963554030649,32.869276720831721],[-117.2496255967301,32.869265836914884],[-117.24961535300881,32.869255151105399],[-117.2496048273984,32.869244671371142],[-117.24959400923498,32.869234399601773],[-117.24958291247995,32.869224341996578],[-117.24957154469456,32.869214505708271],[-117.2495599059299,32.869204895245147],[-117.24954800584307,32.869195514135924],[-117.24953584778262,32.869186374977964],[-117.24952344549503,32.869177465035513],[-117.24951080462981,32.869168811315298],[-117.24949791972173,32.86916040304034],[-117.24948481228306,32.869152252661166],[-117.24947148016663,32.869144359293244],[-117.24945794160764,32.869136729101257],[-117.24944418917806,32.869129366653958],[-117.24943024004467,32.869122278124671],[-117.24941609951888,32.869115460765116],[-117.24940177309647,32.869108928056967],[-117.24938727353712,32.869102674486477],[-117.24937260523757,32.869096710839052],[-117.24935777774191,32.869091030725137],[-117.24934279653561,32.869085646724749],[-117.24932766908751,32.869080557875833],[-117.24931240718092,32.869075766788093],[-117.24929701940441,32.869071276999101],[-117.24928150790483,32.869067089393198],[-117.24926588979775,32.869063205635371],[-117.24924818326252,32.869060218873933],[-117.24907313041768,32.869030666690634],[-117.24905047148387,32.869030621777853],[-117.24903416088941,32.869030588649558],[-117.24901788060689,32.869030684224185],[-117.24900160444997,32.869031143168243],[-117.24898534843487,32.8690319644505],[-117.24896912638978,32.869033142548702],[-117.24895294696432,32.869034686410345],[-117.24893681747375,32.8690365815484],[-117.24892075727257,32.869038838627262],[-117.24890476947388,32.86904144950617],[-117.24888887011433,32.869044414957173],[-117.24887306556344,32.869047731321828],[-117.24886825766725,32.86904881441874],[-117.2488525550863,32.869052453684354],[-117.24883695747613,32.869056397792278],[-117.24882147016855,32.869060645797774],[-117.24880610271799,32.869065192213142],[-117.24879086685668,32.869070035139977],[-117.24877576793706,32.86907517543694],[-117.24876080802413,32.869080606775036],[-117.24874600206584,32.869086328131843],[-117.24873135857887,32.869092336733175],[-117.24871688180623,32.869098629839669],[-117.24870258022362,32.869105201070525],[-117.24868846450529,32.869112049437845],[-117.24867453670612,32.869119167711055],[-117.24866080862999,32.869126560303556],[-117.24864728439729,32.86913421365589],[-117.24863397472294,32.869142130386791],[-117.24862088379886,32.869150303248347],[-117.24860802014184,32.869158729466548],[-117.24859539114907,32.86916740176779],[-117.24858300108414,32.869176319215867],[-117.24857085626547,32.869185473644031],[-117.24855896737759,32.869194864966012],[-117.24854733857141,32.869204482327355],[-117.24853597303186,32.869214323898909],[-117.2485248835291,32.869224385068748],[-117.24851406677594,32.869234658649546],[-117.24850353552209,32.86924513822602],[-117.24849329616816,32.869255822844906],[-117.24848334859122,32.869266701686165],[-117.24847369705499,32.869277773813671],[-117.24846708809383,32.869285682362502],[-117.24846003735819,32.869298069862687],[-117.2484530284639,32.869310472354087],[-117.24844606576667,32.869322897015422],[-117.24843914920508,32.869335338436713],[-117.24843227555336,32.869347794840607],[-117.24842545020496,32.869360270692276],[-117.24841866781759,32.8693727660348],[-117.24841193154546,32.869385276334008],[-117.24840524034069,32.86939780340191],[-117.24839859529212,32.869410349033124],[-117.24839199317393,32.8694229114503],[-117.24838543933875,32.869435491511922],[-117.2483789284442,32.869448089261198],[-117.24837246366501,32.869460701967149],[-117.24836604715853,32.869473331415882],[-117.24835967357235,32.869485976748983],[-117.24835334504337,32.869498637949107],[-117.2483470669445,32.869511317678139],[-117.24834083067708,32.869524011496793],[-117.2483346394976,32.869536723887506],[-117.24832849869712,32.869549450298798],[-117.24832239974856,32.869562192603041],[-117.24831634909334,32.869574953453487],[-117.24831034557097,32.86958772474383],[-117.24830438710592,32.869600511901197],[-117.24829847367771,32.869613313122336],[-117.24829260750515,32.869626135603404],[-117.2482867863695,32.869638972148223],[-117.24828101452415,32.869651820918946],[-117.2482752877157,32.869664683753491],[-117.24826960703312,32.869677562446512],[-117.24785516968167,32.870755597028214],[-117.24785010748805,32.870768657367485],[-117.24784477300298,32.870781640551755],[-117.24783916402809,32.870794541188225],[-117.24783328696385,32.870807358323461],[-117.2478271417181,32.870820083842347],[-117.2478207325442,32.870832715907063],[-117.24781405726415,32.870845250928092],[-117.24780712115889,32.870857683452343],[-117.24779992633462,32.870870010757443],[-117.24779247277075,32.870882231040028],[-117.2477847635294,32.870894331650817],[-117.24777680619211,32.870906321546087],[-117.24776859315679,32.87091818996609],[-117.24776013825218,32.870929931388723],[-117.24775143293039,32.870941545882872],[-117.24774248997201,32.870953029738352],[-117.24773330291517,32.870964378498456],[-117.24772388023595,32.870975585782517],[-117.24771422835535,32.870986652440351],[-117.24770434400654,32.870997573087777],[-117.24769423248075,32.871008343173258],[-117.24768389804157,32.871018961760626],[-117.24767334065824,32.871029426144737],[-117.24766256559145,32.871039729069132],[-117.24765157389925,32.871049869623427],[-117.24764685095421,32.871054120732317],[-117.2476364012475,32.87106465818718],[-117.2476257975613,32.871075092281522],[-117.24761505908729,32.871085419253454],[-117.24760417627044,32.871095644590461],[-117.24759315219359,32.871105757446642],[-117.24758199013355,32.871115764107849],[-117.24757068893,32.871125656467612],[-117.24755925401722,32.87113544259774],[-117.24754768418357,32.871145109883471],[-117.24753597629531,32.871154664662313],[-117.24752414635894,32.871164105001569],[-117.24751218149154,32.871173425594641],[-117.24750008816525,32.871182631799783],[-117.24748787056201,32.871191715467496],[-117.24747552657549,32.871200679319863],[-117.24746306151742,32.871209520608829],[-117.24745047430908,32.871218238441209],[-117.24743776493011,32.871226831013765],[-117.24742494085986,32.871235298265994],[-117.24741200102972,32.871243640206487],[-117.24739894540922,32.871251854130264],[-117.2473857750258,32.87125993642195],[-117.24737249739979,32.87126789062777],[-117.24735910929515,32.871275714068631],[-117.24734330661245,32.871284703122392],[-117.24732962033964,32.871292146625308],[-117.24731583863881,32.871299467357339],[-117.24730196361634,32.87130666259629],[-117.24728799953597,32.871313731405813],[-117.24727394637716,32.871320671982673],[-117.24725980737621,32.871327487005907],[-117.24724557822846,32.87133417380501],[-117.24723126958808,32.871340729588724],[-117.24721687399627,32.871347156220637],[-117.24720239674429,32.871353449149389],[-117.24718784215717,32.871359612848742],[-117.24717321233106,32.871365643694709],[-117.24715850193388,32.871371542632069],[-117.24714372161969,32.871377306869604],[-117.24712886175193,32.871382934681506],[-117.24711393838835,32.871388428643492],[-117.24709894511814,32.871393788807168],[-117.24708388296902,32.871399011557237],[-117.2470687562558,32.871404100465909],[-117.24705356273931,32.871409046533635],[-117.24703830890211,32.871413856020531],[-117.2470229958025,32.871418528016079],[-117.24700762232095,32.871423058020611],[-117.2469921906557,32.871427451426847],[-117.24697670610838,32.871431704585028],[-117.24696116864848,32.871435814790132],[-117.2469455793853,32.871439785640121],[-117.24692994363068,32.871443614386934],[-117.24691425072032,32.871447302920124],[-117.24689851769887,32.87145084659327],[-117.24688274031287,32.871454247244309],[-117.24686692177804,32.871457505748978],[-117.2468510599473,32.87146062122283],[-117.24683516014269,32.871463591819385],[-117.24681922235411,32.871466416636991],[-117.24680325515989,32.871469098311742],[-117.24678724889293,32.871471632412735],[-117.24677121323079,32.871474024272473],[-117.24675514813273,32.871476270284212],[-117.24673905680413,32.871478370422153],[-117.24672293708792,32.871480322900169],[-117.24670679327828,32.871482129487063],[-117.24669062752254,32.871483791067298],[-117.24667444405384,32.871485303999677],[-117.24665823970761,32.871486671916799],[-117.24664202085401,32.871487891160143],[-117.24662578431831,32.871488964460731],[-117.24660953862796,32.871489889946112],[-117.24659327844067,32.871490667659494],[-117.24657701338297,32.871491298424878],[-117.24656722661179,32.871491605507956],[-117.24630681341822,32.871504699852309],[-117.24600744923103,32.871558252619721],[-117.24600720181444,32.871558296094662],[-117.24598502151321,32.871562264949567],[-117.2444539915129,32.871541615168439],[-117.24421619454192,32.871538471935352],[-117.24411843661764,32.871537178217352],[-117.2440663487932,32.871536489065157],[-117.24388227138959,32.87153261628778],[-117.24388026658799,32.871527872082829],[-117.2438871055674,32.871526936961281],[-117.24387727335004,32.871521518993411],[-117.24387392350813,32.87151330034898],[-117.24386949131315,32.871500077589317],[-117.2438649706704,32.871486876281189],[-117.24386036689177,32.871473693676684],[-117.24385567469606,32.871460535228636],[-117.24385089404248,32.871447397330527],[-117.24384603349931,32.87143428171683],[-117.24384108455953,32.871421192062911],[-117.24383604822025,32.871408122048656],[-117.24383093095361,32.871395077032346],[-117.24382572525987,32.871382055270843],[-117.24382043650174,32.871369058524508],[-117.24381505827873,32.871356087746527],[-117.24380960016633,32.871343139252964],[-117.24380405796192,32.871330219389698],[-117.24379843055644,32.871317324558788],[-117.2437927158129,32.871304454777409],[-117.2437869191144,32.871291613609138],[-117.24378103935183,32.871278797455929],[-117.24377507763438,32.8712660099159],[-117.24376902860959,32.871253250130287],[-117.24376290190393,32.871240518923415],[-117.24375668686315,32.871227819086229],[-117.24375038874825,32.871215143362377],[-117.24374401192482,32.871202499832549],[-117.24373755101998,32.871189885834561],[-117.24373100499577,32.871177304082067],[-117.24372437913351,32.871164749122201],[-117.24371767138797,32.871152229086945],[-117.24371088274613,32.8711397367545],[-117.24370401006374,32.871127277560525],[-117.24369705869334,32.871114852363789],[-117.24369002433055,32.871102458493638],[-117.24368291126959,32.871090097718948],[-117.24367571737363,32.871077770056971],[-117.24366844263245,32.871065474606027],[-117.2436610860082,32.87105321407963],[-117.24365364963776,32.871040988460663],[-117.24364613456935,32.871028795937114],[-117.24363853869657,32.871016639231208],[-117.24363086524521,32.871004520120451],[-117.24362311419492,32.87099243680148],[-117.24361528124129,32.870980386603648],[-117.24360737179801,32.870968375795741],[-117.24359938049221,32.870956401715581],[-117.24359131479297,32.870944463401393],[-117.24358317153563,32.87093256448567],[-117.24357495068972,32.870920702263298],[-117.24356664907017,32.870908878563391],[-117.24355827523496,32.870897094218861],[-117.24354981743089,32.870885349324247],[-117.24354128633256,32.870873642891937],[-117.24353267984374,32.870861978545747],[-117.24352445791746,32.870850965776185],[-117.2435165155285,32.870838968753745],[-117.24350847644071,32.870827019399336],[-117.24350033317491,32.870815117773056],[-117.24348826533725,32.87080352273783],[-117.24348102577197,32.870791215270543],[-117.24347531050611,32.870779711628593],[-117.24346677198939,32.870768008857937],[-117.24345813258162,32.870756361002847],[-117.24344940074911,32.870744760781292],[-117.24344324768957,32.870730350714759],[-117.24343537973836,32.870718319723991],[-117.24342741189328,32.870706337328649],[-117.24341933665463,32.870694401785521],[-117.24341116048421,32.870682517551387],[-117.2434028844301,32.870670682814243],[-117.24339450529716,32.870658898501539],[-117.24338602525286,32.870647167301072],[-117.24337744429718,32.870635489212773],[-117.24336876025258,32.870623860647264],[-117.24335998602203,32.870612288714661],[-117.2433511076341,32.870600766313345],[-117.24334212840618,32.870589303335805],[-117.24333305680456,32.870577892499973],[-117.24332388005861,32.8705665384173],[-117.2433146067263,32.870555241920641],[-117.2433052400027,32.870544002082539],[-117.24329577669273,32.870532819830494],[-117.24328621891294,32.870521693343889],[-117.24327656349872,32.870510626255118],[-117.24326681152867,32.870499619457355],[-117.24325696942387,32.870488673800608],[-117.24324702968454,32.870477787541645],[-117.24323700300563,32.870466961496227],[-117.24322687658598,32.870456197570789],[-117.24321666219905,32.870445497474101],[-117.24320635446169,32.870434857642493],[-117.24319595553132,32.870424279861979],[-117.24318547083166,32.870413771303042],[-117.24317488744956,32.870403323953667],[-117.2431642182371,32.870392940415705],[-117.2431534610981,32.87038262431313],[-117.24314261708062,32.870372373833881],[-117.24313168193123,32.870362190815634],[-117.24312066417727,32.870352073386343],[-117.24310955529137,32.870342023418054],[-117.24309836170465,32.870332042662511],[-117.24308708553377,32.870322129299197],[-117.24307571827164,32.870312287003458],[-117.24306427379811,32.870302514761953],[-117.24305274141841,32.870292811758887],[-117.24304112968026,32.870283177925472],[-117.24302943327177,32.870273616009726],[-117.24301765327171,32.870264126904658],[-117.24300579608062,32.870254709656997],[-117.24299385424978,32.87024536703192],[-117.24298183626576,32.870236093550645],[-117.24296973688813,32.870226898272797],[-117.242957557114,32.870217774878043],[-117.24294530338472,32.870208726019904],[-117.24293296823122,32.870199752660092],[-117.24292056021135,32.870190855631513],[-117.24290807398279,32.870182034977233],[-117.24289551165194,32.87017328797485],[-117.24288287754347,32.870164619098468],[-117.24287016633546,32.870156030194323],[-117.2428573812129,32.870147519433232],[-117.24284452537097,32.870139085887807],[-117.2428315988097,32.870130729557978],[-117.24281859728571,32.870122453183086],[-117.24280552615149,32.870114257621829],[-117.24279238751335,32.87010614015206],[-117.24277917714841,32.870098105316451],[-117.242765897163,32.870090150392741],[-117.24275255292989,32.870082278042972],[-117.2427391369597,32.870074487425583],[-117.24272565780009,32.870066778471902],[-117.24271210689317,32.870059150348908],[-117.24269849924822,32.870051607444701],[-117.24269208263942,32.870048107914236],[-117.24268630886073,32.870042959330483],[-117.2426815054924,32.870038677645823],[-117.24245966347868,32.869961497347454]],[[-117.24853301146474,32.871487223019614],[-117.24851674301169,32.871486706141219],[-117.24850509625489,32.871486953564634],[-117.24768105055527,32.871485364906349],[-117.24766544475784,32.871481467317878],[-117.24765039343937,32.871476240580641],[-117.24763605006676,32.871469742971101],[-117.24762257357206,32.871462043542664],[-117.24761010051036,32.871453216939912],[-117.24759876129158,32.871443361302596],[-117.24758867570216,32.871432580266756],[-117.24757995287423,32.871420980259643],[-117.24757602898352,32.87141475109761],[-117.24757011918317,32.871401974137996],[-117.2475674674134,32.871388439553932],[-117.2475681850586,32.871374735288391],[-117.24757223927975,32.871361452252195],[-117.24757945701273,32.871349159944337],[-117.24758953017795,32.8713383946872],[-117.24759789110053,32.8713321186355],[-117.24760316414084,32.87132841225219],[-117.24761559674879,32.871319536042932],[-117.24762791373969,32.871310547145626],[-117.24764011189778,32.871301444684413],[-117.24765219554817,32.871292233133225],[-117.24766415718085,32.871282909847494],[-117.24767600003179,32.871273477506314],[-117.24768772089571,32.871263936135662],[-117.24769931766626,32.87125428845777],[-117.24771078927503,32.87124453448137],[-117.24772213469436,32.871234677821768],[-117.24773334962998,32.871224716710152],[-117.24774444051315,32.871214652898118],[-117.24775539881664,32.871204488258087],[-117.24776622560873,32.871194222781462],[-117.24777692093056,32.87118386007495],[-117.24778747941919,32.871173398378367],[-117.24779965514757,32.871161190458174],[-117.24781041402257,32.871150873224607],[-117.24782100050848,32.871140431137469],[-117.24783141784125,32.871129866875926],[-117.24784165646615,32.87111918592759],[-117.24785172593798,32.871108382804927],[-117.24786161352726,32.871097465726557],[-117.24787132456611,32.871086433747571],[-117.24788084842092,32.871075291462752],[-117.24789019897167,32.871064037858304],[-117.24789935915358,32.8710526757773],[-117.24790833543884,32.871041210577957],[-117.24791712245445,32.871029639598575],[-117.24792571812492,32.871017968266358],[-117.2479341246281,32.871006200170775],[-117.24794233767996,32.870994334444738],[-117.24795035410585,32.870982373819203],[-117.24795817822054,32.870970321866267],[-117.24796580146617,32.870958177753444],[-117.2479732292465,32.870945946847584],[-117.24798045305474,32.870933632824361],[-117.24798747501764,32.870921234764957],[-117.24799429624474,32.87090875626749],[-117.2480009092567,32.870896197392284],[-117.24800731947785,32.870883565309612],[-117.24801352264461,32.870870860955684],[-117.24801951768852,32.870858084339197],[-117.24802530249325,32.870845237280747],[-117.24803087820916,32.870832326985088],[-117.24803624267889,32.870819351666114],[-117.24804139380659,32.870806314947849],[-117.24845260054698,32.869731062481513],[-117.2484553199664,32.869724749901955],[-117.24846092875201,32.869711846532255],[-117.2484666051043,32.869698965159969],[-117.24847234797515,32.86968610759704],[-117.24847815945031,32.869673269317843],[-117.24848403958093,32.869660454830807],[-117.24848998085712,32.869647661491271],[-117.24849599504203,32.869634890105914],[-117.24850207144092,32.869622139859395],[-117.24850821650539,32.869609414306659],[-117.2485144259104,32.869596708973774],[-117.24852070509041,32.869584031932625],[-117.2485270496589,32.869571373299401],[-117.24853345863956,32.869558741197771],[-117.24853993414877,32.869546133807056],[-117.24854647400866,32.869533547537856],[-117.24855308041759,32.869520987782913],[-117.24855975121804,32.869508452756094],[-117.24856649175234,32.869495942414311],[-117.24857329346261,32.869483455924922],[-117.24858016065338,32.869470995958359],[-117.24858709437247,32.869458560702689],[-117.24859409250352,32.869446151978423],[-117.24860115291987,32.869433770704603],[-117.2486082787858,32.869421413248467],[-117.24861546696772,32.869409085947794],[-117.248622730246,32.869396785092142],[-117.24863004616273,32.869384509059572],[-117.24863822786847,32.869371315261603],[-117.24864793862963,32.869360284122919],[-117.24865805628045,32.869349515710532],[-117.24866857031043,32.869339025439047],[-117.24867947651727,32.869328819654548],[-117.24869076007579,32.869318910199581],[-117.24870240832836,32.869309311604312],[-117.24871441596343,32.869300026616756],[-117.24872675855009,32.869291068058921],[-117.2487394372591,32.869282444938612],[-117.2487524329608,32.86927416642795],[-117.24876573287492,32.869266236237102],[-117.24877932539191,32.869258667084331],[-117.24879319349847,32.869251466321082],[-117.24880732551361,32.869244640353905],[-117.24882170656106,32.869238196516989],[-117.24883632065509,32.869232138546529],[-117.24885115721389,32.869226475545403],[-117.24886619600871,32.86922121398937],[-117.24888143170776,32.869216354823202],[-117.24889683877089,32.869211907270873],[-117.24891240331868,32.869207872346209],[-117.24892416252126,32.869205696934543],[-117.24894015370816,32.869203099552195],[-117.2489562241485,32.869200894689733],[-117.24897236855162,32.869199086898512],[-117.24898856556921,32.869197678154705],[-117.2490048055752,32.869196667634348],[-117.24902107042679,32.869196057287674],[-117.24903735269628,32.869195851683394],[-117.24905363628547,32.869196044639537],[-117.24906990198311,32.869196638114836],[-117.2490861423,32.86919763126825],[-117.24910234229867,32.869199026023963],[-117.24911848694938,32.869200816191409],[-117.24913456241376,32.869203006391139],[-117.24915055685727,32.869205589505007],[-117.24916645212663,32.869208566581491],[-117.24917824845502,32.869210884262195],[-117.2491940029707,32.869214357533885],[-117.24920962531382,32.869218235856245],[-117.24922509829736,32.869222511252545],[-117.24924041334322,32.869227181087005],[-117.2492555501715,32.869232247327233],[-117.24927049692714,32.869237701051595],[-117.24928523853947,32.869243532462946],[-117.24929976646096,32.869249741630398],[-117.24931406140864,32.869256324201238],[-117.24932810509605,32.869263269502532],[-117.24934190388279,32.869270572974131],[-117.24935542564394,32.869278228563729],[-117.24936866385626,32.869286226405023],[-117.2493816110304,32.869294565656816],[-117.24939424241812,32.869303231189697],[-117.24940656434821,32.869312215738617],[-117.24941855434226,32.869321515878489],[-117.2494301994254,32.869331118188072],[-117.24944149630008,32.869341014578424],[-117.24945242464537,32.869351203410581],[-117.24946298529403,32.869361663937561],[-117.24947316109971,32.86937239178954],[-117.24948294338159,32.869383375314023],[-117.24949232671554,32.869394607341],[-117.24950129599972,32.869406075368261],[-117.24950985110088,32.869417767674221],[-117.24951797908496,32.86942967444439],[-117.24952567341815,32.869441784910634],[-117.24953292223475,32.869454089249864],[-117.2495397285761,32.869466573009568],[-117.24954607952847,32.869479228178477],[-117.2495519706335,32.869492038561326],[-117.24955739430948,32.869504995201957],[-117.24971272640944,32.869990229473572],[-117.24971497230773,32.869996136695583],[-117.24972005840391,32.870009189842868],[-117.24972531284632,32.870022200147318],[-117.24973073337513,32.870035156806161],[-117.24973631895274,32.870048062532959],[-117.24974206748321,32.870060920951801],[-117.24974798102159,32.870073724831947],[-117.24975405955772,32.870086473271634],[-117.24976029775958,32.870099167215848],[-117.24976669772313,32.870111803040565],[-117.24977326050674,32.870124379835481],[-117.2497799817956,32.870136894028448],[-117.24978686167172,32.870149352832769],[-117.24979390106017,32.870161743616464],[-117.24980109893356,32.870174069994782],[-117.24980845206603,32.870186330190357],[-117.24981596474174,32.870198525070222],[-117.24982362943031,32.870210650186529],[-117.24983144929615,32.870222701906613],[-117.24983942118519,32.870234684764775],[-117.24984754611464,32.870246594243987],[-117.24985582299567,32.870258428549526],[-117.25024670229773,32.870835208526579],[-117.25025009475313,32.870839699727824],[-117.25025898678766,32.870851212512868],[-117.25026808262712,32.870862605518113],[-117.25027739305865,32.870873887673646],[-117.25028689653874,32.870885043824146],[-117.25029660379315,32.870896077489711],[-117.25030651155494,32.870906983286247],[-117.25031661765648,32.870917758525998],[-117.25032691357052,32.870928405081472],[-117.25033740242058,32.870938915713332],[-117.25034808313811,32.870949290430168],[-117.25035894713443,32.870959525694502],[-117.25036999652599,32.870969619685575],[-117.25038122916564,32.870979571519086],[-117.25039263859129,32.870989376738493],[-117.25040422263521,32.870999032656044],[-117.2504159844824,32.871008537442428],[-117.25042791343779,32.871017890282445],[-117.25043467059211,32.871022079200117],[-117.2504479525107,32.871030035995773],[-117.25046142297052,32.871037752299678],[-117.25047508626578,32.871045229880544],[-117.25048893582171,32.871052454363522],[-117.25050296101493,32.871059431245072],[-117.25051716715707,32.871066157776887],[-117.25053153169735,32.871072624222286],[-117.25054605366981,32.87107883960654],[-117.25056073611563,32.871084789476903],[-117.25057556087079,32.871090473980558],[-117.25059052367156,32.871095894053639],[-117.25060562337764,32.87110104339304],[-117.25062084609868,32.871105922111283],[-117.25063618644108,32.871110525743241],[-117.2506516422883,32.871114856109472],[-117.25066720074666,32.871118907002206],[-117.25068286077843,32.871122681134977],[-117.25069860946958,32.871126170496588],[-117.2507144457924,32.871129378702378],[-117.25073035689449,32.87113230315115],[-117.25074633634429,32.871134942091409],[-117.2507623809466,32.871137296450868],[-117.25077847779744,32.871139359119937],[-117.25079462696861,32.871141136410273],[-117.25081081448764,32.871142621221118],[-117.25082703828937,32.871143819881347],[-117.25084328439118,32.871144724388479],[-117.25085955392295,32.871145340143897],[-117.25087583293282,32.871145661850072],[-117.25089211827684,32.871145694942982],[-117.25090839710239,32.871145436821486],[-117.25092466937855,32.871144884780527],[-117.25094092126638,32.87114404344112],[-117.25095714845078,32.871142909231118],[-117.25097334559949,32.871141483095492],[-117.25098950320898,32.871139775030542],[-117.2509973101446,32.87113892815951],[-117.25101341949225,32.871136922905123],[-117.25102946283648,32.871134563795856],[-117.25104542735542,32.871131850935647],[-117.25106129922035,32.871128789847049],[-117.25107707953032,32.871125383226428],[-117.25109273942627,32.871121630405916],[-117.25110828430168,32.871117535850651],[-117.2511237013552,32.871113101467856],[-117.2511389681695,32.871108329242709],[-117.25113876228255,32.871122070867266],[-117.25113846233953,32.871135810548665],[-117.25113807154574,32.871149548260995],[-117.25113758669583,32.871163284030203],[-117.25113700995735,32.871177020544032],[-117.2511363455119,32.871190749652712],[-117.25113557952056,32.871204475977265],[-117.2511347237262,32.871218198520744],[-117.2511337749029,32.871231915505746],[-117.2511327363073,32.871245631414673],[-117.25113160251489,32.871259339077483],[-117.25113037680291,32.871273044779812],[-117.25112906118514,32.871286737684386],[-117.25112764937376,32.871300428663169],[-117.25112614451265,32.871314112280139],[-117.25112455087563,32.871327788500686],[-117.25112286311007,32.871341456466425],[-117.25112108443153,32.871355117053064],[-117.25111920734027,32.871368768517833],[-117.251117244627,32.871382408051865],[-117.251115188874,32.871396041125706],[-117.25111304110862,32.871409664124094],[-117.25111079915288,32.871423273457694],[-117.25110846843114,32.871436876296443],[-117.25110604351894,32.871450465470353],[-117.25110352759091,32.871464038248483],[-117.25110091969134,32.871477604557718],[-117.2510982208066,32.871491157176195],[-117.251095426673,32.871504697040073],[-117.25109254580758,32.871518221375133],[-117.25108957610404,32.871531732903712],[-117.2510865079051,32.871545228097069],[-117.2510833519364,32.871558710475249],[-117.25108010496184,32.871572177359191],[-117.25107914902456,32.871576066234198],[-117.25068828141487,32.871573738269454],[-117.2506719985101,32.871573644712072],[-117.25017035296118,32.871570835303459],[-117.24963621115131,32.87156784132064],[-117.24915413886306,32.871565135436967],[-117.24867789452965,32.871562515827328],[-117.24867537369073,32.871556201415153],[-117.24866947298953,32.871543393773749],[-117.24866523637147,32.871535132827205],[-117.24865278218167,32.871526284534276],[-117.24863959115446,32.871518231226403],[-117.24862573539927,32.871511018309697],[-117.24861128694376,32.871504683976951],[-117.24859632740078,32.871499263638363],[-117.24858093618502,32.871494787311271],[-117.24856519473539,32.871491275077624],[-117.24854919306925,32.871488749655228],[-117.24853301146474,32.871487223019614]],[[-117.25244358044726,32.86630270658469],[-117.25244562625974,32.86628907356539],[-117.25244759074924,32.866275430384924],[-117.2524494707413,32.866261779774284],[-117.25245126947206,32.866248124412465],[-117.25245298366438,32.866234458013842],[-117.25245461550651,32.866220785069316],[-117.25245616284109,32.866207103793059],[-117.25245762891448,32.866193417765622],[-117.25245901052152,32.866179727013005],[-117.25246030976825,32.866166028812927],[-117.25246152451784,32.866152323182746],[-117.25246265803725,32.866138615506408],[-117.25246370708021,32.866124902203254],[-117.25246467166725,32.866111185076626],[-117.25246555391467,32.866097462305873],[-117.25246635167552,32.866083733006626],[-117.25246707149373,32.86607000884861],[-117.25246770037383,32.866056274607431],[-117.25246824698642,32.866042541033821],[-117.25246871241021,32.866028809020762],[-117.2524690932962,32.866015065970863],[-117.25246938980878,32.866001326310872],[-117.252469604054,32.865987587318408],[-117.25246973383342,32.865973843600848],[-117.25246978244482,32.865960103247119],[-117.25246974662129,32.865946360873245],[-117.25246962639376,32.865932619184299],[-117.25246942069383,32.86591887818885],[-117.25246913382598,32.865905140557295],[-117.25246876252342,32.865891400905625],[-117.25246831005303,32.865877664617834],[-117.25246777207958,32.865863926318546],[-117.25246714979482,32.865850196819132],[-117.25246644951672,32.865836467952604],[-117.25246565845531,32.865822742527904],[-117.25246478512703,32.865809017770758],[-117.25246383066198,32.865795299082521],[-117.25246279186521,32.865781587390764],[-117.25246166868546,32.865767878187157],[-117.25246046434847,32.865754173249165],[-117.25245917459094,32.865740473512986],[-117.25245780370716,32.865726780747316],[-117.25245634848157,32.865713094076455],[-117.25245481210924,32.865699412572852],[-117.25245319033699,32.86568573807434],[-117.25245148745923,32.86567207234971],[-117.25244892611151,32.865657334196491],[-117.25244653056109,32.865643737214697],[-117.25244410839379,32.865630148564598],[-117.25244165101108,32.865616563807187],[-117.25243917121324,32.865602981035124],[-117.25243665835738,32.865589403941726],[-117.25243411349132,32.865575830714981],[-117.25243153987165,32.865562265837333],[-117.2524289352281,32.865548697604268],[-117.25242629967363,32.865535135934252],[-117.25242363426636,32.865521579916894],[-117.25242093897555,32.865508026847252],[-117.25241820849001,32.865494479473512],[-117.25241545880488,32.865480934960871],[-117.25241267285668,32.865467396152809],[-117.25240985488816,32.86545386030982],[-117.25240701028238,32.865440330995085],[-117.25240413364607,32.865426803743695],[-117.25240122502028,32.865413282162329],[-117.25239828978815,32.865399769814225],[-117.25239532139541,32.865386254128161],[-117.25239232425959,32.865372747692696],[-117.25238929830869,32.865359244196235],[-117.25236468713051,32.865200028070802],[-117.25236341797218,32.865186727641614],[-117.25236224994285,32.865173018801073],[-117.25236122078485,32.865159307030318],[-117.25236033148433,32.865145585107314],[-117.2523595821131,32.865131859343705],[-117.25235896943509,32.865118127060548],[-117.25235850095993,32.865104390902161],[-117.25235816817103,32.865090653642909],[-117.25235797955399,32.865076909803363],[-117.25235792665399,32.865063167567953],[-117.25235801801814,32.86504942686733],[-117.25235824613674,32.865035685057123],[-117.25235861320819,32.865021947530046],[-117.25235912133833,32.865008211563655],[-117.25235976949989,32.864994480773468],[-117.25236055767222,32.864980753356001],[-117.25236148593739,32.864967036524597],[-117.25236255100803,32.864953323091953],[-117.25236375614061,32.864939617540436],[-117.25236510459155,32.864925924352306],[-117.25236658988888,32.864912238169602],[-117.25236821317274,32.864898565295299],[-117.25236997549096,32.864884903917392],[-117.25237187793242,32.864871255830501],[-117.25237391838078,32.864857622855396],[-117.25237610108906,32.864844003153934],[-117.25237841755113,32.864830400402241],[-117.25238087527644,32.864816817244574],[-117.25238346889218,32.864803251019261],[-117.25238620055563,32.86478970351223],[-117.25238907242402,32.864776176509565],[-117.25239208022374,32.864762670045927],[-117.25239522613256,32.864749187710579],[-117.25239850801371,32.864735729520916],[-117.25240192796284,32.864722291852864],[-117.25240548179866,32.864708882856071],[-117.2524091748118,32.864695497978857],[-117.25241300277999,32.864682141764312],[-117.25241696781934,32.86466881239167],[-117.25242106570765,32.864655514403935],[-117.25242530173546,32.864642243249399],[-117.25242967171128,32.864629006176074],[-117.25243417454621,32.864615801389306],[-117.25243881237682,32.86460262887168],[-117.25244358308701,32.864589490443926],[-117.2524484920288,32.864576386964259],[-117.25245352743964,32.864563317626455],[-117.2524587011128,32.864550285941746],[-117.25246400453204,32.864537294684531],[-117.25246943980314,32.864524341132352],[-117.25247500801507,32.864511427079933],[-117.25248070704124,32.864498553446211],[-117.25248653691246,32.86448572293623],[-117.25249249761831,32.864472934648212],[-117.25249858596393,32.864460189509906],[-117.2525048051853,32.86444749020027],[-117.252511154183,32.864434834022859],[-117.2525176319504,32.864422226396435],[-117.25252423744985,32.864409670034625],[-117.25253096947934,32.864397153224381],[-117.25253782286119,32.864384690435692],[-117.25254481359053,32.864372278833521],[-117.25255192562079,32.86435991674454],[-117.25255916219824,32.86434760774943],[-117.25256652543916,32.864335350027368],[-117.25256868847787,32.864332198893671],[-117.25257693248753,32.864320346122973],[-117.25258529901008,32.864308555479958],[-117.25259378594983,32.864296830588565],[-117.25260239755976,32.864285169610717],[-117.25261112952516,32.864273568974575],[-117.25261998727017,32.864262035849876],[-117.25262895583735,32.864250570358216],[-117.25263805228998,32.864239169655633],[-117.25264726707425,32.864227839230239],[-117.25265659910116,32.864216577287301],[-117.25266604945971,32.864205385621517],[-117.25267561173943,32.864194264284848],[-117.25268529423826,32.86418169105643],[-117.25284811093289,32.864181894354367],[-117.25335248120541,32.863573120874911],[-117.253362523889,32.863563663819008],[-117.25337602485143,32.863556048001939],[-117.25339139138225,32.863551619144665],[-117.25340758950298,32.863550685025537],[-117.25381173045785,32.863577635754481],[-117.25421264554285,32.863607359918696],[-117.25425148421589,32.863527369199922],[-117.25488634865158,32.863552437956528],[-117.25475940057369,32.864144635165502],[-117.25478218944542,32.864144191019349],[-117.25480679830953,32.864143778957313],[-117.2545986033344,32.86521480494352],[-117.25459695424759,32.865223286685904],[-117.25459585622242,32.865228936059779],[-117.2545669882162,32.865357865828663],[-117.25456396359442,32.865371368877433],[-117.25456093894081,32.865384869221167],[-117.25455791860105,32.865398373136713],[-117.25455489397646,32.865411876185263],[-117.25455186615604,32.865425380161447],[-117.25454884790913,32.865438880452757],[-117.25454582328179,32.865452383501051],[-117.25454279545863,32.865465887477008],[-117.25453977833909,32.86547939316938],[-117.25453675048315,32.865492894440173],[-117.2545337322625,32.865506397436057],[-117.25453070764078,32.86551990138571],[-117.25452767980265,32.86553340445959],[-117.2545246615792,32.865546907455276],[-117.25452163374949,32.865560411430664],[-117.25451861018225,32.865573914469614],[-117.25451558555586,32.865587418418862],[-117.25451256412349,32.865600921440254],[-117.25450953942324,32.865614419077637],[-117.254506514825,32.865627925731602],[-117.25450349335897,32.865641426047837],[-117.25450046982725,32.865654932692955],[-117.25449744515417,32.865668433035019],[-117.25449442372654,32.865681936957628],[-117.25449139908253,32.865695440004551],[-117.25448837443751,32.865708943051445],[-117.25448534980188,32.865722446999875],[-117.25448232942864,32.865735950011782],[-117.25447930479116,32.865749453960085],[-117.25447628014247,32.865762957006609],[-117.2544732555031,32.865776460954777],[-117.2544702340269,32.865789961270103],[-117.25446720934453,32.865803461611385],[-117.25446418473328,32.865816968264284],[-117.25446116435354,32.865830471275693],[-117.25445813970958,32.865843975223441],[-117.25445511505437,32.865857478269461],[-117.25445209036735,32.865870978610367],[-117.25444906892582,32.865884482531783],[-117.25444604426782,32.865897985577611],[-117.25444302068765,32.865911489516257],[-117.25443999917125,32.865924987125808],[-117.25443697454136,32.865938492876346],[-117.25443394992082,32.865951999528463],[-117.25443092525821,32.865965502573822],[-117.25442790377927,32.865979003789768],[-117.25442488021407,32.865992509531289],[-117.25442185552812,32.866006010773077],[-117.254418834067,32.866019513792089],[-117.25441580936887,32.866033014132128],[-117.25441278474185,32.866046520783676],[-117.2544097600727,32.866060023828531],[-117.25440673965565,32.866073525035198],[-117.2544037149847,32.866087028079903],[-117.25440069031281,32.866100531124495],[-117.25439766565022,32.866114035070709],[-117.25439464418172,32.866127538089096],[-117.25439161951734,32.86614104203511],[-117.25438859481083,32.866154542374446],[-117.25438557444909,32.866168048990581],[-117.25438254974071,32.866181549329724],[-117.25437952506232,32.866195052373769],[-117.25437650359851,32.866208556293351],[-117.25700946525153,32.866966018613567],[-117.25703874736075,32.866910228525803],[-117.25741099497253,32.867018295619815],[-117.25737055613727,32.867144878479294],[-117.25697995157384,32.867032108566477],[-117.2543613844513,32.866276070575715],[-117.2543583597664,32.866289573619298],[-117.25435533512172,32.866303080269383],[-117.25435231360932,32.866316580581682],[-117.25434928995921,32.866330080911261],[-117.25434626531177,32.866343587561126],[-117.25434324382744,32.866357090578234],[-117.2543402191164,32.866370591817976],[-117.25433719442498,32.866384094860976],[-117.25433416974295,32.866397598805513],[-117.25433114932333,32.866411101813611],[-117.25432812462914,32.86642460485637],[-117.25432509991342,32.866438106095664],[-117.25432207524831,32.866451611843281],[-117.254319053736,32.866465113056378],[-117.25431602906897,32.866478618803811],[-117.25431300430839,32.866492116436199],[-117.25430998392345,32.866505623050386],[-117.25430695922276,32.866519126092633],[-117.25430393453144,32.866532630036403],[-117.25430091300328,32.866546130347444],[-117.25429788837185,32.866559639701066],[-117.25429486360569,32.866573137332935],[-117.25429183999971,32.866586643071066],[-117.2542888184781,32.866600144283382],[-117.25428579377093,32.866613647325131],[-117.25428276907313,32.866627151268354],[-117.25427974436407,32.866640654309855],[-117.25427672282849,32.866654154620228],[-117.25427369919633,32.866667658554576],[-117.2542706745154,32.866681164300864],[-117.25426765298728,32.86669466551264],[-117.25426462827365,32.866708168553764],[-117.25426160356929,32.866721672496446],[-117.25425857885378,32.866735175537428],[-117.25425555844183,32.866748681248581],[-117.25425253367298,32.866762179781063],[-117.25424950895474,32.866775682821803],[-117.25424648107139,32.866789189495158],[-117.25424346273086,32.866802689778666],[-117.25424043480447,32.866816192845235],[-117.25423741650324,32.866829696735195],[-117.25423438964344,32.866843199792903],[-117.25423136492984,32.866856703734818],[-117.25422834661553,32.866870206722936],[-117.25422531866397,32.866883707985757],[-117.25422230034781,32.866897210973683],[-117.25421927241499,32.866910714039697],[-117.25421624876516,32.866924217972546],[-117.2542132272101,32.866937718281321],[-117.25421020252087,32.866951224927689],[-117.25420717778957,32.86696472796735],[-117.25420415305732,32.866978231006925],[-117.25420113150884,32.866991732217052],[-117.25419810784318,32.867005235247767],[-117.25419508311846,32.867018739188779],[-117.25419205838249,32.867032242228028],[-117.25418903686119,32.867045746142828],[-117.25418601209249,32.867059246476963],[-117.25418298735377,32.867072749516005],[-117.25417996689804,32.867086253421874],[-117.25417694215743,32.867099756460718],[-117.25417391742626,32.867113260401197],[-117.2541708926838,32.867126763439913],[-117.25416787114568,32.867140266452516],[-117.2541648463808,32.867153767687739],[-117.25416182163556,32.867167270726213],[-117.25415880117336,32.867180774631599],[-117.25415577642627,32.86719427766991],[-117.25415275168854,32.867207781609842],[-117.25414972693962,32.867221284648011],[-117.25414670539499,32.867234787660045],[-117.25414368062367,32.867248288894743],[-117.25414065697122,32.867261794629009],[-117.25413763543409,32.867275298542488],[-117.25413591805507,32.867282953026461],[-117.25413461068051,32.867288801580273],[-117.25413158592602,32.867302304617937],[-117.25412856114998,32.867315805852321],[-117.25412553959887,32.867329308863795],[-117.25412251592029,32.867342812794256],[-117.2541194911621,32.86735631583165],[-117.25411646641322,32.867369819770651],[-117.25411344485839,32.867383322781812],[-117.25411042009738,32.867396825819036],[-117.25410739531488,32.867410327052752],[-117.25410437375726,32.8674238300637],[-117.25410135010308,32.867437336698629],[-117.2540983253075,32.867450837030539],[-117.25409530371624,32.867464337336237],[-117.25409227895994,32.867477841274614],[-117.25408925419244,32.867491344311247],[-117.25408622946517,32.867504850954425],[-117.25408320896949,32.867518353956207],[-117.2540801841786,32.867531855189256],[-117.25407715940739,32.867545358225556],[-117.25407413463527,32.86755886126182],[-117.2540711130469,32.867572362468636],[-117.2540680882729,32.867585865504701],[-117.25406506460752,32.867599372138663],[-117.25406203983168,32.867612875174594],[-117.25405901826015,32.867626378184404],[-117.25405599346186,32.86763987941687],[-117.25405296868321,32.867653382452566],[-117.2540499471192,32.867666886363807],[-117.25404692340716,32.867680389390664],[-117.25404389863603,32.867693893327761],[-117.25404087702809,32.867707393632138],[-117.25403785227564,32.867720899372465],[-117.25403482747082,32.86773440060432],[-117.25403180268569,32.867747903639476],[-117.25402878111521,32.867761407550148],[-117.25402575739668,32.8677749105765],[-117.25402273260872,32.867788413611393],[-117.25401970779929,32.867801914842907],[-117.25401668621478,32.867815417851652],[-117.25401366143436,32.867828921788025],[-117.2540106366427,32.867842424822641],[-117.2540076129597,32.867855931455139],[-117.25400459134065,32.867869431758542],[-117.25400156654625,32.86788293479291],[-117.25399854176119,32.86789643872887],[-117.25399552017021,32.867909941737075],[-117.25399249535241,32.867923442967886],[-117.25398947159181,32.867936943288257],[-117.25398645002892,32.867950449001192],[-117.2539834252392,32.867963952936826],[-117.25398040043827,32.867977455970646],[-117.2539773756158,32.867990957201066],[-117.25397435408009,32.868004465618689],[-117.25397132921469,32.868017963242316],[-117.25396830551962,32.868031469873792],[-117.25396528388846,32.868044970176236],[-117.25396225912314,32.868058476816245],[-117.25395923428484,32.868071977144517],[-117.25395620948677,32.868085481079397],[-117.25395318788283,32.868098984086522],[-117.25395016414105,32.868112487110871],[-117.25394713927849,32.868125985635544],[-117.25394411132285,32.868139494104504],[-117.25394109289988,32.868152995281903],[-117.25393806488066,32.868166498340713],[-117.25393504647644,32.868180001321271],[-117.25393202277021,32.868193507951858],[-117.2539289946865,32.868207005600425],[-117.2539259763206,32.868220512187456],[-117.25392294829678,32.868234015245882],[-117.25391992986734,32.868247516422727],[-117.25391690187246,32.868261022185976],[-117.25391387808867,32.868274522504407],[-117.25391085327669,32.868288026438172],[-117.25390783165881,32.868301529444075],[-117.25390480684494,32.868315033377641],[-117.25390178201994,32.868328536409457],[-117.25389876039925,32.868342039415118],[-117.25389573555178,32.868355540643492],[-117.25389271179233,32.868369043666391],[-117.25388968697388,32.868382547599573],[-117.25388666534947,32.868396050604936],[-117.25388364052912,32.868409554537934],[-117.25388061569755,32.868423057569295],[-117.25387759403955,32.868436557869416],[-117.25387457031573,32.868450064498504],[-117.25387154548139,32.868463567529538],[-117.2538685206564,32.868477071462181],[-117.25386549899467,32.868490571762081],[-117.25386247415753,32.868504074792881],[-117.25385944932981,32.868517578725239],[-117.25378385479812,32.868855155153085],[-117.25378083101468,32.868868659074728],[-117.2537778093569,32.868882162077369],[-117.25377478450315,32.868895666007575],[-117.2537717596073,32.868909166331079],[-117.25376873794674,32.868922669333458],[-117.25376571309019,32.868936173263464],[-117.25376268822244,32.868949676291727],[-117.25375966443247,32.868963180212859],[-117.2537566427682,32.868976683214925],[-117.25375361789769,32.868990186242911],[-117.25375059300565,32.869003687467576],[-117.25374757133859,32.869017190469386],[-117.25374454647556,32.869030694398838],[-117.25374152266973,32.869044197417871],[-117.25373849776368,32.869057697740466],[-117.25373547613404,32.869071204348707],[-117.25373245125701,32.869084707376153],[-117.25372942638933,32.869098211305193],[-117.25372640147962,32.869111711627504],[-117.25372338088386,32.869125215521727],[-117.25372035600311,32.869138718548889],[-117.25371733109057,32.869152218871022],[-117.25371430945442,32.869165725478609],[-117.2537112845709,32.869179228505544],[-117.25370825969671,32.869192732434058],[-117.25370523584891,32.869206232747175],[-117.25370221416799,32.869219735747834],[-117.25369918932184,32.869233242381121],[-117.25369616440284,32.86924674270265],[-117.25369314269847,32.869260243899802],[-117.25369011780842,32.869273746926154],[-117.25368709295861,32.869287253559115],[-117.2536840691352,32.869300756576671],[-117.25368104741686,32.869314256871782],[-117.25367802253341,32.869327760799571],[-117.25367499763874,32.869341263825554],[-117.25367197275341,32.869354767753137],[-117.25366895106224,32.869368270752943],[-117.25366592723321,32.869381773770016],[-117.2536629023451,32.869395277697414],[-117.25365988062028,32.869408777991971],[-117.25365685576118,32.869422284624179],[-117.25365383082919,32.869435784944621],[-117.25365080911187,32.86944928614065],[-117.25364778530813,32.86946279186229],[-117.25364476040417,32.869476294887498],[-117.25364173227335,32.869489796135348],[-117.25363871380911,32.869503301813324],[-117.25363568567646,32.869516803061082],[-117.25363266079961,32.869530308790999],[-117.25362964333935,32.869543809050036],[-117.25362661523477,32.869557313002474],[-117.253623596735,32.869570815975102],[-117.25362056862856,32.869584319927455],[-117.25361754371622,32.869597822951974],[-117.25361452519313,32.86961132412101],[-117.25361149710444,32.869624829876379],[-117.25360847325783,32.869638332891995],[-117.2536054515266,32.869651834086888],[-117.25360242660966,32.869665337111009],[-117.25359940170206,32.869678841036716],[-117.25359637998861,32.869692344034689],[-117.25359335506887,32.869705847058583],[-117.25359033119608,32.869719348270415],[-117.25358730630532,32.86973285399916],[-117.25358428456759,32.86974635519347],[-117.25358125964419,32.869759858217066],[-117.25357823473009,32.869773362142269],[-117.25357520980478,32.869786865165693],[-117.25357218915235,32.869800368154337],[-117.25356916420461,32.869813869374283],[-117.25356613927653,32.869827372397495],[-117.25356311756315,32.869840876296273],[-117.25356009263321,32.869854379319335],[-117.25355706770233,32.869867882342291],[-117.25355404278083,32.869881386266805],[-117.25355102212193,32.86989488925493],[-117.25354799719851,32.869908393179351],[-117.2535449722331,32.869921893497029],[-117.25354195051324,32.869935397395217],[-117.25353892560761,32.869948903122719],[-117.25353590063942,32.869962403440169],[-117.25353287677987,32.869975907355553],[-117.25352985504598,32.869989410351778],[-117.25352683008529,32.87000291157063],[-117.25352380514421,32.870016414592726],[-117.25352078023302,32.870029920319794],[-117.25351775850572,32.870043424217421],[-117.25351473459945,32.870056924525613],[-117.25351170966492,32.870070428449075],[-117.25350868792458,32.870083931444753],[-117.25350566298823,32.870097435368116],[-117.25350263800979,32.8701109356847],[-117.25349961309215,32.870124441411193],[-117.2534965924268,32.870137945299525],[-117.25349356747643,32.870151448320897],[-117.25349054253539,32.870164952243819],[-117.25348752075769,32.870178452534006],[-117.25348449580456,32.870191955555072],[-117.25348147089161,32.87020546218281],[-117.2534784459058,32.870218962498761],[-117.25347542523396,32.870232466386604],[-117.25347240027708,32.870245969407378],[-117.25346937532956,32.870259473329781],[-117.25346635354536,32.870272973619372],[-117.25346332858571,32.870286476639947],[-117.25346030363542,32.870299980562145],[-117.25345727974239,32.870313483573845],[-117.25345425799563,32.870326987469809],[-117.25345123303227,32.870340490490044],[-117.25344820806797,32.870353993510257],[-117.25344518308218,32.87036749472702],[-117.2534421613214,32.870380997721043],[-117.25343913746387,32.87039450433894],[-117.25343611246511,32.870408004653825],[-117.25343309070155,32.870421507647549],[-117.25343006574195,32.870435011568965],[-117.25342704077114,32.870448514588617],[-117.25342401580973,32.870462018509834],[-117.2534209951109,32.870475521494583],[-117.25341797011674,32.870489022710679],[-117.25341494514225,32.870502525729997],[-117.25341192016681,32.870516028749243],[-117.25340889840611,32.870529532644035],[-117.25340587342887,32.870543035663133],[-117.25340284843008,32.87055653687883],[-117.25339982772479,32.870570039863033],[-117.25339680274473,32.87058354288191],[-117.25339377777398,32.870597046802324],[-117.25339075599744,32.870610549794989],[-117.25338773099402,32.870624051010324],[-117.25338470604109,32.870637556733861],[-117.25338168213513,32.870651060645315],[-117.25337866035488,32.870664563637646],[-117.25337563533748,32.870678063950997],[-117.25337261036023,32.8706915678709],[-117.25336958534096,32.870705068184051],[-117.25336656356728,32.870718572077756],[-117.25336353967634,32.870732077792098],[-117.25336051468513,32.870745580810038],[-117.25335749290868,32.870759084703508],[-117.25335446788475,32.870772585016283],[-117.25335144290102,32.87078608893566],[-117.25334841793693,32.87079959465823],[-117.25334539719439,32.870813095837768],[-117.25334237219758,32.870826598855203],[-117.25333934396369,32.870840099193643],[-117.25333631900617,32.870853605817608],[-117.25333330041737,32.870867108782775],[-117.25333027219089,32.870880610022631],[-117.25332725356945,32.870894110282599],[-117.25332422649186,32.870907618726974],[-117.25332120787877,32.870921119888493],[-117.25331817966918,32.870934622931379],[-117.25331515467433,32.870948126849804],[-117.2533121361099,32.870961632519446],[-117.25330910784608,32.870975131053733],[-117.25330608393753,32.870988636766555],[-117.25330306210321,32.871002137051988],[-117.25330003710371,32.871015640970064],[-117.25329701209301,32.87102914398637],[-117.25329398709167,32.871042647904211],[-117.25329096525365,32.871056148189339],[-117.25328794133951,32.871069653901692],[-117.25328491633537,32.871083157819371],[-117.25328189132003,32.871096660835313],[-117.25327886948858,32.871110162021715],[-117.25327584447137,32.871123665037501],[-117.25327281946352,32.871137168954839],[-117.25326979868748,32.87115066923073],[-117.25326677369834,32.871164174951225],[-117.25326374865686,32.871177676163335],[-117.2532607236659,32.871191181883688],[-117.25325770182798,32.871204683069628],[-117.25325467680425,32.871218186084839],[-117.25325165177964,32.871231689099965],[-117.2532486310382,32.871245192981966],[-117.25324560598089,32.871258693291963],[-117.25324258099459,32.871272199913541],[-117.25323955914079,32.871285700197305],[-117.25323653415266,32.871299206818726],[-117.25323350909163,32.871312707128368],[-117.253230485129,32.871326210134264],[-117.25322746328177,32.871339711319457],[-117.25322443827963,32.871353217038866],[-117.253221413256,32.871366720954882],[-117.25321838819032,32.871380221264147],[-117.25321536639079,32.871393726957322],[-117.25321234240201,32.871407228159455],[-117.25320931736439,32.871420731173494],[-117.25320629233612,32.871434235089112],[-117.25320327047122,32.871447735371952],[-117.25320024543082,32.871461238385756],[-117.25319722039974,32.871474742301174],[-117.25319419856288,32.871488245288816],[-117.25319117459844,32.871501749195346],[-117.25318814955436,32.871515252208837],[-117.253185127725,32.871528756097945],[-117.25318210267901,32.87154225911128],[-117.25317907763211,32.871555762124558],[-117.25317769645993,32.871561990902485],[-117.25317608254261,32.871569268501439],[-117.25317346763163,32.871581067484748],[-117.25237215361457,32.871574429936324],[-117.25159042213903,32.871569174043174],[-117.25132982286975,32.871565789293058],[-117.25125818664991,32.871563425639692],[-117.25126121199182,32.871549922673474],[-117.25126413349594,32.871536403415405],[-117.25126695968956,32.871522865992929],[-117.25126968749042,32.87150932125207],[-117.25127231465896,32.871495760193362],[-117.2512748412056,32.871482183718548],[-117.25127727254444,32.871468598096065],[-117.25127960217243,32.871454995262766],[-117.25128183128123,32.871441386030057],[-117.251283966138,32.871427757722635],[-117.25128599942765,32.871414124827815],[-117.25128792571562,32.871400479273881],[-117.25128976747055,32.871386823583975],[-117.25129149694307,32.871373160688258],[-117.25129313011912,32.871359486850196],[-117.25129466490306,32.871345805693736],[-117.25129609808937,32.871332117244876],[-117.25129743395198,32.87131842146897],[-117.25129866824793,32.871304721105723],[-117.25129980198409,32.871291010736414],[-117.25130083845829,32.871277298450075],[-117.25130177332491,32.871263577969707],[-117.25130260770371,32.871249853794914],[-117.25130334374195,32.871236126810189],[-117.25130397607683,32.871222395255359],[-117.25130451005074,32.871208659087209],[-117.2513049456945,32.871194921010641],[-117.25130527877529,32.871181184667094],[-117.25130551241659,32.871167442817132],[-117.25130564669016,32.871153701772563],[-117.25130567835987,32.871139958854201],[-117.25130561065174,32.87112621583951],[-117.2513054446548,32.871112474523095],[-117.25130517718419,32.871098736734361],[-117.25130480924688,32.871084997054609],[-117.25130488015901,32.871081838553344],[-117.25130704203325,32.87106823798058],[-117.25131212433972,32.871055204385215],[-117.25131995041443,32.871043176547133],[-117.25133026851377,32.871032568605564],[-117.25146251021179,32.870918804235394],[-117.25146896104982,32.870913257587247],[-117.25147532684521,32.870906529434507],[-117.25148517201491,32.87089558805885],[-117.25149463615377,32.870884404495179],[-117.25150370767288,32.870872993265408],[-117.25151237594925,32.870861359866389],[-117.25152063362685,32.870849515178669],[-117.25152847339088,32.870837473689726],[-117.25153589315573,32.870825239925296],[-117.25154287919574,32.870812828424604],[-117.25154943481905,32.870800248178554],[-117.25155554306386,32.870787511047354],[-117.25156121048472,32.870774629602415],[-117.25156642324318,32.870761608464818],[-117.25157117835977,32.870748467497208],[-117.25157547375935,32.870735212127002],[-117.25157930533248,32.870721856815472],[-117.25158266997661,32.870708410605374],[-117.25158556360283,32.870694889761332],[-117.25158798521474,32.870681300603813],[-117.25158993070292,32.870667657594041],[-117.25163200198523,32.870304948492496],[-117.25164035091767,32.870232979810368],[-117.25176254797051,32.869237017595701],[-117.25176400214026,32.869224618471655],[-117.25176566087656,32.869210947123818],[-117.25176737203803,32.869197281663148],[-117.25176914095657,32.869183621144593],[-117.25177096869038,32.869169964657893],[-117.25177284888007,32.869156316763267],[-117.25177478465905,32.869142671123164],[-117.25177677929435,32.869129033121517],[-117.25177882848118,32.869115400087985],[-117.25178093329838,32.869101772915627],[-117.25178309482456,32.869088152497362],[-117.25178531091257,32.869074537948876],[-117.25178758157267,32.869060930171869],[-117.25178990896218,32.869047330952313],[-117.2517922909032,32.869033736700864],[-117.2517947327687,32.869020150079187],[-117.25179722598025,32.869006568451596],[-117.25179977702049,32.868992998077864],[-117.25180238153334,32.86897943177911],[-117.25180504491236,32.868965874020553],[-117.25180775968872,32.868952325764361],[-117.25181053330046,32.868938783343268],[-117.25181336259351,32.868925251291621],[-117.25181624430088,32.868911724225406],[-117.25181918383672,32.86889820841288],[-117.25182217690663,32.86888470208546],[-117.25182522774337,32.868871201601763],[-117.2518283310559,32.868857711513449],[-117.25183149004963,32.868844231794554],[-117.25183470789904,32.868830759714058],[-117.25183797715586,32.86881729803757],[-117.25184130207316,32.868803844927143],[-117.25184468266136,32.868790401284464],[-117.25184811253015,32.868776968964788],[-117.25185160769601,32.868763546936485],[-117.25210349858118,32.867717059861448],[-117.25220312569154,32.86729864698416],[-117.25234282803849,32.866711902109863],[-117.25239616012077,32.866532792225463],[-117.25239960587437,32.866519362464857],[-117.25240297024276,32.866505917133011],[-117.25240625321557,32.866492455328206],[-117.25240945379636,32.866478983370868],[-117.25241257299204,32.866465495842228],[-117.25241561083332,32.866451995447306],[-117.25241856407399,32.866438478605581],[-117.25242143922726,32.866424954281534],[-117.25242422872185,32.866411414421066],[-117.2524269400983,32.866397864373262],[-117.25242956049465,32.866384300635694],[-117.25243210597813,32.866370726684828],[-117.25243456694341,32.866357143500402],[-117.25243693911688,32.866343551117168],[-117.25243923632621,32.866329944012435],[-117.25244144903803,32.866316329477492],[-117.25244358044726,32.86630270658469]],[[-117.25071616315323,32.878607016542539],[-117.24944146333185,32.878483377936618],[-117.24945136409919,32.879381347125317],[-117.24878816401734,32.880110396721953],[-117.24878230359499,32.880108060769842],[-117.24876746696539,32.880102395073564],[-117.24875252576254,32.880096931310774],[-117.24873747893828,32.880091671293478],[-117.24872233723973,32.880086620345196],[-117.24870709631057,32.880081771287202],[-117.24869176692857,32.880077132147974],[-117.24867634805589,32.880072705641197],[-117.24866085137501,32.880068485360169],[-117.24864527161461,32.880064477659644],[-117.24862961948092,32.880060684256655],[-117.24861389815896,32.88005710332186],[-117.24859810661093,32.880053737568922],[-117.2485822534159,32.88005058963369],[-117.24856634388595,32.880047656767957],[-117.24855037804151,32.880044940775043],[-117.24853436657843,32.880042442470277],[-117.24851830525297,32.880040164593126],[-117.24850220362087,32.880038101655884],[-117.24848606493883,32.880036258140962],[-117.24846989356301,32.880034641227169],[-117.24845369148709,32.880033238273803],[-117.24844573369057,32.880032634380399],[-117.24741629405418,32.880021708686712],[-117.24700244690311,32.88002221531216],[-117.24691065971038,32.880022329170096],[-117.24691588503448,32.879963624637952],[-117.24692149439845,32.879900616566353],[-117.24692245755556,32.879889795924214],[-117.24692366261877,32.879876274395777],[-117.24692485881036,32.879862818766583],[-117.24692690939182,32.879839789589766],[-117.24695377065929,32.879787748453602],[-117.24699111317342,32.879729272625923],[-117.24704378167743,32.879657615795786],[-117.24708253255658,32.879599137592606],[-117.24713648813332,32.879516780101802],[-117.24716965957433,32.879461902491478],[-117.24720275092317,32.879401093813691],[-117.24723718327776,32.879334334483303],[-117.24726905553564,32.879290149448572],[-117.24733423315382,32.879204146600074],[-117.2474121366006,32.879122789601993],[-117.24747899897019,32.879038365563801],[-117.24752493594551,32.878992885628755],[-117.24758206986286,32.878942559453627],[-117.24763933730343,32.878904108207699],[-117.24770636621942,32.878856078189926],[-117.24775785521484,32.87880461531897],[-117.24779393651777,32.878759209454934],[-117.24782710790858,32.87870551926548],[-117.24784912367299,32.878660226970752],[-117.24787774889313,32.878578080014819],[-117.24791309929842,32.878452233182699],[-117.24794065266306,32.878399775035128],[-117.24798351853195,32.878331753458347],[-117.24802084636498,32.878272097937902],[-117.24807639716491,32.87820634997761],[-117.24811128520376,32.878179950803066],[-117.24815043763448,32.878157079980433],[-117.24818115653623,32.87813545946841],[-117.24820055732515,32.878107998678566],[-117.24819744537943,32.878081905558872],[-117.24818026874118,32.878057115467996],[-117.24816323852167,32.878044193914882],[-117.2481364214128,32.878037284026441],[-117.2481082639746,32.878037511482013],[-117.24808159400085,32.87804366493345],[-117.24802279778459,32.878071445718383],[-117.24792918040606,32.878132750688707],[-117.24783693019167,32.878189293230577],[-117.24776429679669,32.878238550774235],[-117.24770843776567,32.878278177411886],[-117.24765237618712,32.878298815726843],[-117.24761450971619,32.878310992085112],[-117.2475723126432,32.87831370797791],[-117.2475370609571,32.878308053659005],[-117.24748762284105,32.878291838049044],[-117.24744938055539,32.87827077351195],[-117.24742938736847,32.87824600515308],[-117.24740924659527,32.878206992151831],[-117.24738917265054,32.878175097916184],[-117.2473817841576,32.878144287982906],[-117.24738131422578,32.878102740986009],[-117.24738392798396,32.878084910345123],[-117.24739773812193,32.878061057621188],[-117.24741577287213,32.878038357495143],[-117.24743949202566,32.878019167977399],[-117.24748978657161,32.877986706592438],[-117.24770104991281,32.877873413073964],[-117.24784381003747,32.877802216002586],[-117.24792835642978,32.877776051572724],[-117.2480153502669,32.877751608593726],[-117.24811368903157,32.877735379920423],[-117.2482274604191,32.877714282389384],[-117.24833572163149,32.877703905081582],[-117.24843140525296,32.877701944341233],[-117.24862422063111,32.877700387944842],[-117.24884030576206,32.877715207370493],[-117.24902910046994,32.877731492390332],[-117.2491150899789,32.877742667730047],[-117.24916008952472,32.877739927744045],[-117.24922325571617,32.877723983502833],[-117.24931019690334,32.877695975420174],[-117.24939307415787,32.877681060179526],[-117.24953802101956,32.877678700115631],[-117.24966700929858,32.877687207927146],[-117.24976851299131,32.877701821006447],[-117.24986160966291,32.877718878142517],[-117.249929323082,32.877732576014331],[-117.25000272277333,32.877750972833383],[-117.25005631761617,32.87776122299077],[-117.25011692446276,32.877767858968156],[-117.25016756981391,32.877766260520659],[-117.25021818642648,32.877761100375565],[-117.25024478873334,32.877749015302278],[-117.25027405818865,32.877723848597263],[-117.25028918130391,32.877691669884257],[-117.2502945156475,32.877665510237996],[-117.25029825480019,32.877622740660023],[-117.25031887486749,32.877579835319942],[-117.25033977839422,32.87756186194995],[-117.25038016278253,32.877523541590655],[-117.25048081639764,32.87746218498436],[-117.25052188046146,32.877426882639611],[-117.25056207682084,32.877371947208339],[-117.25060231251631,32.877320568845867],[-117.2506590925999,32.877239381719242],[-117.25076203680898,32.877131704207557],[-117.25081773230204,32.877079012050501],[-117.25127091765891,32.877075343169992],[-117.25149111446781,32.877073222242117],[-117.25176391050597,32.87822472520628],[-117.25185453802004,32.879290554300283],[-117.25187297765346,32.879507408062494],[-117.25191299503064,32.879818298023686],[-117.25192221709199,32.879889939370827],[-117.25193730010369,32.880007120228626],[-117.25196545337742,32.880191044483162],[-117.25198013850789,32.88026962106629],[-117.25209726560102,32.880896349180489],[-117.25249321744492,32.882198692827323],[-117.25271366790025,32.882677898123184],[-117.2526210356173,32.882750111605077],[-117.25240992687736,32.882914689297905],[-117.25219706733336,32.883080627134582],[-117.25199773476314,32.882755167476056],[-117.25175705183379,32.882362187009264],[-117.25146188270637,32.88188023564593],[-117.25128762626852,32.881595544420328],[-117.25093912792538,32.881026671526151],[-117.25092992994823,32.880504524115786],[-117.2509292120538,32.88050238647309],[-117.25073101209338,32.879912451549011],[-117.25072497868364,32.87938203289599],[-117.25071673563524,32.878657346648026],[-117.25071616315323,32.878607016542539]]]}},{"attributes":{"OBJECTID":39,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":10312.895445806536,"SHAPE.STArea()":871868.70671325317,"GlobalID":"{0BA0E52D-B926-4A1E-B732-05F7B24B546C}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"zayu","last_edited_date":1779858098000,"Clery":"No","Region":"Blackhorse Farms"},"geometry":{"rings":[[[-117.24399327186228,32.885992582972165],[-117.24399276369087,32.885701113973845],[-117.24402533748147,32.885701074682224],[-117.24402495420067,32.88548120170887],[-117.24399237943301,32.885481241910689],[-117.24406381818774,32.885150006865835],[-117.24406434491314,32.885141574886426],[-117.24406525221259,32.885127855598832],[-117.24406621403276,32.885114137676162],[-117.24406723894307,32.885100422852922],[-117.24406832159012,32.88508671027045],[-117.24406946306293,32.885073001723491],[-117.24406564686306,32.885023558889195],[-117.2440907418096,32.884938152590259],[-117.24409774945323,32.884693477073938],[-117.24404777353587,32.884594931140356],[-117.24405087194877,32.88429256794921],[-117.24405194931984,32.884283307341789],[-117.24405803462179,32.884270631203044],[-117.24406880304073,32.884260410725069],[-117.24408300899699,32.884253830003672],[-117.24408181403867,32.884069390548561],[-117.24406709272145,32.884063841486835],[-117.24405721802192,32.884053086415271],[-117.24405452930596,32.884039672892435],[-117.24405773240542,32.883506436864366],[-117.24406178197935,32.88283304064182],[-117.24406186356404,32.882819263971804],[-117.2440657296473,32.882176073284413],[-117.24406769555327,32.881848970693476],[-117.24406976049799,32.881505381534289],[-117.2440714936032,32.881216790889006],[-117.24407134497378,32.881214040849564],[-117.24407234974852,32.881200345123332],[-117.24407621951343,32.88118701319862],[-117.24408282979688,32.88117447350534],[-117.24409196920503,32.881163122709637],[-117.24410335002609,32.881153318414611],[-117.24411099614491,32.881151112541673],[-117.24412690869339,32.881148255828869],[-117.24414315889339,32.88114756961177],[-117.24415932594547,32.881149077114252],[-117.24417500547499,32.881152741912985],[-117.24418461455554,32.881155907288452],[-117.2442002293338,32.881159799845577],[-117.2442162344656,32.881162298763478],[-117.24423246196737,32.88116338645694],[-117.24424873528642,32.881163043606179],[-117.24426487811458,32.881161272531621],[-117.2442807154263,32.881158094480156],[-117.24429607771235,32.88115354598407],[-117.24431079344855,32.881147674412937],[-117.2443247073233,32.881140543237422],[-117.24434349217891,32.881140589557816],[-117.24435893116818,32.881144813549533],[-117.24437230582882,32.881152569168123],[-117.24438251775162,32.881163212387598],[-117.2443887224095,32.881175868996557],[-117.24439040777611,32.88118948807017],[-117.24441969031565,32.88118650388553],[-117.24442009887582,32.88151082713609],[-117.24442063170869,32.881846144405664],[-117.2444211024156,32.882175965112737],[-117.24440629320165,32.882816507090077],[-117.24440578925432,32.882838484956707],[-117.24440371726148,32.883231542304756],[-117.24440029546332,32.883504334376681],[-117.24447847033115,32.883503988399241],[-117.24455664196195,32.883503639693153],[-117.24455838753137,32.883370473437935],[-117.24455910049336,32.883357439235049],[-117.24456311284388,32.883344144923448],[-117.24457029980975,32.8833318431343],[-117.24458035105266,32.883321064789598],[-117.24459282823351,32.883312267898091],[-117.24460719290892,32.883305847250199],[-117.24462282187714,32.883302073877395],[-117.24463903941,32.883301110122659],[-117.24527101989331,32.883304267085329],[-117.24527323299188,32.883500453547924],[-117.24534489327259,32.883500135146214],[-117.2454165535426,32.883499815801244],[-117.24541352684027,32.883231657407741],[-117.2454148422467,32.883011662503918],[-117.24541605280024,32.882808942342294],[-117.24541605585769,32.882808362493201],[-117.24541779523071,32.882516935752221],[-117.24542080140364,32.88201397289464],[-117.24542382225285,32.881508248757754],[-117.24542590839428,32.881159162299227],[-117.24542376971392,32.881145540578011],[-117.24542093312466,32.881132008341638],[-117.24541740642321,32.881118593481489],[-117.24541319093346,32.881105318530523],[-117.24540829663017,32.881092214969549],[-117.24540273333484,32.881079300754323],[-117.2453965120398,32.881066602848705],[-117.24538964475477,32.881054143699565],[-117.24538214138295,32.881041948475982],[-117.24537402247252,32.881030038654238],[-117.24536529254287,32.881018435839849],[-117.24535597859455,32.881007165064133],[-117.24534609366498,32.88099624515862],[-117.24533565402777,32.880985697634088],[-117.2453246855538,32.880975542120517],[-117.24531320449618,32.880965798325292],[-117.24530123242056,32.880956483207768],[-117.24528879305001,32.880947615513513],[-117.24527591005676,32.880939209479614],[-117.24514244224133,32.880864603381497],[-117.24508669928395,32.880832069939011],[-117.24485389456379,32.880696518028138],[-117.24484013967455,32.880689157783763],[-117.24482629536489,32.880681922699182],[-117.24481236156342,32.880674806462594],[-117.24479834152679,32.880667813556592],[-117.24478423742275,32.880660946668854],[-117.24477004708355,32.880654203111632],[-117.24475577375563,32.880647586465713],[-117.24474141955572,32.880641094910544],[-117.24472698664134,32.880634730232202],[-117.24471247287529,32.880628492447855],[-117.24469788579879,32.880622386907355],[-117.24468322528948,32.880616402790544],[-117.24466848399966,32.880610551879357],[-117.24437256013452,32.880475012092077],[-117.2443528201636,32.880470061638228],[-117.24433009435914,32.880464359704582],[-117.24431703392408,32.880461608964133],[-117.24429814859137,32.880459373101871],[-117.2442818718259,32.880459399474105],[-117.2442657242207,32.880461114681971],[-117.24424994810892,32.880464496035358],[-117.24423478649472,32.880469485670694],[-117.24422046621113,32.880476013230101],[-117.2442072073742,32.880483981357521],[-117.24419520833118,32.880493257703783],[-117.24418465570561,32.880503712719438],[-117.24417570367686,32.880515182849528],[-117.24416849347894,32.880527493822356],[-117.24416313526577,32.880540463500431],[-117.2441597079477,32.880553887454013],[-117.24415825951752,32.880567567814083],[-117.24415882497206,32.880581291486529],[-117.24416137529484,32.880594854909489],[-117.24416588996725,32.88060804994408],[-117.24417229296508,32.880620674308261],[-117.24418048919266,32.880632540301413],[-117.24419035155759,32.880643465890827],[-117.24420173281695,32.880653282731949],[-117.24421445820931,32.880661846147362],[-117.24422833490895,32.880669020622314],[-117.24424315123227,32.880674704158579],[-117.24425868598017,32.880678803852135],[-117.2442746980069,32.880681258520639],[-117.24429094758159,32.88068203763001],[-117.24429997778654,32.880681739528818],[-117.24431946412963,32.880676632123979],[-117.24433245505433,32.880673229890768],[-117.24436818939412,32.880664696738592],[-117.24438410118381,32.88066178138434],[-117.24440020105719,32.880659716666962],[-117.24441642294582,32.880658519349467],[-117.24443269840987,32.880658185473969],[-117.24444629640799,32.880658571098053],[-117.24459689733838,32.880726072221947],[-117.24468530377669,32.880766588539508],[-117.2447704532436,32.880807131015104],[-117.24492784957974,32.880899313803504],[-117.24490213500533,32.880929754682811],[-117.2448903261367,32.880939214423876],[-117.24487776644939,32.88094795971174],[-117.24486451849067,32.880955945856869],[-117.24485064165304,32.880963132703961],[-117.24483620833571,32.880969496224445],[-117.24482128753836,32.88097499528395],[-117.24480594843415,32.880979604076366],[-117.24479026672,32.880983306662401],[-117.24477432123746,32.880986081667011],[-117.24475818121083,32.880987907792594],[-117.24474319069114,32.880988753478739],[-117.2444989112161,32.880990719777827],[-117.24435879552014,32.880986350344799],[-117.24434433230401,32.880992057575078],[-117.24432886387302,32.880988724746359],[-117.24432293680272,32.880983890374054],[-117.24431324219096,32.88097287236841],[-117.24430128641212,32.880963571451687],[-117.2442874877778,32.880956311592058],[-117.24427232367559,32.880951348651088],[-117.24425633467052,32.880948855021444],[-117.24424007107565,32.880948920056674],[-117.24422410668103,32.880951535532873],[-117.24420900160774,32.880956618491211],[-117.24419528064136,32.880963985261609],[-117.2441834281945,32.880973378555659],[-117.24416887822753,32.880981150566022],[-117.24415338729118,32.880985282571949],[-117.24413717479939,32.880986182201752],[-117.24412117424238,32.880983801366064],[-117.24410461957648,32.880977401383774],[-117.24409334553089,32.880967523253787],[-117.24408488070368,32.880955816319933],[-117.24407962678876,32.880942836435409],[-117.24407784087484,32.880929204640516],[-117.24407797307791,32.880925393688798],[-117.24407807857469,32.880911652895698],[-117.24407818724671,32.880897909371782],[-117.24407829594924,32.880884168552875],[-117.24407839396585,32.880870427819922],[-117.24407849943196,32.880856684321763],[-117.2440786017229,32.880842943554434],[-117.24407870398321,32.880829200082076],[-117.24407880627402,32.880815459314697],[-117.24407890749625,32.880801718555944],[-117.24407900655068,32.880787975109385],[-117.24407910563569,32.880774234367806],[-117.24407920472063,32.880760493626219],[-117.24407929950065,32.880746750213994],[-117.24407939858557,32.880733009472401],[-117.24407949443408,32.880719266051599],[-117.24407959031313,32.880705525335799],[-117.24407968188731,32.880691781949331],[-117.2440797777663,32.880678041233523],[-117.24407987043955,32.880664300543472],[-117.2440799620136,32.88065055715704],[-117.24408005468678,32.880636816466989],[-117.24408014308558,32.880623075811343],[-117.24408023252238,32.880609332442042],[-117.24408032195913,32.880595589072783],[-117.24408041035787,32.880581848417094],[-117.24408049661938,32.880568107778636],[-117.24408058178173,32.880554364443725],[-117.24408066804321,32.880540623805196],[-117.24408075641125,32.880526880444528],[-117.2440808394669,32.880513139831798],[-117.244080922492,32.880499396514054],[-117.244081004479,32.880485655909958],[-117.24408108002393,32.880471912652403],[-117.24408116628528,32.88045817201386],[-117.24408124824167,32.880444428704727],[-117.24408132488566,32.880430688143548],[-117.24408140363627,32.880416944860201],[-117.244081483486,32.880403204273236],[-117.24408155900024,32.880389458310717],[-117.2440816356747,32.880375720454502],[-117.24408171125,32.880361979901878],[-117.24408178361955,32.880348239375081],[-117.24408186020227,32.880334493403957],[-117.2440819325718,32.880320752877125],[-117.24408200597925,32.880307009636695],[-117.24408207514298,32.880293269135684],[-117.24408214748185,32.880279525903838],[-117.24408221664557,32.880265785402827],[-117.24408228684719,32.880252042188182],[-117.24408235280505,32.880238301712922],[-117.2440824219381,32.880224558506896],[-117.24408248896458,32.880210818023002],[-117.24408255489182,32.880197074842748],[-117.24408262084964,32.88018333436748],[-117.24408268357111,32.880169591212997],[-117.24408274739172,32.880155850754889],[-117.24408281331888,32.880142107574628],[-117.24408287286516,32.880128367150888],[-117.24408293238079,32.880114624022184],[-117.24408299510218,32.880100880867644],[-117.24408305571697,32.88008714043535],[-117.24408146771948,32.880081565074413],[-117.24409970211801,32.880081245239751],[-117.24431269286036,32.880077511575941],[-117.24437131305005,32.880076484369859],[-117.24453877574588,32.880168202487688],[-117.24498055535886,32.88041015331526],[-117.24533141161318,32.880602308230245],[-117.2457512014773,32.880832213865915],[-117.24574725848069,32.881508399432249],[-117.24574709829052,32.881546838667006],[-117.24574509693672,32.882019630861123],[-117.24574430415723,32.882077339252199],[-117.24574230686532,32.882519900280059],[-117.24574147546421,32.882704026042745],[-117.24574101408444,32.882805744315846],[-117.2457410130294,32.882806500891633],[-117.24574007190166,32.883014641106598],[-117.24573748804568,32.883498387912645],[-117.24573415368981,32.884218546815212],[-117.24540758423427,32.88472141218093],[-117.24540985907221,32.885210633097856],[-117.24541008358861,32.885240865119115],[-117.24536180235781,32.88608286327932],[-117.24529197657253,32.886081052297605],[-117.24522241935583,32.88607558432625],[-117.24515339816469,32.886066482460784],[-117.24507237307002,32.88605579726201],[-117.24499071867764,32.886049379643097],[-117.24490874838607,32.886047253230196],[-117.24405852778776,32.886047472298486],[-117.24404721222203,32.886046650754977],[-117.24403623823859,32.88604418437864],[-117.2440259379858,32.886040147146225],[-117.24401662600492,32.886034662772623],[-117.24400858311924,32.886027897626036],[-117.24400205425572,32.886020057138772],[-117.24399723768711,32.886011379581277],[-117.24399428065573,32.886002127079927],[-117.24399327186228,32.885992582972165]],[[-117.24464064869058,32.881133335716392],[-117.24465686583368,32.881132372860918],[-117.24474480658627,32.88113166493644],[-117.24475691458706,32.881131644110553],[-117.24477318541054,32.88113108118413],[-117.24478940974252,32.881129903637174],[-117.24480555560655,32.881128118941156],[-117.24482159733574,32.881125725499295],[-117.24483748582553,32.881122728215686],[-117.24485320089478,32.881119138073899],[-117.24486871690722,32.88111495618211],[-117.24488399230984,32.881110193695946],[-117.24489900371577,32.881104861624799],[-117.24491370951104,32.881098965714322],[-117.24492809599728,32.88109252320811],[-117.24494212481731,32.881085544334397],[-117.24495576621366,32.88107804376083],[-117.24496900217306,32.881070035158906],[-117.24498180192042,32.881061537713279],[-117.24499413035532,32.881052566134613],[-117.24500597804405,32.881043136730575],[-117.24501731317355,32.881033271399367],[-117.24503103637947,32.881023178532743],[-117.24504491670314,32.881016016886278],[-117.24505996135454,32.881010791835756],[-117.24507579568005,32.881007638053148],[-117.24509201873761,32.881006633612252],[-117.24510906759852,32.881008059945628],[-117.24512416853189,32.881013196428853],[-117.24513884167489,32.881019155143314],[-117.24515302892605,32.881025901388966],[-117.24516666799137,32.881033407713417],[-117.2451796997518,32.881041643933578],[-117.24519207145907,32.881050576208004],[-117.24520373033405,32.881060167990228],[-117.24521463100649,32.881070376362025],[-117.24522471744045,32.8810811602944],[-117.2452339623906,32.881092473116134],[-117.24524231400355,32.88110426564878],[-117.24524974611253,32.881116492114216],[-117.24525622071489,32.881129099615421],[-117.24526171261047,32.881142033348866],[-117.24526620089377,32.881155240279931],[-117.2452696614434,32.881168666498034],[-117.24526902427662,32.881391302576816],[-117.24526806558991,32.881726650819957],[-117.24526637219924,32.882317580408191],[-117.24526411146773,32.882644680014572],[-117.24526349238015,32.882809591397098],[-117.24526349159923,32.882810089168693],[-117.24526316113258,32.88289754432315],[-117.24526211154294,32.883092702020527],[-117.24526128010855,32.883106401771506],[-117.24525710714356,32.883119658625183],[-117.24524977318694,32.883131899418515],[-117.24523959070761,32.883142593209435],[-117.24522700761612,32.883151278301426],[-117.24521256681071,32.883157576095492],[-117.24519689148156,32.883161214654393],[-117.24518146033637,32.883162064841194],[-117.24464068076639,32.883158170649679],[-117.24462444446193,32.883157471731437],[-117.24460873305021,32.88315395062159],[-117.24459422584928,32.883147762363826],[-117.24458155210651,32.883139170614918],[-117.24457125900094,32.883128553312694],[-117.24456379525728,32.883116371246764],[-117.24455948306633,32.883103142133336],[-117.24455847555647,32.883090121777862],[-117.24456025312546,32.882900420131335],[-117.24456105707745,32.882815365235402],[-117.24456105894795,32.88281524709123],[-117.2445634123392,32.882564743109974],[-117.24456578251385,32.882312227190603],[-117.24456885697286,32.881985127378016],[-117.24457198313074,32.881652487704272],[-117.24457621594701,32.8812017352897],[-117.24457692888879,32.881188701086039],[-117.24458094114792,32.881175407674888],[-117.2445881279239,32.881163104982406],[-117.24459817888628,32.881152323930699],[-117.24461065578836,32.881143529741912],[-117.24462502010836,32.881137109091625],[-117.24464064869058,32.881133335716392]]]}},{"attributes":{"OBJECTID":40,"Campus":"La Jolla Campus","FeatureID":null,"SHAPE.STLength()":35303.008141931612,"SHAPE.STArea()":29337376.783213306,"GlobalID":"{DB905930-7244-4E98-8F34-045D2DAF5F64}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887901000,"Clery":"Yes","Region":"West Campus"},"geometry":{"rings":[[[-117.22918882246046,32.878004093925085],[-117.22932578731968,32.876988509104201],[-117.22939593739207,32.876039529269406],[-117.23015488080837,32.875988276726268],[-117.23099479211277,32.876248808821018],[-117.23174093978841,32.87642558651951],[-117.23224516311528,32.876545044661064],[-117.23276705440233,32.876713287262191],[-117.23331081916889,32.876888578406188],[-117.2332986270392,32.876746104587241],[-117.23329649926529,32.87672123327922],[-117.23338527435209,32.876379098868377],[-117.23337793639324,32.875722585617382],[-117.23337303678389,32.875550874101933],[-117.23337517519599,32.875475544000132],[-117.23337686277624,32.875416096365065],[-117.23337697035795,32.875414726655542],[-117.23337708538912,32.875413354181461],[-117.23337720045049,32.875411984412388],[-117.23337731551189,32.8754106146433],[-117.23337743374856,32.875409242143725],[-117.23337755201553,32.875407872349129],[-117.23337767666334,32.875406499798522],[-117.23337779816605,32.875405132683426],[-117.23337792604971,32.875403762812304],[-117.23337805391319,32.875402391137889],[-117.23337818179679,32.875401021266718],[-117.23337831716006,32.875399651336075],[-117.23337844827947,32.875398284144453],[-117.23337858577979,32.875396914196784],[-117.23337872007451,32.87539554427466],[-117.23337886184891,32.875394174292964],[-117.23337900579058,32.875392806999301],[-117.23337915290757,32.875391436975129],[-117.23337929468194,32.875390066993383],[-117.23337944183926,32.875388700575904],[-117.23337959219199,32.875387333231167],[-117.23337974358309,32.875385963172953],[-117.23337989714143,32.875384595802736],[-117.23338005176825,32.875383228424035],[-117.23338020850194,32.875381858323287],[-117.23338036953989,32.875380490893555],[-117.23338053378342,32.875379123438236],[-117.23338069376298,32.875377756918716],[-117.2333808580065,32.875376389463391],[-117.2333810254556,32.875375021982613],[-117.2333811950417,32.875373654484846],[-117.23338136572659,32.87537228968354],[-117.23338153958677,32.875370922151717],[-117.23338171348729,32.875369558226552],[-117.23338189055303,32.875368190669263],[-117.2333820697861,32.875366825799937],[-117.23338225005742,32.875365458217118],[-117.23338243356449,32.875364093313792],[-117.2333826170716,32.875362728410423],[-117.23338280379438,32.875361364383224],[-117.23338299050704,32.875359999454389],[-117.23338318360055,32.875358631769529],[-117.23338337357927,32.875357272225116],[-117.23338356987833,32.875355904514741],[-117.23338376301214,32.875354540436497],[-117.23338396364584,32.875353178102117],[-117.23338416638627,32.875351813045683],[-117.23338436592114,32.875350448014771],[-117.23338457189735,32.875349085637829],[-117.23338477788371,32.875347724162566],[-117.23338498489822,32.875346359072125],[-117.23338519407997,32.875344996669682],[-117.23338540646732,32.875343634241666],[-117.23338562313884,32.87534227268138],[-117.23338583552618,32.875340910253421],[-117.23338605539314,32.875339547765947],[-117.23338627419153,32.875338185286935],[-117.23338649730439,32.875336826380618],[-117.23338671930838,32.875335463876127],[-117.23338694561667,32.875334104042587],[-117.23338717082623,32.875332741512587],[-117.2333874035557,32.875331382529708],[-117.2333876320313,32.875330025384173],[-117.23338786792604,32.875328662769114],[-117.23338810382076,32.875327300154026],[-117.233388339786,32.875325943850648],[-117.233388577848,32.875324583923557],[-117.23338882018409,32.875323223962496],[-117.23338906253024,32.875321864903071],[-117.23338930810209,32.875320507621446],[-117.23338955684927,32.875319147609353],[-117.23338980136269,32.875317791237926],[-117.23339005331542,32.875316431200311],[-117.23339030526812,32.875315071162674],[-117.23339056048684,32.875313716509545],[-117.23339081889095,32.875312360027543],[-117.23339107728505,32.875311002643883],[-117.23339133571942,32.875309648866903],[-117.23339160052456,32.875308291432241],[-117.23339186319268,32.87530693401456],[-117.23339213124372,32.875305580161026],[-117.2333923992544,32.875304222700834],[-117.23339267050089,32.875302867920091],[-117.23339294496306,32.875301514015547],[-117.23339321727801,32.875300159226342],[-117.23339349173008,32.87529880442014],[-117.23339376939775,32.875297450490045],[-117.23339404812383,32.875296095649837],[-117.23339433223285,32.87529474437374],[-117.23339461306573,32.875293386811435],[-117.23339490146896,32.875292037304725],[-117.2333951887835,32.875290686003076],[-117.23339547712622,32.8752893310863],[-117.23339576764633,32.875287979759186],[-117.23339606243044,32.875286627496365],[-117.23339635618632,32.8752852788487],[-117.23339665420616,32.875283929265422],[-117.23339695537112,32.875282574246562],[-117.23339725553811,32.875281225547866],[-117.23339755673325,32.875279873234085],[-117.23339786437988,32.875278524475895],[-117.23339817522194,32.875277174790462],[-117.23339847859444,32.875275826066272],[-117.23339878943645,32.875274476380952],[-117.23339910349414,32.875273127571738],[-117.23339941757202,32.875271780565804],[-117.23339973483522,32.875270431731046],[-117.2334000521186,32.875269084699639],[-117.23340037154908,32.875267738552928],[-117.23340069521332,32.875266388765461],[-117.23340101894811,32.875265045289694],[-117.23340133940675,32.875263695527771],[-117.23340167382672,32.875262351966931],[-117.23340200393228,32.87526100483349],[-117.23340233404794,32.875259658601728],[-117.23340266739937,32.875258315049393],[-117.23340300394621,32.875256970569929],[-117.23340334050316,32.875255626992079],[-117.23340368025563,32.875254282487077],[-117.23340402429217,32.875252938849705],[-117.23340436725019,32.875251594319167],[-117.23340471021822,32.875250250690335],[-117.23340506069614,32.875248909706926],[-117.23340540688987,32.875247567855915],[-117.23340575947454,32.875246224150501],[-117.23340611314795,32.875244882239961],[-117.23340646576284,32.875243541239534],[-117.23340682268204,32.875242202910115],[-117.23340718166773,32.875240858252027],[-117.23340754179247,32.875239519897107],[-117.23340790405426,32.875238181525148],[-117.23340827058001,32.875236842217539],[-117.23340863711586,32.875235503811595],[-117.23340900578876,32.875234165388612],[-117.23340937552005,32.875232826055438],[-117.23340974846694,32.875231487598434],[-117.23341011720026,32.875230154585488],[-117.233410496518,32.875228812470795],[-117.23341087590622,32.87522747666776],[-117.23341125532471,32.875226143569783],[-117.23341163787816,32.875224804134554],[-117.23341201940346,32.875223468314509],[-117.23341240523298,32.875222135165473],[-117.23341279423785,32.875220799285906],[-117.2334131832629,32.875219465209653],[-117.23341357229796,32.87521813203513],[-117.23341396774416,32.875216798809547],[-117.23341435998476,32.87521546560945],[-117.23341475862641,32.875214131456637],[-117.23341515727813,32.875212798205531],[-117.23341556023418,32.875211467625427],[-117.23341596212171,32.875210137053827],[-117.23341636397895,32.875208803777127],[-117.2334167722674,32.875207472252839],[-117.23341718059625,32.875206144335166],[-117.23341758996331,32.875204813703995],[-117.23341800146741,32.875203483055863],[-117.2334184162073,32.875202155087131],[-117.23341883204591,32.875200829814965],[-117.23341924996113,32.87519949911578],[-117.23341967110201,32.875198170194388],[-117.23342009332148,32.875196842166126],[-117.2334205145027,32.875195516851448],[-117.2334209399277,32.8751941887977],[-117.23342136751997,32.875192863431984],[-117.23342179618078,32.875191538057706],[-117.23342222697856,32.875190212666418],[-117.23342266205043,32.875188887241116],[-117.23342309715252,32.875187564520871],[-117.23342353118609,32.87518624180904],[-117.23342397265897,32.87518491543107],[-117.23342441096658,32.875183592685325],[-117.23342485782236,32.875182269871438],[-117.23342529936575,32.875180949805149],[-117.23342574408444,32.875179627008293],[-117.23342619203888,32.875178306890938],[-117.23342664316866,32.875176984043094],[-117.23342709326018,32.875175663908728],[-117.23342754765594,32.875174346445348],[-117.23342800522705,32.875173026251424],[-117.23342846279813,32.87517170605755],[-117.23342892039945,32.875170388568648],[-117.23342938120631,32.875169071054238],[-117.23342984522874,32.87516775441599],[-117.23343030924117,32.875166436876043],[-117.2334307764591,32.87516511931058],[-117.2334312479813,32.875163804416104],[-117.23343171843496,32.875162489530155],[-117.23343218888871,32.875161174644184],[-117.2334326625479,32.875159859732726],[-117.23343313941264,32.875158544795731],[-117.23343362055151,32.875157229824715],[-117.23343409744645,32.875155917592743],[-117.23343458076259,32.87515460621136],[-117.23343506513717,32.875153293919801],[-117.23343555164881,32.875151981611289],[-117.23343603816035,32.875150669302741],[-117.23343652897627,32.875149359665173],[-117.23343701872363,32.875148050036131],[-117.23343751275512,32.875146741274705],[-117.233438005708,32.875145431620126],[-117.23343850290469,32.875144119226519],[-117.23343900232918,32.875142814930882],[-117.23343950276163,32.87514150521676],[-117.23344000643999,32.875140199083802],[-117.23344050903968,32.875138892057663],[-117.23344101591344,32.875137584997539],[-117.23344152602299,32.875136280616886],[-117.23344203507409,32.875134977146367],[-117.23344254515339,32.875133670060677],[-117.233443061674,32.875132365628978],[-117.23344357502936,32.875131064829453],[-117.23344409154997,32.87512976039779],[-117.23344461344341,32.875128458628531],[-117.23344513320984,32.875127157777989],[-117.2334456561415,32.875125853295252],[-117.23344618233916,32.875124554196979],[-117.23344670851667,32.875123253295385],[-117.23344723791985,32.875121954171647],[-117.23344776732307,32.875120655047837],[-117.23344829994188,32.875119356800269],[-117.23344883255058,32.875118057650951],[-117.23344936837488,32.875116759377818],[-117.23344991169898,32.875115462848449],[-117.23345044754348,32.875114166378665],[-117.23345098980914,32.875112870759494],[-117.23345153206462,32.875111574238609],[-117.23345207756604,32.875110281298944],[-117.23345262409558,32.875108984744067],[-117.23345317280254,32.875107691778872],[-117.23345372470487,32.875106397886448],[-117.23345427771609,32.875105107592262],[-117.23345483282399,32.875103813674343],[-117.23345538904073,32.875102523354563],[-117.2334559473844,32.875101232116165],[-117.23345650573813,32.875099941779375],[-117.23345706835578,32.875098650506914],[-117.23345762994531,32.875097362849665],[-117.23345819580884,32.875096075158325],[-117.23345876486788,32.875094786539826],[-117.23345933286841,32.875093498831518],[-117.23345990513293,32.87509221018751],[-117.23346047636923,32.87509092515868],[-117.23346104867402,32.875089640121331],[-117.23346163058542,32.87508835410577],[-117.23346220609572,32.875087069042898],[-117.23346278696877,32.875085785740815],[-117.23346336889021,32.875084500626961],[-117.23346395404741,32.875083218192536],[-117.23346453919449,32.875081934856418],[-117.23346512758744,32.875080655101506],[-117.2334657159501,32.875079372641551],[-117.23346630648005,32.8750780928696],[-117.23346690127396,32.875076812161964],[-117.23346749607791,32.875075532355993],[-117.23346809091211,32.875074255255008],[-117.23346869215743,32.875072978102992],[-117.23346929446113,32.875071700040834],[-117.23346989250085,32.875070422914327],[-117.23347050015717,32.875069145711315],[-117.23347110463823,32.875067871238734],[-117.23347171232476,32.875066596740659],[-117.23347232000123,32.875065321340962],[-117.23347293092351,32.875064049522436],[-117.23347354608968,32.875062774964803],[-117.23347416021747,32.875061503120691],[-117.23347477755084,32.875060231251126],[-117.23347539595274,32.875058959372979],[-117.23347601652182,32.875057690182871],[-117.23347663708084,32.875056420091042],[-117.23347726192401,32.875055150866928],[-117.23347788887394,32.87505387892071],[-117.23347852015839,32.875052612350537],[-117.23347914396322,32.875051345839907],[-117.23347977524766,32.875050079269684],[-117.23348040866912,32.8750488126825],[-117.23348104318931,32.87504754879177],[-117.23348167981624,32.875046282179056],[-117.2334823239531,32.875045018211743],[-117.23348296170899,32.875043757000547],[-117.23348360157168,32.875042493067276],[-117.23348424570845,32.875041229100013],[-117.23348489308097,32.875039967812214],[-117.23348553938497,32.875038706532933],[-117.23348618678772,32.875037447950142],[-117.23348684058136,32.875036187512954],[-117.23348749118958,32.87503492890464],[-117.23348814820892,32.87503367024528],[-117.23348880525846,32.875032414290921],[-117.23348946120925,32.875031155640052],[-117.2334901214643,32.875029899660227],[-117.23349078174959,32.875028646385346],[-117.23349144838548,32.875027387649403],[-117.23349211188636,32.875026135250664],[-117.23349277858271,32.87502488192473],[-117.23349344955309,32.875023628564811],[-117.23349411942469,32.875022372508383],[-117.23349479260263,32.875021125443062],[-117.23349546574026,32.875019874771112],[-117.23349614208335,32.875018624073626],[-117.23349682163207,32.875017373350602],[-117.23349750122107,32.8750161262343],[-117.23349818186844,32.875014878207779],[-117.23349886465282,32.875013630164254],[-117.23349955385838,32.875012382971356],[-117.23350023774151,32.875011137624362],[-117.23350092696717,32.875009892234743],[-117.23350161620296,32.875008647746874],[-117.23350230973288,32.875007405028271],[-117.23350300216407,32.875006159613172],[-117.23350369890966,32.875004917770731],[-117.23350439781238,32.875003677714595],[-117.23350509455787,32.87500243587214],[-117.23350579666609,32.875001195790475],[-117.23350649984282,32.874999955700318],[-117.23350720516667,32.874998716494815],[-117.23350791157917,32.874997479084158],[-117.23350862117702,32.87499623984457],[-117.23350932975671,32.874995005121882],[-117.23351003938475,32.874993768587345],[-117.23351106781466,32.874991990269891],[-117.23351423069383,32.874985566290071],[-117.23368040504698,32.874648058268733],[-117.23378103210963,32.874443680281331],[-117.23371715802205,32.874443747891114],[-117.23371400648493,32.874448124818336],[-117.23370524520087,32.874457892871845],[-117.23369617705933,32.874466212455374],[-117.23369516493673,32.874465434189247],[-117.23368905147505,32.87446964262498],[-117.23368202603835,32.874473619357786],[-117.23367536384376,32.874476632836746],[-117.23366394332668,32.874479566970635],[-117.23365801942082,32.874480658356525],[-117.23367700104141,32.87444385749621],[-117.2336510080268,32.874443930975623],[-117.23346725424497,32.874444450509614],[-117.23345522532622,32.874443432596991],[-117.23342626069541,32.874442183372338],[-117.23337556140683,32.874441864596371],[-117.23331056846959,32.874441643324054],[-117.23323076386461,32.874442211688752],[-117.23314276830925,32.874442485380811],[-117.23300203221616,32.874444047005142],[-117.23296458573469,32.874444011274647],[-117.23295564968345,32.874443404251871],[-117.23294931651233,32.874441723279702],[-117.23293270560835,32.874432400600355],[-117.23292992368266,32.874430839262303],[-117.23292977644799,32.874432390538232],[-117.23286412520552,32.874432164348946],[-117.23286236194143,32.874432158536912],[-117.23285622042516,32.874432137055052],[-117.23285613906612,32.874425236625768],[-117.23285282822472,32.874420713644618],[-117.23285276936686,32.874420610411839],[-117.23284968255787,32.8744151929181],[-117.23284690714902,32.874408666502596],[-117.23284480236811,32.874402577510587],[-117.23284389512722,32.874398560226624],[-117.23284282807992,32.874391525162004],[-117.23284228091195,32.87438348592346],[-117.23284215455911,32.874368157214732],[-117.23284166645735,32.874333072284095],[-117.23284145346221,32.874332945930242],[-117.23284054035582,32.874332325577122],[-117.23283967692554,32.874331656134494],[-117.23283886747554,32.874330940273346],[-117.23283811525168,32.874330181574798],[-117.23283742349972,32.874329383620058],[-117.23283679544544,32.874328548186995],[-117.23283623328618,32.874327680668507],[-117.23283573917912,32.874326782851107],[-117.2328353164003,32.874325861020807],[-117.23283496496995,32.874324916981045],[-117.23283468815394,32.874323956116235],[-117.23283448598244,32.874322981131485],[-117.23283436065302,32.874321997419784],[-117.23283431003952,32.874320910314438],[-117.23283398959472,32.874225739687482],[-117.2328324938206,32.874155835465857],[-117.23283238268793,32.874151052577439],[-117.23283221551409,32.874150245039367],[-117.2328320901849,32.874149261327645],[-117.23283204128381,32.874148327505814],[-117.23283149150102,32.874112694802982],[-117.2328314906155,32.874112519870948],[-117.23283142044366,32.874072086956005],[-117.23283130870632,32.874071841667629],[-117.23283095727702,32.874070897627867],[-117.23283068046184,32.874069936763064],[-117.23283047829101,32.87406896177832],[-117.23283035296198,32.874067978066577],[-117.23283030309399,32.874066957684647],[-117.23283005749988,32.874038562695794],[-117.23283008528958,32.874037606621989],[-117.23283018862084,32.874036621091363],[-117.23283036897519,32.874035643063735],[-117.23283062427599,32.8740346779662],[-117.23283095455355,32.874033728503704],[-117.2328310910025,32.874033411806536],[-117.23283094670396,32.874018676590545],[-117.23283062941582,32.87401782335575],[-117.2328303526008,32.874016862490883],[-117.23283015043006,32.874015887506161],[-117.23283002510114,32.874014903794397],[-117.23282997448783,32.874013816689057],[-117.23282981810357,32.87396738783643],[-117.23282903812456,32.873912104271277],[-117.23282850940389,32.873871756161073],[-117.23282000021523,32.873295203866782],[-117.23282002789396,32.873294237874603],[-117.23282012060919,32.873293354325881],[-117.23254658969455,32.873295529843951],[-117.23254662152135,32.873295222094825],[-117.23254664692047,32.873294625837516],[-117.23254665233694,32.873294345350793],[-117.23254668556217,32.873294258518825],[-117.23256919130101,32.873294078641329],[-117.23257903353867,32.873293932739088],[-117.2325467104509,32.873294190689791],[-117.23253011028396,32.873294322699145],[-117.23252873726551,32.873294333617707],[-117.23252643892879,32.873294351894522],[-117.23228402162526,32.873296284816348],[-117.23237273622414,32.873294572230634],[-117.2322880867095,32.873295054976801],[-117.23147299007154,32.873299699267733],[-117.23105462127803,32.873302077811303],[-117.23098485256064,32.873305686896046],[-117.23095656523499,32.873306013383591],[-117.23087051313676,32.873306539658884],[-117.23079295507786,32.873305993900495],[-117.23079043528492,32.873306468383866],[-117.230790225384,32.873306523253177],[-117.23079002860659,32.873306605070766],[-117.23078985135358,32.873306712884116],[-117.23078969464329,32.873306842176255],[-117.23078869788564,32.873307822172649],[-117.23078831101712,32.873308202174243],[-117.230787761369,32.873308742175581],[-117.23078000179108,32.873315692222675],[-117.23077995103593,32.873315740418199],[-117.23077989085526,32.87331580582174],[-117.23077945516435,32.873316311553722],[-117.23075862884795,32.873340517466666],[-117.23111933325654,32.872085172055606],[-117.23177190794402,32.871925444946299],[-117.23184950633153,32.871923488311587],[-117.23198471894048,32.871891839062293],[-117.23203633742395,32.871891448629626],[-117.23200995155841,32.871879904067725],[-117.23199686863458,32.871874222437725],[-117.23199262106495,32.871873170493096],[-117.23198649716589,32.871872605075431],[-117.23198105861819,32.871872458031753],[-117.23192623109938,32.871879636152293],[-117.23190957623991,32.871881450274799],[-117.23190679871345,32.871880082755226],[-117.23190607594431,32.871877651976632],[-117.23190817488221,32.871873462006668],[-117.23190956563063,32.87187130749934],[-117.2319200726549,32.871871283511496],[-117.23194377911234,32.871867944397174],[-117.23196235372369,32.871863981476956],[-117.23196347267528,32.871859590990987],[-117.23198501857395,32.871859420649088],[-117.23198886151042,32.871859451424477],[-117.23199667775805,32.871859513742088],[-117.23205137969798,32.871859946438491],[-117.23209307809901,32.871860086606773],[-117.23210089501264,32.871860112842647],[-117.23212016319145,32.871860177001956],[-117.23219355453783,32.87186070905193],[-117.2321972958884,32.871860733414422],[-117.23220511200542,32.871860783997157],[-117.23227034680491,32.871861209511444],[-117.23230151294307,32.871861409897626],[-117.2323093290501,32.871861459572131],[-117.23236323928111,32.871861805545002],[-117.23240573032407,32.871861923975729],[-117.23241354718762,32.871861945683442],[-117.2324355765395,32.871862007676818],[-117.23250994998787,32.871862163816502],[-117.23251776679106,32.871862180107591],[-117.23251789288169,32.871862180006651],[-117.23260556159933,32.871863298931935],[-117.23261416063033,32.871863318013389],[-117.23262197638525,32.871863336109755],[-117.23268976738731,32.871863489485222],[-117.23271837977265,32.871863510791577],[-117.23272619645515,32.871863516249476],[-117.23278077754578,32.87186355642217],[-117.23282259974218,32.871863681833311],[-117.2328304166261,32.871863705317978],[-117.23287405226391,32.871863837026403],[-117.23292681786498,32.871864165708381],[-117.2329346339626,32.871864214441622],[-117.2329626357716,32.871864389337411],[-117.2330310349696,32.871864845182934],[-117.23303885110761,32.871864897516275],[-117.2330628594855,32.871865057271982],[-117.23313525357909,32.871865276576912],[-117.23314307046327,32.871865300041854],[-117.2331762764736,32.871865401014666],[-117.23317835295359,32.871863127415764],[-117.23318465108407,32.871863314457315],[-117.23321334828846,32.871859833486781],[-117.23328243422493,32.871860066406938],[-117.23334910457245,32.871860148985405],[-117.23344574888513,32.871862757705173],[-117.23351984163961,32.871861700816687],[-117.23362228401163,32.8718610566278],[-117.23364816489965,32.871861440325524],[-117.23365215018879,32.871866844333844],[-117.23364817930782,32.871871522655063],[-117.23365311395062,32.871874673752657],[-117.23365810090421,32.871868453468551],[-117.23367139405418,32.871877540955346],[-117.23372042245579,32.871876303860333],[-117.23377470890391,32.871874934704259],[-117.2337915955071,32.87187511856181],[-117.23392203847369,32.871876545211819],[-117.23403566111621,32.871877790079559],[-117.23406425597753,32.871866020858484],[-117.23547349668365,32.87194417973673],[-117.23568137960063,32.871991211343776],[-117.23679528221976,32.872128269532197],[-117.23681128904764,32.872130800040814],[-117.23682726629615,32.872133456126583],[-117.23684321081043,32.872136242323549],[-117.23685912468719,32.872139155007943],[-117.23687500473103,32.872142195107052],[-117.23689085302848,32.872145358095374],[-117.23690666645501,32.872148651212008],[-117.23692243645279,32.872152073623568],[-117.23693816824286,32.872155614467331],[-117.23695386301516,32.872159284554762],[-117.23696951323986,32.872163079437364],[-117.23698511996513,32.872166997303232],[-117.23700068431023,32.872171042652198],[-117.23701620193046,32.872175209206752],[-117.23703167288647,32.872179502376902],[-117.23704709177532,32.872183916795365],[-117.23706246397987,32.872188456026151],[-117.23707778197026,32.872193115620668],[-117.23709304897224,32.872197897356699],[-117.2371082628691,32.872202803054591],[-117.23712341825778,32.872207827347118],[-117.23721519277969,32.872259316126296],[-117.23721924296262,32.872260863627325],[-117.23723396862972,32.872266729965908],[-117.23724852132749,32.872272894360037],[-117.23726289249809,32.872279355976431],[-117.23727707462172,32.872286111268203],[-117.23729105801134,32.872293154000666],[-117.23730483302036,32.872300481545665],[-117.23731839213902,32.872308091258027],[-117.23733173100247,32.872315975057042],[-117.23734483781698,32.872324129429984],[-117.23735769974047,32.872332552676049],[-117.23737032308277,32.872341235727447],[-117.23738269283452,32.872350174195361],[-117.23739479827049,32.872359364558768],[-117.23740663607381,32.872368796924818],[-117.23741819987417,32.872378474951624],[-117.23742947989328,32.872388384289415],[-117.23744047187733,32.872398526775676],[-117.23745117029176,32.872408885321619],[-117.23746156449209,32.872419463619394],[-117.23747165221987,32.872430250865982],[-117.23748142592487,32.872441240809778],[-117.23749088021395,32.872452428985021],[-117.23750001074234,32.872463809114393],[-117.23750880990902,32.872475370437705],[-117.23751727341985,32.872487111185897],[-117.23752539688938,32.872499021474837],[-117.23753317703117,32.872511094116796],[-117.23754060308937,32.872523322885613],[-117.23776867865153,32.872517270502037],[-117.23783690653903,32.872515457163928],[-117.2379021910865,32.872514935180554],[-117.23809744637165,32.872513373808687],[-117.23822223704079,32.872314481664141],[-117.23822995479537,32.872303296868402],[-117.2382382541733,32.872291474392703],[-117.23824666529929,32.872279706930996],[-117.23825518175217,32.872267993632867],[-117.23826380892504,32.872256338963879],[-117.23827254039682,32.872244742073612],[-117.23828138470529,32.87223320199211],[-117.23829033225422,32.872221720599512],[-117.23829938944446,32.872210296942846],[-117.23830854457329,32.872198935624475],[-117.23831781366786,32.872187636516145],[-117.23832718494455,32.872176397006903],[-117.23833665846405,32.872165222506645],[-117.23834623627214,32.872154104883265],[-117.23835591525453,32.87214305227743],[-117.23836569652023,32.8721320682872],[-117.2383755789298,32.872121146609516],[-117.23838556677742,32.872110289013342],[-117.23839564729194,32.872099500109677],[-117.23840583218619,32.872088776197792],[-117.23841611512006,32.87207812364062],[-117.23842650028648,32.87206753519051],[-117.23843697708169,32.872057018146428],[-117.23844755614996,32.872046568816032],[-117.23845823004221,32.872036189964227],[-117.23846899876872,32.872025882492608],[-117.23847986340795,32.872015647294333],[-117.23849082285099,32.872005480771222],[-117.23850187505202,32.871995391055322],[-117.23851302206695,32.871985370916228],[-117.23852426077134,32.871975427592837],[-117.23853559219314,32.871965557469998],[-117.2385470153045,32.871955764162763],[-117.23855852685935,32.871946044090215],[-117.23857013119242,32.871936402628116],[-117.23858181970527,32.871926835336446],[-117.23859360205462,32.871917345744954],[-117.23860546862429,32.871907933930508],[-117.23861742161195,32.871898605286027],[-117.23862946309383,32.871889354384372],[-117.23864158665899,32.871880181276779],[-117.23865377989458,32.871869600883031],[-117.23865557769942,32.871868500792033],[-117.2386660908052,32.871862075571705],[-117.23867846821116,32.87185314570479],[-117.238690927741,32.871844297238532],[-117.23870347050378,32.871835533771055],[-117.2387160911165,32.871826851738419],[-117.23872879493175,32.871818251999457],[-117.23874157769589,32.871809736391732],[-117.23875443516542,32.871801307654408],[-117.23876737370058,32.871792961227825],[-117.23878039015665,32.871784702547565],[-117.23879348238668,32.871776530729164],[-117.2388066482233,32.871768443084598],[-117.2388198855802,32.871760444139277],[-117.23883320300521,32.871752533824775],[-117.23884659192021,32.87174470950454],[-117.23886005128706,32.871736973892077],[-117.23887358327318,32.87172932967519],[-117.23891573527831,32.871712501120449],[-117.23895788726733,32.871695672551368],[-117.23896156533193,32.871694059640362],[-117.23897598768302,32.871687674340116],[-117.23899036006107,32.871681216396503],[-117.2390046856513,32.871674683980608],[-117.23901896549177,32.871668074378945],[-117.23903319431101,32.871661393945864],[-117.23904737525358,32.871654637245761],[-117.23906150514441,32.871647807009374],[-117.23907558611042,32.871640902317878],[-117.2390896138978,32.871633925008844],[-117.23910359168167,32.871626872351598],[-117.23911751631734,32.871619749781921],[-117.23913138882259,32.87161255278285],[-117.23914521137485,32.871605284944032],[-117.23915897753288,32.871597943611746],[-117.23917269055283,32.871590533268694],[-117.23918634824695,32.871583049423677],[-117.23919994850876,32.871575494798847],[-117.23921349668051,32.871567869351423],[-117.23922698955684,32.871560173107085],[-117.23924042181559,32.871552407912013],[-117.23925379771042,32.871544571928553],[-117.23926711830973,32.871536665148305],[-117.23928037935995,32.871528689408741],[-117.23928369801457,32.871526664561586],[-117.23982718905027,32.871524939302127],[-117.23983013749354,32.871117096313526],[-117.24052473726226,32.870613060995183],[-117.24058362953683,32.87057221844929],[-117.24058413564076,32.870571898779509],[-117.24064461259627,32.870533624303043],[-117.24064507123821,32.870533360020225],[-117.24070756758698,32.870497351646371],[-117.24071628910553,32.870492601635917],[-117.24071828256778,32.870491516177012],[-117.24079286982047,32.870453440484141],[-117.24086965310636,32.870418609660057],[-117.2408735656261,32.870416948821905],[-117.2408742260434,32.870416668491991],[-117.24095526305838,32.870384577277761],[-117.24103817110336,32.870356095129416],[-117.24112272665303,32.870331298681499],[-117.24120869861255,32.870310256514124],[-117.24129585362908,32.870293026405164],[-117.24138395500297,32.870279653535427],[-117.24147276274839,32.870270175898781],[-117.24156203458062,32.870264617080267],[-117.24165152921243,32.87026299434531],[-117.24179722500716,32.870273547589811],[-117.2418942688204,32.870286411989369],[-117.24199025410078,32.870304048750292],[-117.2420848500178,32.870326399212921],[-117.24217231236732,32.870350556282503],[-117.24225798112097,32.870378923532165],[-117.24227314186147,32.870397972949668],[-117.24228799530272,32.870403606812424],[-117.24231494484638,32.870400526411125],[-117.24241834330353,32.870445765344712],[-117.24251756044455,32.870497242715565],[-117.24261207065163,32.870554683214607],[-117.24270136934632,32.870617782508816],[-117.24277347570076,32.870674786098355],[-117.24284246976775,32.870734471208429],[-117.24290821019451,32.870796716342532],[-117.24298254607785,32.870880535232736],[-117.24305152625411,32.870967555050541],[-117.24311495561216,32.871057531195746],[-117.2431726571311,32.871150212610125],[-117.24322446971262,32.871245339089512],[-117.24327024823235,32.871342645792097],[-117.24330986348929,32.871441858729561],[-117.24334320655066,32.871542701045072],[-117.24335944128985,32.871642358940875],[-117.24336965250394,32.871742583770022],[-117.24337381375449,32.871843117846353],[-117.24337338370613,32.871904500638493],[-117.24337069422937,32.871965842982831],[-117.24337219405921,32.871979526684576],[-117.24337360312971,32.871993216526484],[-117.24337491394124,32.872006910765407],[-117.2433761297704,32.872020615687212],[-117.24337724950796,32.872034327693811],[-117.24337827307238,32.872048039571908],[-117.24337920378113,32.872061761214049],[-117.24338003618992,32.872075483646547],[-117.24338077356521,32.872089212253584],[-117.24338141801343,32.872102944313063],[-117.24338196632904,32.872116679850691],[-117.24338241527605,32.87213041618724],[-117.24338276912825,32.872144153288367],[-117.24338302791624,32.872157893859047],[-117.24338319267788,32.872171635185751],[-117.24338326020772,32.87218537729418],[-117.24338323264259,32.872199120167203],[-117.24338310781501,32.872212861116992],[-117.24338288899145,32.872226605527743],[-117.24338257498118,32.872240342588071],[-117.24338216267039,32.872254080438701],[-117.24338165733016,32.87226781272512],[-117.24338105690489,32.872281546677769],[-117.2433803581179,32.872295276010746],[-117.24337956206809,32.87230900342049],[-117.24337867509513,32.87232272254375],[-117.24337768980094,32.872336440654024],[-117.24337661040862,32.872350153208615],[-117.24337543262372,32.872363858438455],[-117.24337048469398,32.87567588338684],[-117.24347158009118,32.875654168028589],[-117.24347941975839,32.875804189344592],[-117.24347954126654,32.875808041539891],[-117.2434800190978,32.87582177764304],[-117.24348057813724,32.8758355130932],[-117.24348120870707,32.875849242557742],[-117.24348192692685,32.875862974022787],[-117.24348271774558,32.87587669949356],[-117.24348358545782,32.875890420739061],[-117.24348453222102,32.875904139545398],[-117.24348555695647,32.875917855019608],[-117.24348665963369,32.875931564456579],[-117.24348783706746,32.875945269685417],[-117.24348909568941,32.875958972457966],[-117.24349043224302,32.875972668291666],[-117.24349184139589,32.875986358131058],[-117.24349333170646,32.87600004280916],[-117.24349489888033,32.876013720556976],[-117.2434965450647,32.876027392258919],[-117.24349826598559,32.876041057949429],[-117.24350006587629,32.876054713987514],[-117.24350194265085,32.876068364898572],[-117.24350389846656,32.876082012468807],[-117.24350592781798,32.876095642314496],[-117.2435080362107,32.87610926881937],[-117.24351022252542,32.876122887483604],[-117.24351248674161,32.876136496503982],[-117.24351326914432,32.876142283948276],[-117.24351514273751,32.8761559366882],[-117.24351706543278,32.876169584524582],[-117.24351903718944,32.876183223850695],[-117.24352105060927,32.87619686193996],[-117.24352311309045,32.876210491518975],[-117.24352522149881,32.876224118925151],[-117.24352737898897,32.876237739624415],[-117.24352958129707,32.876251354552814],[-117.24353182952213,32.876264966406623],[-117.24353412574018,32.876278569758817],[-117.2435364689439,32.876292170027845],[-117.24353885696556,32.876305764525981],[-117.24354128976445,32.876319349646515],[-117.24354377276481,32.876332932559862],[-117.24354629736742,32.876346508826366],[-117.24354887638454,32.876360077441248],[-117.24355149593542,32.876373639417956],[-117.2435541635101,32.87638719559795],[-117.24355687910844,32.876400745981215],[-117.24355963845642,32.876414290602135],[-117.24356244579761,32.876427826721326],[-117.24356529581991,32.876441357086748],[-117.24356819703092,32.876454878022997],[-117.24356923650696,32.876461853708086],[-117.24357126381148,32.876475489881415],[-117.24357328787032,32.876489122473828],[-117.24357531089176,32.876502757779811],[-117.24357733178699,32.876516394004639],[-117.24357934522345,32.87653003209288],[-117.24358135867068,32.87654367108275],[-117.24358336991021,32.8765573037781],[-117.24358538015316,32.876570942793713],[-117.24358738394474,32.876584578254125],[-117.24358938564058,32.876598217338355],[-117.24359138625837,32.876611855529532],[-117.24359338371191,32.876625497353089],[-117.24359537788911,32.876639132890659],[-117.24359736890209,32.87665277206073],[-117.2435993566999,32.876666410354844],[-117.24360134130288,32.876680049576329],[-117.2436033258963,32.876693687896136],[-117.24360530411987,32.876707329874129],[-117.24360728233381,32.876720970950416],[-117.24360925411683,32.876734610274902],[-117.24361122912643,32.876748251376917],[-117.24361319666704,32.876761893440687],[-117.24361516206102,32.876775534619917],[-117.2436171306714,32.876789176675061],[-117.24361908218577,32.876802818867645],[-117.24362104440652,32.876816462777583],[-117.24362299912772,32.876830104944297],[-117.24362495170223,32.876843746226484],[-117.24362690004399,32.876857391149713],[-117.24362884620848,32.876871032483386],[-117.24363078814024,32.876884677458094],[-117.24363273430595,32.876898318791746],[-117.24363466985817,32.87691196652289],[-117.2436366021748,32.876925611574848],[-117.24363853451243,32.876939258430056],[-117.24364046359412,32.876952900802706],[-117.24364239060044,32.876966548602475],[-117.24364431649805,32.876980192804211],[-117.24364623920081,32.876993837933256],[-117.2436481555133,32.877007484917179],[-117.24365006863098,32.877021132828609],[-117.24365198171863,32.877034778034947],[-117.24365389055312,32.877048425078932],[-117.24365579726133,32.877062073041742],[-117.24365770395994,32.877075720102866],[-117.24365960425804,32.877089368117183],[-117.24366150458727,32.877103018836451],[-117.24366339739657,32.877116666009186],[-117.24366529128523,32.877130314074982],[-117.24366718093081,32.877143964880084],[-117.24372687174203,32.878391320173222],[-117.24372678505952,32.878402473698159],[-117.24372668378507,32.878416214457367],[-117.24372658144202,32.878429955225187],[-117.24372647592381,32.878443698723792],[-117.2437263767864,32.878457439465812],[-117.24372627444325,32.87847118023361],[-117.24372617640486,32.878484923672033],[-117.24372607726734,32.878498664414082],[-117.243725981366,32.878512407835267],[-117.24372588650266,32.878526148542903],[-117.24372578736502,32.878539889284916],[-117.24372569466931,32.878553632680365],[-117.24372559873729,32.878567373396571],[-117.24372550711003,32.87858111678338],[-117.2437254143837,32.87859485747385],[-117.24372532272579,32.878608598155651],[-117.24372523323565,32.878622341525272],[-117.24372514371484,32.878636082189907],[-117.24372505849885,32.87864982552518],[-117.24372496897801,32.8786635661898],[-117.24372488376196,32.878677309525024],[-117.24372479744673,32.878691050163859],[-117.24372471116203,32.878704793507694],[-117.24372462915156,32.878718536817168],[-117.24372454604197,32.87873227743016],[-117.24372446400089,32.878746018034626],[-117.24372438513493,32.878759755908291],[-117.24372430208639,32.878773501931292],[-117.24372422325092,32.878787242509929],[-117.24372414658312,32.878800985776401],[-117.24372406774759,32.878814726355024],[-117.24372399107975,32.878828469621489],[-117.24372391544986,32.878842210174319],[-117.24372384305622,32.878855953406386],[-117.24372376956342,32.878869693942036],[-117.2437236939641,32.878883437199875],[-117.2437236236769,32.87889717770976],[-117.24372355128317,32.878910920941763],[-117.24372348206458,32.878924661443023],[-117.24372341180789,32.878938404657845],[-117.24372334579493,32.878952145133326],[-117.2437232766068,32.878965888339572],[-117.24372321063451,32.878979632421746],[-117.24372314671791,32.878993369273289],[-117.24372308077614,32.879007116060393],[-117.24372301795857,32.879020855608424],[-117.24372295519188,32.87903459966477],[-117.2437228955902,32.879048340088623],[-117.24372283174473,32.87906208325186],[-117.24372277214295,32.879075823675741],[-117.24372271257172,32.879089566804616],[-117.2437226562062,32.879103309907691],[-117.24372259981006,32.87911705030578],[-117.24372254665022,32.879130793383055],[-117.24372248597976,32.879144533815506],[-117.24372243281989,32.879158276892788],[-117.24372237965993,32.879172019970085],[-117.24372232646945,32.879185760342317],[-117.24372227330953,32.879199503419613],[-117.24372222332465,32.879213243766095],[-117.24372217337034,32.879226986817564],[-117.24372212341608,32.879240729869061],[-117.24372207663689,32.879254470189736],[-117.24372202988827,32.879268213215411],[-117.24372198310908,32.879281953536101],[-117.24372193636037,32.879295696561719],[-117.2437218928174,32.879309439561631],[-117.24372184924391,32.879323179856534],[-117.24372180567035,32.87933692015141],[-117.24372176640156,32.879350663116909],[-117.24372172606427,32.879364406090978],[-117.24372168252125,32.879378149090869],[-117.24372164535906,32.879391889334158],[-117.24372160822743,32.879405632282477],[-117.24372157109578,32.879419375230796],[-117.24372153393352,32.879433115474029],[-117.24372150107615,32.879446858387965],[-117.24372146394445,32.879460601336262],[-117.24372143319363,32.879474341527946],[-117.24372139923707,32.879488081745464],[-117.24372136961588,32.879501827338558],[-117.24372133565932,32.879515567556069],[-117.24372130814474,32.87952931042696],[-117.24372127742443,32.87954305332363],[-117.24372125094781,32.879556793480987],[-117.24372122343317,32.879570536351842],[-117.24372119591854,32.87958427922274],[-117.2437211726476,32.879598019354255],[-117.24372114833869,32.879611762199367],[-117.24372112402972,32.879625505044515],[-117.24372110078934,32.879639247880995],[-117.24372107965559,32.879652987995328],[-117.24372105962091,32.879666730806029],[-117.24372103851762,32.879680473625328],[-117.2437210205896,32.879694213713869],[-117.24372100376057,32.879707956498784],[-117.24372098586304,32.879721699292304],[-117.24372096903403,32.879735442077212],[-117.24372095431168,32.879749182139946],[-117.24372094068836,32.879762924899062],[-117.24372092599657,32.879776667666732],[-117.24372091554842,32.879790407695104],[-117.2437209040623,32.879804150437025],[-117.24372089364473,32.879817893170326],[-117.24372088215861,32.87983163591224],[-117.24372087491625,32.879845375914783],[-117.24372086770438,32.879859118622349],[-117.24372085942395,32.879872861338441],[-117.24372085541788,32.8798866040202],[-117.2437208513506,32.879900341291908],[-117.24372084310073,32.879914086713057],[-117.24372084230032,32.879927829368995],[-117.24372083829422,32.879941572050733],[-117.24372083643543,32.879955315616911],[-117.24372083880004,32.879969054640426],[-117.24372083800984,32.879982798197993],[-117.24372083934658,32.879996540836729],[-117.24372084172137,32.880010280761887],[-117.2437208441267,32.880024023392018],[-117.24372084973776,32.880037765996391],[-117.24372085428026,32.880051508609306],[-117.24372086309708,32.880065251187858],[-117.24372086550242,32.880078993817975],[-117.2437208742887,32.880092733691569],[-117.2437208831055,32.880106476270086],[-117.24372089195286,32.880120221553646],[-117.24372090287625,32.88013396140996],[-117.24372091489883,32.880147703962741],[-117.24372092689087,32.880161443810486],[-117.24372093891344,32.880175186363239],[-117.24372095414171,32.880188928890199],[-117.24372096937003,32.880202671417159],[-117.24372098459834,32.880216413944112],[-117.24372100300185,32.880230153740285],[-117.24372101823019,32.880243896267224],[-117.24372103666428,32.880257638768335],[-117.24372105830409,32.880271381243709],[-117.2437210767382,32.880285123744883],[-117.243721098378,32.880298866220258],[-117.24372112319305,32.880312605964825],[-117.24372114483286,32.880326348440171],[-117.24372116970906,32.880340093594768],[-117.24372119452408,32.880353833339328],[-117.24372121936972,32.88036757578891],[-117.24372124742109,32.880381318212663],[-117.2437212754419,32.880395057931423],[-117.24372130456186,32.880408800346572],[-117.24372133261326,32.880422542770383],[-117.24372136387041,32.880436285168379],[-117.24372139509704,32.880450024861332],[-117.24372142959054,32.880463769938473],[-117.24372146084768,32.880477512336441],[-117.24372149634863,32.880491251995039],[-117.24372153081164,32.880504994367243],[-117.24372156848035,32.880518736713597],[-117.24372160294331,32.880532479085772],[-117.24372164168061,32.8805462214236],[-117.24372167934936,32.880559963769926],[-117.24372171702831,32.880573707017959],[-117.24372176217717,32.880587449304173],[-117.24372180302115,32.880601188919776],[-117.2437218438957,32.880614931240345],[-117.24372188904459,32.880628673526537],[-117.24372193312496,32.880642415821342],[-117.24372197720528,32.880656158116132],[-117.24372202556,32.880669900376532],[-117.24372207284614,32.880683642645508],[-117.24372211799511,32.880697384931665],[-117.243722168487,32.880711127174884],[-117.24372221894838,32.880724866713081],[-117.24372227050894,32.880738608947688],[-117.24372232100086,32.880752351190864],[-117.24372237256144,32.88076609342545],[-117.2437224262592,32.880779835642848],[-117.24372248102559,32.880793577851676],[-117.24372253472335,32.880807320069046],[-117.24372259269552,32.880821062252089],[-117.24372265066769,32.880834804435104],[-117.24372270754074,32.880848543921672],[-117.24372276551297,32.880862286104644],[-117.24372282562234,32.880876028270471],[-117.24372288680037,32.880889770427672],[-117.2437229469098,32.880903512593463],[-117.24372301129364,32.880917254724892],[-117.24372307567745,32.880930996856321],[-117.24372313899268,32.88094473899632],[-117.24372199285128,32.881131649144017],[-117.24370826644991,32.88282210804492],[-117.24368350626068,32.886010564526138],[-117.24368162452116,32.886128296614928],[-117.24367677093464,32.88625258847398],[-117.24367583015155,32.886265242160263],[-117.24367575214806,32.886266284307041],[-117.2436752040372,32.886280017835688],[-117.24367463562174,32.886293751527589],[-117.24367404475426,32.886307484498289],[-117.24367343786689,32.886321218499504],[-117.24367281064441,32.886334949959043],[-117.24367216846049,32.886348681538834],[-117.24367149951934,32.886362409726843],[-117.24367081352021,32.886376141658928],[-117.24367010504859,32.886389871066527],[-117.24366938057747,32.886403603307969],[-117.24366863676848,32.886417326687472],[-117.24366787376418,32.886431053828254],[-117.24366709044503,32.886444780230647],[-117.24366628786946,32.886458504984411],[-117.2436654649586,32.886472227196393],[-117.24366462393128,32.886485954062792],[-117.24366376254831,32.886499676584123],[-117.24366287764443,32.886513398392829],[-117.24366198096469,32.886527118492694],[-117.24366106076404,32.886540837879956],[-117.24366011813153,32.886554558349303],[-117.24365916584003,32.886568275289314],[-117.24365818684198,32.88658199334585],[-117.24365718859762,32.886595710655364],[-117.24365617109677,32.88660942631617],[-117.24365513325034,32.886623138533622],[-117.24365407937375,32.886636850879924],[-117.24365300306519,32.886650564308383],[-117.24365190747967,32.886664274284769],[-117.24365079158932,32.886677984424452],[-117.24364965967894,32.886691695594635],[-117.24364850525508,32.886705400633652],[-117.24364733055691,32.886719108540902],[-117.24364613979792,32.886732813872023],[-117.24364492977215,32.886746516652806],[-117.24364369731434,32.886760220515662],[-117.2436424445109,32.886773920935177],[-117.24364117567713,32.886787621483535],[-117.24363988437058,32.886801319507299],[-117.24363857596506,32.88681501766856],[-117.24363724508672,32.886828713305249],[-117.24363657626827,32.886835545821008],[-117.24363560795031,32.886849263791284],[-117.24363459257029,32.886862978533053],[-117.24363353227564,32.886876690930634],[-117.24363242387058,32.886890401911614],[-117.243631269472,32.886904109655383],[-117.24363006909006,32.886917815063597],[-117.24362882269421,32.886931515431357],[-117.24362752817758,32.886945213480715],[-117.24362618767763,32.886958909194561],[-117.24362480119416,32.886972602572897],[-117.24362336549075,32.886986290936498],[-117.24362188807852,32.886999976930156],[-117.24362036251492,32.887013657900503],[-117.24361878989916,32.88702733654393],[-117.24361716912176,32.887041009262312],[-117.24361550557698,32.887054680521047],[-117.24361379707649,32.887068345829022],[-117.2436120350813,32.887082006156525],[-117.24361023245594,32.887095665007273],[-117.24360837953157,32.887109317950134],[-117.24360648166159,32.88712296584383],[-117.24360454101391,32.887136611376263],[-117.24360255108492,32.88715024648387],[-117.24360051309596,32.887163884683169],[-117.24359843223758,32.88717751240609],[-117.24359630645392,32.887191136883217],[-117.24359413039141,32.887204757255866],[-117.24359190937304,32.887218371677598],[-117.24358964338856,32.887231979246877],[-117.24358733028029,32.887245578177556],[-117.24358496908135,32.88725917749484],[-117.24358256504343,32.887272769040713],[-117.24358010964768,32.887286355589055],[-117.24357761461886,32.887299934340184],[-117.24357507357554,32.887313508050774],[-117.24357248437019,32.887327075836318],[-117.24356984912991,32.887340636777971],[-117.24356716465888,32.887354191803041],[-117.2435644373487,32.887367739056835],[-117.24356166507215,32.88738127945809],[-117.24355884463347,32.887394813934229],[-117.24355598030732,32.887408342450954],[-117.24355307101474,32.887421864115154],[-117.24355011250148,32.887435380764501],[-117.24354710894035,32.887448883347986],[-117.24354406151198,32.8874623817753],[-117.24354096695947,32.887475871563993],[-117.24353782535401,32.887489359025643],[-117.24353464194735,32.887502836002234],[-117.2435314092893,32.88751630525902],[-117.24352813054514,32.887529763163492],[-117.24352480686494,32.887543216920413],[-117.24352144033513,32.887556662004236],[-117.24351802562261,32.887570099359685],[-117.24351456803997,32.887583526238622],[-117.24351106123643,32.887596948102725],[-117.24350751156281,32.887610359490417],[-117.24350391370633,32.887623763149584],[-117.24350027296964,32.88763715543066],[-117.24349658301182,32.887650542696903],[-117.24349282663297,32.887664010752538],[-117.24347694609425,32.887719018837089],[-117.24346049557676,32.887773905256807],[-117.24342588664719,32.887883304968774],[-117.24341688132905,32.887910574096409],[-117.24340773347471,32.88793780920097],[-117.24336482379692,32.888059938876566],[-117.24331906808067,32.888181331239018],[-117.24329782338931,32.888235034302205],[-117.24328699250924,32.888261828443945],[-117.24325366449871,32.888341966891481],[-117.24317106799225,32.888527470235552],[-117.24313361341959,32.888606300913466],[-117.24310796342165,32.888658620895214],[-117.24302776702892,32.888814415684394],[-117.24294274548907,32.888968378061108],[-117.24285295851681,32.889120402932782],[-117.24285256815978,32.889121043605144],[-117.24284940886761,32.889125024056298],[-117.24284547949968,32.889128482269811],[-117.24284089641073,32.88913131090446],[-117.24283580187905,32.889133426758043],[-117.24283034905292,32.889134762772393],[-117.24282470422044,32.889135279738078],[-117.24281903928789,32.889134962747725],[-117.24281352427863,32.889133819452844],[-117.24280832954166,32.889131886358385],[-117.24204772031749,32.890299126420039],[-117.24200526041763,32.890362273134606],[-117.24197790421385,32.890400540194769],[-117.24196790617783,32.890414525408417],[-117.24196081855168,32.89042444111486],[-117.24196031310555,32.890424449680815],[-117.24106581923854,32.89043909390967],[-117.24107289624705,32.89070656330167],[-117.2411566593003,32.890890475762561],[-117.2415293965127,32.890887970824522],[-117.24153033271251,32.890887964214691],[-117.24151738644274,32.89089860050732],[-117.24144890089897,32.890954867191752],[-117.24141265765225,32.890984645125521],[-117.24140356860482,32.890991386470148],[-117.24132413395786,32.891050300985178],[-117.24128929554234,32.891076139597615],[-117.24128453247666,32.891079324003925],[-117.24116056650691,32.891162211493757],[-117.24040467291711,32.891641661598847],[-117.24039551338694,32.891646522386402],[-117.24038552747044,32.891650037173825],[-117.24037498876294,32.891652109084774],[-117.24036418948478,32.89165268167244],[-117.24035342656794,32.891651737227434],[-117.24034299745178,32.891649303123806],[-117.24033319040383,32.891645446486244],[-117.2403242738224,32.891640273373731],[-117.24031649621611,32.891633926976539],[-117.24020105479079,32.891527984950955],[-117.24007961383282,32.891426930567953],[-117.23995246461504,32.891331003145147],[-117.23981991008056,32.891240434692953],[-117.2396822679268,32.891155439069173],[-117.2395398675113,32.891076221923313],[-117.2393930475927,32.891002969893883],[-117.23924215964834,32.890935860500875],[-117.23908917981883,32.890875648907517],[-117.23893292796002,32.890821751199582],[-117.23877376884428,32.890774292494172],[-117.23861207563867,32.890733384316398],[-117.23574983732121,32.890124455333051],[-117.23572091314792,32.890118219617435],[-117.23559020358077,32.89008797601722],[-117.23546057570327,32.890054581964428],[-117.23533213566266,32.890018066373905],[-117.23515928745412,32.889963621744833],[-117.23498887874287,32.889903953445206],[-117.23482113167302,32.889839139970583],[-117.23465626310373,32.889769265270147],[-117.23449448783515,32.889694420524179],[-117.23433601752949,32.88961470325134],[-117.23418105641605,32.889530215538919],[-117.23402980776375,32.889441069401819],[-117.23271795159623,32.888654434111594],[-117.23270500322309,32.888646099428975],[-117.23269202315448,32.888637797460014],[-117.23267901140055,32.888629529106289],[-117.23266597011867,32.888621296154227],[-117.23265290035756,32.888613096791858],[-117.23263980107858,32.8886049337328],[-117.2326266668679,32.888596800707774],[-117.23261350637569,32.888588706665509],[-117.23260031736382,32.888580642606279],[-117.23258709675719,32.888572620277287],[-117.23257384657227,32.888564628841472],[-117.23256056362315,32.888556670127727],[-117.23254725972578,32.888548749452511],[-117.2325339187794,32.888540860631608],[-117.23252055047267,32.888533009900165],[-117.23250715901987,32.888525191814317],[-117.23249373485324,32.888517410958684],[-117.23248027902123,32.888509665521617],[-117.2324668011118,32.888501952721484],[-117.23245329047845,32.888494276249958],[-117.2324397513958,32.888486636073054],[-117.23242618599122,32.888479031272134],[-117.23241259213735,32.888471462765779],[-117.23239896875546,32.888463929660837],[-117.23238532011024,32.888456431021652],[-117.23237164302574,32.888448969578768],[-117.23235793643337,32.888441545340513],[-117.23234420455742,32.888434153764706],[-117.23233044745838,32.888426800261271],[-117.23231666085134,32.888419483962544],[-117.23230284792227,32.888412203039692],[-117.23228900757223,32.888404954796187],[-117.23227513990199,32.888397748248671],[-117.23226124802684,32.888390575256722],[-117.23224732982959,32.888383437640577],[-117.23223338322326,32.888376339925593],[-117.23221941028471,32.888369276684706],[-117.23220541531889,32.888362250588997],[-117.23219139085511,32.888355262599632],[-117.23217734113791,32.888348309977523],[-117.23216326617722,32.888341393624351],[-117.23214916490447,32.888334513548621],[-117.23213503841848,32.888327672446863],[-117.23212088991525,32.888320869391833],[-117.23213121495324,32.888303315974376],[-117.2306293188316,32.887370493426502],[-117.23056048000741,32.887345195601362],[-117.23054712398488,32.88737437121226],[-117.23049333635416,32.887366123189871],[-117.23039375414626,32.887350851356565],[-117.23024642121415,32.886991962342201],[-117.22989294952365,32.886843596821464],[-117.22948425905656,32.886875054397137],[-117.22897870593479,32.886341531686746],[-117.22895582667941,32.886244099696327],[-117.22893985249576,32.886145693217742],[-117.22893167673385,32.886060517615881],[-117.22892867636538,32.885975099924785],[-117.22892992656639,32.88588287824188],[-117.22892456668427,32.885790761224769],[-117.22891261652185,32.88569908596935],[-117.22889411938195,32.885608188482614],[-117.22886914309521,32.885518400067475],[-117.22883778004993,32.88543005002785],[-117.22878683979044,32.885299230356019],[-117.22873593285665,32.885171392478391],[-117.22877031386859,32.885084632673461],[-117.22887564647202,32.885021168358612],[-117.22883713545335,32.885005296073835],[-117.22880181669494,32.884984807695709],[-117.22877046466604,32.884960150671454],[-117.22874376186506,32.884931863352087],[-117.22872229335576,32.884900564214064],[-117.22870652735129,32.884866935781396],[-117.22869680762405,32.884831714766328],[-117.22866813552528,32.884796154204551],[-117.22864976681171,32.884733669723708],[-117.2286486633724,32.88363217876644],[-117.22870324137756,32.883161049714467],[-117.22875155523921,32.883074364408763],[-117.22879340483405,32.882985318113334],[-117.22882862940406,32.882894252968768],[-117.22885709288168,32.882801520838463],[-117.22887868702539,32.882707476971397],[-117.22889332719474,32.882612484544403],[-117.2289009587016,32.882516909201001],[-117.22891607653712,32.882165096230054],[-117.22890101946106,32.882152402585099],[-117.22888860132832,32.88213781690694],[-117.22887914812237,32.882121726168855],[-117.22887291143512,32.882104554904956],[-117.2288700566219,32.882086757188183],[-117.22887065839706,32.882068804942683],[-117.22887470173207,32.882051172606388],[-117.22888207746125,32.882034326345476],[-117.22889259282751,32.882018711346063],[-117.22890596923473,32.882004741913043],[-117.22894836500734,32.881567998169999],[-117.22880845526691,32.881618924460462],[-117.22881127932999,32.881538578940287],[-117.22881357609208,32.88147327513655],[-117.22881335823935,32.881432082335543],[-117.22880918926154,32.880641936645681],[-117.22880770226347,32.880360166782928],[-117.22888576994509,32.879269722538346],[-117.22892505203319,32.878721040664239],[-117.22894020655552,32.878509355313909],[-117.22916621974773,32.878129808018983],[-117.22918882246046,32.878004093925085]],[[-117.23405461517498,32.870975362665746],[-117.23414111773215,32.870971366952126],[-117.23464583307391,32.870994532427552],[-117.23480097134301,32.871149564383089],[-117.23478093655176,32.871461353786408],[-117.23478028209469,32.871471525310746],[-117.23453884569506,32.871469854198622],[-117.23413805513849,32.871453807610976],[-117.23412188719728,32.871452331282619],[-117.23410625318847,32.871448530501574],[-117.23409163315111,32.871442523180612],[-117.2340784468563,32.871434484522702],[-117.23406709768487,32.871424652983904],[-117.23405792234892,32.871413325263269],[-117.2340511810028,32.87140083203419],[-117.23404708834025,32.871387547616131],[-117.23404603736024,32.871380330279848],[-117.23404524214884,32.871187983839498],[-117.23404444800941,32.870995637389925],[-117.23405461517498,32.870975362665746]],[[-117.2438949558168,32.890037070116037],[-117.24389211799583,32.889956742644209],[-117.24265880222104,32.88999558552149],[-117.24265890820602,32.889995411534429],[-117.24298556960338,32.889495489136763],[-117.24305844994089,32.889379662755601],[-117.24312695563066,32.889261950762538],[-117.24331444909858,32.888925979922668],[-117.24341043826939,32.888755971777243],[-117.24349986183816,32.88858343282925],[-117.24358262355403,32.88840854421688],[-117.24365863894452,32.888231488786026],[-117.24372782676615,32.888052451159467],[-117.24379011651492,32.887871620381418],[-117.24379397735488,32.887862766625162],[-117.24379957629981,32.887854600451078],[-117.24380674720879,32.887847363060168],[-117.24381527871029,32.887841265357771],[-117.24382492170372,32.887836489696539],[-117.24383538918593,32.887833174548476],[-117.24384637553837,32.88783141885834],[-117.24385755535657,32.887831273035957],[-117.24386859953057,32.887832743334947],[-117.24402462395139,32.887865290426923],[-117.24793795615015,32.888681530857973],[-117.24802888218132,32.888703724414995],[-117.24811746354831,32.88873186944874],[-117.24820315322286,32.888765792738639],[-117.24828542406971,32.88880528483471],[-117.24836376886691,32.888850101860683],[-117.24843770354191,32.888899968193044],[-117.24850677143614,32.888954575524487],[-117.24857054869938,32.889013587328819],[-117.24862863895632,32.889076639805552],[-117.2486806872307,32.889143344472352],[-117.2489634731439,32.889538740895745],[-117.24905802782826,32.889670948394475],[-117.24894408785461,32.890009183081581],[-117.24980936461186,32.891237825048293],[-117.24983141112483,32.891492389845141],[-117.24850657277642,32.890800022346525],[-117.24569964030216,32.890087447599441],[-117.24400917456607,32.890040259804614],[-117.2438949558168,32.890037070116037]],[[-117.24120953958146,32.892829932898948],[-117.2411789151104,32.892250427496322],[-117.24117805660765,32.892228589532444],[-117.24117765114342,32.892206738917515],[-117.24117769775022,32.892184884676752],[-117.2411781975981,32.892163035818193],[-117.24117915075787,32.892141198653597],[-117.24118055301514,32.892119378627193],[-117.24118240546883,32.892097578435326],[-117.24118471152805,32.892075816085715],[-117.24118746685657,32.892054086202549],[-117.24119067267506,32.892032402302263],[-117.24119432796543,32.892010768901642],[-117.24119842422833,32.891989190577696],[-117.24120296798752,32.891967677197179],[-117.24120795823491,32.89194623417864],[-117.24121339183517,32.891924867859423],[-117.24121926673179,32.891903585469919],[-117.2412249052587,32.891884660342278],[-117.241225579759,32.891882390642522],[-117.24123233316564,32.891861293278239],[-117.24123951740408,32.891840299765825],[-117.24124713999574,32.891819413651994],[-117.24125519035474,32.891798644038936],[-117.24126366960031,32.891777995426402],[-117.24127257566585,32.89175747414307],[-117.24128190439821,32.891737091043069],[-117.24129165469789,32.891716843430061],[-117.24130182351084,32.891696744854535],[-117.24131240443481,32.8916767962695],[-117.24132339870083,32.891657012092971],[-117.2413347945527,32.891637392419099],[-117.24134660270798,32.891617939867118],[-117.24135880728804,32.891598668090452],[-117.24137141146842,32.891579574358332],[-117.24138440576256,32.891560670469296],[-117.24139778921334,32.891541966350331],[-117.24141155959171,32.891523453903368],[-117.2414257138946,32.89150515118726],[-117.24144023823877,32.891487059215116],[-117.2414551391075,32.891469184247022],[-117.24147040479561,32.891451530885448],[-117.24148603431551,32.891434106352179],[-117.24150202555015,32.891416912467577],[-117.24152247434505,32.891395790870995],[-117.24187240742786,32.891041242306066],[-117.24208037040982,32.890830536001481],[-117.24290729931816,32.890732750500511],[-117.24290853544652,32.890745017872433],[-117.24295510290915,32.891819010130021],[-117.24298208312891,32.892441180035931],[-117.24276853457825,32.892447768776776],[-117.24223824298893,32.892820127599919],[-117.2422361536334,32.892818061336889],[-117.24223402928442,32.892816019702053],[-117.24223186673575,32.892814002721039],[-117.24222966819603,32.89281201668841],[-117.24222743684105,32.89281005887343],[-117.24222516731682,32.8928081284173],[-117.24222286499763,32.892806227982192],[-117.24222052775619,32.892804358486757],[-117.24221815769938,32.892802517208956],[-117.24221575594684,32.892800708648636],[-117.24221331926182,32.892798930126332],[-117.24221084980219,32.892797183428307],[-117.24220835077405,32.892795468528917],[-117.24220582323609,32.892793784517679],[-117.24220326401249,32.892792134125614],[-117.24220067524082,32.892790517335293],[-117.24219805797958,32.892788933236659],[-117.24219541119059,32.892787384543205],[-117.24219273909783,32.892785866712288],[-117.24219003748753,32.892784385188207],[-117.2421873106243,32.89278293903503],[-117.24218455848793,32.892781526449355],[-117.24218178007065,32.892780152849816],[-117.24217897637,32.892778811916124],[-117.24217615063284,32.892777507229205],[-117.24217330181079,32.892776240601044],[-117.24217043099301,32.892775013826238],[-117.24216753698852,32.892773816093566],[-117.24216462205702,32.892772658205679],[-117.24216168620855,32.892771541064377],[-117.24215872938214,32.892770459259587],[-117.24215575587304,32.892769414560313],[-117.24215276465327,32.892768410581887],[-117.24214975249616,32.89276744554661],[-117.24214672580402,32.892766518501354],[-117.24214367921283,32.892765627685748],[-117.24214062026472,32.892764778449731],[-117.24213754571279,32.892763967212289],[-117.24213445559774,32.892763197580145],[-117.24213135523273,32.892762466805316],[-117.24212823926386,32.892761774029189],[-117.24212511100933,32.892761129144262],[-117.24212197347184,32.892760514091421],[-117.24211882362819,32.892759945126549],[-117.24211566354477,32.892759415920615],[-117.24211249533857,32.8927589246533],[-117.24210931693329,32.892758476751681],[-117.24210613256309,32.892758068574807],[-117.24210294223818,32.892757701024301],[-117.24209974279293,32.892757377732615],[-117.2420965405687,32.892757092336595],[-117.24209333241001,32.892756849370251],[-117.24209011719734,32.892756644333922],[-117.24208690357202,32.892756485273871],[-117.24208368718797,32.892756365912867],[-117.24208046698661,32.892756287161056],[-117.24207724511555,32.892756249902995],[-117.24207402267412,32.892756256835121],[-117.24207080169796,32.892756298923537],[-117.24206758659425,32.892756387855663],[-117.24206436658412,32.892756515602258],[-117.2420611491691,32.892756683906605],[-117.24205793970289,32.892756893627478],[-117.24205473073505,32.892757147529899],[-117.24205152861677,32.892757440152486],[-117.24204833229976,32.892757773307054],[-117.24204514073556,32.892758148805584],[-117.24204195923737,32.892758563900081],[-117.24203878142328,32.89275902134716],[-117.24203561796024,32.892759519257595],[-117.24203246030862,32.892760058601716],[-117.24202931057528,32.892760636657378],[-117.24202617626182,32.892761255167855],[-117.24202304989717,32.892761915094837],[-117.24201993679452,32.892762613690479],[-117.24201683697414,32.892763352758088],[-117.2420137514947,32.892764131387409],[-117.24201067821868,32.892764949595652],[-117.24200762248967,32.892765807339842],[-117.24200458321869,32.89276670282527],[-117.24200155830896,32.892767639675824],[-117.24199855197429,32.89276861244705],[-117.24199555999066,32.892769625681709],[-117.24199259088759,32.892770677507812],[-117.24199190641767,32.892770924670621],[-117.24199122518446,32.892771174512632],[-117.24199054399196,32.892771427961385],[-117.24198986281976,32.892771683213411],[-117.24198918379516,32.892771939349942],[-117.24198850585967,32.892772197281232],[-117.24198782795465,32.892772457917523],[-117.24198715009035,32.892772722160466],[-117.2419864753915,32.892772982771021],[-117.24198580076384,32.892773249693249],[-117.24198512937292,32.892773519294714],[-117.24198445904054,32.892773787985888],[-117.24198378768008,32.892774060292382],[-117.24198311955635,32.892774335278119],[-117.24198245465915,32.892774612041428],[-117.24198178335966,32.892774889757831],[-117.24198111526641,32.892775167448569],[-117.24198045047089,32.892775453228538],[-117.24197978885098,32.892775736277756],[-117.2419791251445,32.892776023852477],[-117.24197846355516,32.892776309606681],[-117.24197780523298,32.892776600745222],[-117.24197714691083,32.892776891883678],[-117.24197648968783,32.892777185718529],[-117.24197583142671,32.892777482267029],[-117.24197517641237,32.892777782396429],[-117.2419745245941,32.892778081598415],[-117.24197387066887,32.89277838352259],[-117.24197321888109,32.892778685429569],[-117.24197256715429,32.892778992746543],[-117.24197191971264,32.892779300930897],[-117.24197127119201,32.892779608222106],[-117.24197062700736,32.892779920889048],[-117.24196998176413,32.892780234466208],[-117.24196933761002,32.892780549838122],[-117.24196869560342,32.892780866094526],[-117.241968054686,32.892781184145697],[-117.2419674159466,32.892781505786424],[-117.24196677509018,32.892781829247511],[-117.24196613958752,32.892782153567481],[-117.24196550517392,32.892782479682168],[-117.24196486973231,32.892782809412097],[-117.24196423535938,32.892783139133449],[-117.24196360421301,32.892783470632438],[-117.24196297524476,32.892783805720832],[-117.24196234734521,32.892784140800721],[-117.24196171947618,32.892784478585618],[-117.24196109377515,32.892784819058313],[-117.2419604691631,32.892785161325726],[-117.24195984459179,32.892785507199875],[-117.24195922316568,32.892785847638237],[-117.24195860393799,32.892786193469462],[-117.24195798584,32.892786544702133],[-117.24195736774207,32.892786895934755],[-117.2419567528503,32.892787247141634],[-117.24195613802975,32.892787604660185],[-117.24195552637465,32.892787958546343],[-117.24195491478058,32.892788317842516],[-117.24195430318653,32.892788677138661],[-117.24195369482919,32.892789039114028],[-117.24195308971866,32.892789404670367],[-117.24195248459796,32.892789769325049],[-117.24195187947727,32.892790133979751],[-117.24195127441759,32.892790504044385],[-117.24195067578047,32.89279087495926],[-117.24195007713317,32.892791244972415],[-117.24194947855705,32.89279162129727],[-117.2419488832075,32.892791999399741],[-117.24194828780702,32.892792372993817],[-117.24194769355668,32.892792753792698],[-117.24194710466014,32.892793135450333],[-117.2419465157534,32.892793516206282],[-117.24194592688737,32.892793900568904],[-117.24194533915106,32.892794290332958],[-117.2419447535115,32.892794676473187],[-117.24194417111886,32.892795066194353],[-117.2419435898254,32.892795458611872],[-117.24194301066947,32.892795851012316],[-117.2419424326432,32.892796248814079],[-117.24194185350757,32.892796643017881],[-117.2419412808555,32.892797043481778],[-117.24194070603542,32.892797441257855],[-117.24194013341383,32.892797844426809],[-117.24193956506718,32.892798247561366],[-117.2419389956823,32.892798653409592],[-117.2419384305723,32.892799059223442],[-117.24193786549283,32.892799467742307],[-117.24193729937511,32.892799878974763],[-117.24193674073854,32.89280029014715],[-117.24193617889574,32.892800701345251],[-117.24193562249835,32.892801121517138],[-117.24193506392274,32.892801538099498],[-117.2419345118205,32.89280196004043],[-117.24193395645111,32.892802376597075],[-117.24193340649656,32.892802799422483],[-117.2419328576005,32.892803221337651],[-117.24193230552881,32.89280364598357],[-117.24193176311637,32.892804074158967],[-117.24193122069371,32.892804501432586],[-117.24193067831179,32.892804932312991],[-117.24193013595014,32.892805364996633],[-117.24192959683539,32.892805801261275],[-117.24192906085564,32.892806231188452],[-117.24192852494706,32.89280666742733],[-117.24192799226505,32.892807105443808],[-117.24192745962365,32.892807547066951],[-117.24192693017829,32.892807987762687],[-117.24192640394929,32.892808429334337],[-117.24192587775079,32.892808873610967],[-117.24192534943516,32.892809319708135],[-117.24192483609193,32.892809766586886],[-117.24192430995446,32.892810216273524],[-117.24192379343555,32.892810665882955],[-117.24192327801588,32.892811118188853],[-117.24192276154771,32.892811572306584],[-117.24192224829604,32.892812027300302],[-117.24192173931922,32.892812482259664],[-117.24192122933468,32.892812942637661],[-117.24192072359457,32.892813400276346],[-117.24192021684672,32.892813863333537],[-117.24191971751902,32.892814320920728],[-117.24191921083217,32.89281478938792],[-117.24191871159594,32.892815255090113],[-117.24191821449718,32.892815720775111],[-117.24191771849763,32.892816189156576],[-117.24191722574494,32.892816661118943],[-117.24191673511957,32.892817132162506],[-117.24191624556292,32.892817603197415],[-117.24191575927351,32.892818079616653],[-117.24191527295355,32.892818553330862],[-117.24191478881167,32.892819030634627],[-117.24191314266868,32.8928206291206],[-117.24191147274911,32.892822204351887],[-117.24190976723594,32.892823751012948],[-117.24190803156428,32.892825277175795],[-117.24190626244666,32.892826775652907],[-117.24190446846347,32.892828249080615],[-117.24190264104446,32.892829695724195],[-117.24190078342636,32.892831118262954],[-117.24189889981287,32.892832510350864],[-117.24189698705884,32.892833877423683],[-117.2418950440549,32.89283521588338],[-117.24189308148829,32.892836525644086],[-117.24189108869211,32.892837808594912],[-117.24188906988027,32.892839059291624],[-117.24188702834029,32.89284028492176],[-117.24188495970571,32.89284147740463],[-117.24188286833282,32.892842643919252],[-117.24188075092394,32.892843776376402],[-117.24187861287355,32.892844879241508],[-117.24187645524022,32.892845951604301],[-117.24187427159117,32.892846991712887],[-117.24187207053743,32.892848004908721],[-117.24186984659281,32.892848978611255],[-117.24186760629179,32.892849923589154],[-117.24186534639773,32.892850837163024],[-117.24186306903785,32.892851718414086],[-117.24186077201371,32.892852561949546],[-117.24185845864334,32.892853377661972],[-117.24185612776648,32.892854157444987],[-117.24185378366832,32.892854902165759],[-117.24185142426218,32.892855616350019],[-117.24184905376198,32.892856294553262],[-117.24184666576554,32.892856937728752],[-117.24184426563677,32.892857547636865],[-117.24184185442414,32.892858122465732],[-117.2418394331862,32.892858661305027],[-117.24183699555127,32.892859167812958],[-117.24183455750965,32.892859638254201],[-117.24183209982408,32.892860072783115],[-117.24182964173185,32.892860471245314],[-117.24182717255579,32.892860834628237],[-117.24182469763947,32.892861162889005],[-117.24182221483538,32.892861455143077],[-117.24181972518173,32.892861708676932],[-117.24181723625111,32.892861931545482],[-117.24181473938185,32.892862113899021],[-117.24181223893024,32.892862262916559],[-117.24180973487594,32.892862376794803],[-117.24127752799747,32.892882395930329],[-117.24127454764403,32.892882450495861],[-117.24127291854803,32.892882432903718],[-117.241271292262,32.892882380120852],[-117.24126966666873,32.892882293967723],[-117.24126804599241,32.892882169901746],[-117.24126642497058,32.89288201517904],[-117.24126480995476,32.892881824338232],[-117.24126320739795,32.892881600934544],[-117.24126160550342,32.892881341455542],[-117.24126001609845,32.892881052118689],[-117.2412584316307,32.89288072667226],[-117.24125686069073,32.89288036865441],[-117.24125529899347,32.89287997719773],[-117.241253749745,32.892879552276405],[-117.24125221402436,32.892879094783744],[-117.24125068971433,32.892878606540052],[-117.24124918213829,32.892878085699166],[-117.24124769024779,32.892877534073008],[-117.24124621829748,32.892876949823972],[-117.24124476203275,32.89287633478969],[-117.24124332359102,32.892875688952927],[-117.24124190621922,32.892875015894766],[-117.24124050665007,32.892874310230809],[-117.24123913027816,32.892873576426666],[-117.24123777600421,32.892872811785743],[-117.2412364449376,32.892872019906235],[-117.24123513600966,32.892871200796698],[-117.2412338524468,32.892870356234774],[-117.24123259418812,32.89286948081044],[-117.24123135916733,32.892868580852458],[-117.2412301602091,32.892867656258083],[-117.24122898340985,32.892866706236973],[-117.24122783519213,32.89286573163939],[-117.24122671982069,32.892864731529372],[-117.24122562985501,32.892863709573646],[-117.24122456850134,32.892862665746492],[-117.24122354323056,32.892861599086139],[-117.24122254764058,32.892860510545837],[-117.24122158710541,32.892859402787607],[-117.24122065840878,32.892858274935527],[-117.24121976259904,32.892857125177727],[-117.24121889972706,32.89285595802253],[-117.24121807514655,32.892854774328725],[-117.24121728244528,32.892853574147729],[-117.24121652910421,32.892852357419613],[-117.24121580870091,32.892851123294051],[-117.24121512661962,32.892849875334875],[-117.24121448392906,32.89284861353358],[-117.24121387635434,32.892847337924351],[-117.24121330498448,32.892846050302055],[-117.2412127751733,32.892844751525431],[-117.24121228158737,32.892843442539025],[-117.24121183060851,32.892842120586394],[-117.24121141484704,32.892840793842566],[-117.24121104171306,32.892839455935849],[-117.2412107069823,32.892838111408864],[-117.24121041171347,32.892836759351418],[-117.24121015487839,32.892835403378669],[-117.24120994070117,32.892834038948031],[-117.24120976606716,32.892832674200271],[-117.24120961381551,32.892831303862494],[-117.24120953958146,32.892829932898948]],[[-117.2412500239148,32.893499684609822],[-117.24124974003743,32.893497067308402],[-117.24124945612957,32.893494447302039],[-117.24124917542791,32.893491827269898],[-117.24124889901142,32.893489208105152],[-117.24124861830981,32.893486588073038],[-117.24124834722691,32.893483967963775],[-117.24124807724321,32.893481350550928],[-117.24124780617049,32.893478731343322],[-117.24124753933215,32.893476108494752],[-117.24124727145551,32.893473488359788],[-117.24124700785383,32.893470868190491],[-117.24124674638969,32.893468248004034],[-117.24124648920053,32.893465627783357],[-117.24124623199111,32.893463005759294],[-117.2412459769394,32.893460385521408],[-117.24124572295651,32.893457765274981],[-117.24124547214937,32.893455142297803],[-117.24124522457896,32.893452521999961],[-117.24124497591949,32.893449899907331],[-117.24124473152479,32.893447276878746],[-117.2412444903669,32.893444656529439],[-117.24124425238475,32.893442033449404],[-117.24124401440254,32.893439410369382],[-117.2412437764204,32.893436787289389],[-117.24124354489135,32.893434167764575],[-117.24124331332165,32.893431544633074],[-117.24124308175202,32.893428921501666],[-117.24124285659481,32.893426298318765],[-117.24124263143761,32.893423675135836],[-117.24124240628042,32.893421051952991],[-117.24124218539821,32.893418428735771],[-117.24124196666365,32.893415806403105],[-117.24124175112517,32.893413183143068],[-117.24124153558671,32.893410559883002],[-117.24124132429274,32.893407933883651],[-117.24124111516674,32.893405310572184],[-117.24124090604072,32.893402687260689],[-117.24124070119991,32.89340006481661],[-117.24124049524971,32.8933974387744],[-117.24124029360489,32.893394815402893],[-117.24124009406717,32.893392189309267],[-117.24123989562865,32.893389565912052],[-117.24123970250336,32.893386939766962],[-117.24123950724058,32.893384313639054],[-117.241239317352,32.893381690173278],[-117.24123912854235,32.893379067600577],[-117.24123894289831,32.893376441395503],[-117.24123875618552,32.893373815198991],[-117.24123857377816,32.893371191673197],[-117.24123839454656,32.893368565416672],[-117.24123821531499,32.893365939160169],[-117.24123803928964,32.893363312877938],[-117.24123786540174,32.893360686578546],[-117.24123769262327,32.893358063877294],[-117.24123752297992,32.893355434838604],[-117.2412373566037,32.893352811184258],[-117.24123719019708,32.893350184824847],[-117.24123702699669,32.89334755843975],[-117.24123686379627,32.893344932054639],[-117.24123670700828,32.893342305618098],[-117.24123655128906,32.893339679172996],[-117.24123639450113,32.893337052736477],[-117.24123624088898,32.893334423569186],[-117.24123609052363,32.893331797982896],[-117.24123594335435,32.893329171469198],[-117.24123579725385,32.893326544946966],[-117.24123565329084,32.893323918407575],[-117.24123550929734,32.893321289163175],[-117.24123536960926,32.893318662589444],[-117.24122405183876,32.893104499809681],[-117.24122398820258,32.893101982639266],[-117.2412240080473,32.89310061362638],[-117.24122407482503,32.89309923612133],[-117.24122417589382,32.893097866456991],[-117.24122432078073,32.893096496441217],[-117.2412245074094,32.893095131501049],[-117.24122472934695,32.893093769884729],[-117.24122499732148,32.893092415113152],[-117.24122530169394,32.893091065460084],[-117.24122564461209,32.893089721810099],[-117.24122603357732,32.893088385906523],[-117.24122645900151,32.893087060531464],[-117.24122691978545,32.893085742988575],[-117.24122742237196,32.8930844359313],[-117.24122796569243,32.89308313936835],[-117.24122854334449,32.893081854252721],[-117.24122916179141,32.893080585041382],[-117.24122981562857,32.893079326367086],[-117.2412305080926,32.893078080909241],[-117.24123123708665,32.893076852291557],[-117.2412320015319,32.89307563962106],[-117.24123280249709,32.893074442889038],[-117.24123363678613,32.893073263022991],[-117.24123450654659,32.893072100907368],[-117.24123541180907,32.89307095924719],[-117.24123635040556,32.893069835354616],[-117.24123732235633,32.893068731033004],[-117.24123832661306,32.89306764809411],[-117.24123935997963,32.893066587465462],[-117.24124042675136,32.893065550916127],[-117.24124152363052,32.893064530356646],[-117.2412426486423,32.893063540231033],[-117.24124380382251,32.893062571505375],[-117.24124498921181,32.893061627786309],[-117.24124620055555,32.893060710911527],[-117.24124743783344,32.893059819077713],[-117.24124870213456,32.893058954079457],[-117.24124999235958,32.893058113220526],[-117.24125130641178,32.893057300124646],[-117.24125264645913,32.893056517479693],[-117.24125400604848,32.893055761730416],[-117.24125538838609,32.893055032851144],[-117.24125679140565,32.893054337170589],[-117.24125821718361,32.893053669261661],[-117.24125966042712,32.893053033675571],[-117.24126111893771,32.893052425019476],[-117.24126259814039,32.893051850463799],[-117.24126409372973,32.893051307337842],[-117.24126560677442,32.893050795633059],[-117.24126713190033,32.893050312687294],[-117.24126867136691,32.89304986930339],[-117.24127022393264,32.893049450161577],[-117.24127178974997,32.893049068786894],[-117.24127336553136,32.893048717991732],[-117.24127494920032,32.893048403203188],[-117.24127654499111,32.893048120780293],[-117.24127814543287,32.8930478716848],[-117.2412797558692,32.893047655873787],[-117.24128136990798,32.893047475202017],[-117.24128298969686,32.893047330554047],[-117.24128461088979,32.89304721565248],[-117.24128623893208,32.893047139471122],[-117.24181844356855,32.893027117618885],[-117.24182094803422,32.893027039807158],[-117.24182345292688,32.893026999865342],[-117.24182596144252,32.893026996866084],[-117.24182846393212,32.893027028181578],[-117.24183097004482,32.89302709643961],[-117.24183347337826,32.893027202593316],[-117.24183596960668,32.8930273421687],[-117.24183847053709,32.893027519579711],[-117.24184096222513,32.893027730429559],[-117.24184345007532,32.893027980085293],[-117.24184593622523,32.893028268529818],[-117.24184841198266,32.893028583208363],[-117.24185088287425,32.893028940308106],[-117.24185334668125,32.893029332632807],[-117.24185579803961,32.893029758422109],[-117.2418582433821,32.8930302194278],[-117.24186067954315,32.893030719282315],[-117.24186310646179,32.893031252575661],[-117.24186551985291,32.893031818440392],[-117.24186792082591,32.893032420474739],[-117.241870312587,32.893033058652875],[-117.24187268868315,32.89303372941967],[-117.24187504911424,32.893034432775032],[-117.24187740034367,32.893035173175903],[-117.24187973162294,32.893035945298017],[-117.24188204725762,32.89303675181214],[-117.24188434615857,32.893037590923434],[-117.2418866304633,32.893038462614726],[-117.24188889486877,32.893039370535675],[-117.24189114035224,32.893040306562639],[-117.24189336699506,32.893041277908928],[-117.24189557367758,32.893042280074852],[-117.24189775829291,32.893043315782577],[-117.24189992400656,32.893044381399598],[-117.24190206333741,32.893045476986075],[-117.24190418698298,32.893046603357796],[-117.24190628210822,32.893047759716133],[-117.24190835731392,32.89304895050072],[-117.24191040392813,32.893050164960194],[-117.24191242847517,32.893051412961519],[-117.2419144266496,32.89305269183383],[-117.24191639941839,32.893053992552026],[-117.24191834690362,32.893055325936061],[-117.24192026798569,32.893056687486165],[-117.24192215301554,32.89305807457459],[-117.241924015907,32.893059488893151],[-117.24192584704144,32.893060930518999],[-117.24192765174226,32.893062397605881],[-117.24192818795743,32.893062841470865],[-117.24192872411155,32.893063279925784],[-117.2419292602555,32.893063717479045],[-117.24192980282203,32.893064155882541],[-117.2419303453581,32.893064591580966],[-117.24193088785353,32.893065023672762],[-117.24193143674103,32.893065453909749],[-117.24193198565899,32.893065886851765],[-117.24193253450584,32.893066313482052],[-117.24193308656902,32.89306674098831],[-117.24193363859156,32.893067164887889],[-117.24193419062428,32.893067589689153],[-117.24193474902869,32.893068010832252],[-117.24193530744338,32.893068432876973],[-117.24193586902354,32.893068851289371],[-117.24193643164193,32.893069266988164],[-117.24193699640807,32.893069683571476],[-117.24193756113344,32.893070096548058],[-117.24193812582836,32.893070506819697],[-117.24193869800439,32.893070917031253],[-117.24193926591569,32.893071328178799],[-117.24193984123693,32.893071732954645],[-117.24194041548949,32.893072137739068],[-117.24194098974205,32.893072542523448],[-117.24194156823907,32.893072944568523],[-117.24194214563678,32.893073343917173],[-117.241942727279,32.893073740526553],[-117.24194331105872,32.89307413711871],[-117.2419438959071,32.893074533702347],[-117.2419444796258,32.893074924884523],[-117.24194506761944,32.893075316032387],[-117.24194565561304,32.893075707180238],[-117.24194624568318,32.893076092900927],[-117.24194684008924,32.893076483997362],[-117.24194743437332,32.893076864273731],[-117.241948027609,32.893077246362012],[-117.24194862509924,32.893077626612673],[-117.24194922579572,32.893078006837555],[-117.2419498296578,32.893078383430066],[-117.24195042601833,32.893078758279259],[-117.24195102986005,32.893079133068468],[-117.24195163686728,32.893079504225256],[-117.24195224385424,32.893079873578614],[-117.24195285083098,32.893080242030379],[-117.24195346099361,32.893080608653086],[-117.24195407111557,32.89308097166905],[-117.24195468445394,32.893081335561028],[-117.24195529775163,32.893081695846263],[-117.24195591419455,32.893082050695845],[-117.24195653070858,32.893082411857002],[-117.24195715035771,32.893082766680827],[-117.24195776994581,32.893083116094601],[-117.24195839280111,32.89308347089262],[-117.24195901560563,32.893083821182373],[-117.24195963836948,32.893084167865403],[-117.24196026433951,32.893084514522684],[-117.241960894554,32.893084858440687],[-117.24196152687544,32.893085199636545],[-117.24196215278454,32.893085540883845],[-117.24196278504499,32.893085876669652],[-117.24196341840465,32.893086215151904],[-117.24196405704703,32.89308654818123],[-117.24196468930757,32.893086883967037],[-117.24196532471322,32.893087214317127],[-117.24196596118763,32.893087544658627],[-117.24196660614076,32.89308786861978],[-117.24196724579095,32.893088196230558],[-117.24196789072377,32.893088518388403],[-117.24196853245037,32.893088840571984],[-117.24196917841127,32.893089159114588],[-117.24196983076425,32.893089475802363],[-117.24197047563608,32.893089792550199],[-117.24197112367342,32.893090105665664],[-117.24197177596538,32.893090416943487],[-117.24197242824722,32.89309072731956],[-117.24197307944,32.893091035900937],[-117.241973734867,32.89309134084133],[-117.241974392401,32.89309164305952],[-117.24197504780771,32.893091946196556],[-117.24197570958619,32.893092245675412],[-117.24197636708968,32.893092545188622],[-117.24197702561109,32.893092840184927],[-117.24197769053477,32.893093134228081],[-117.2419783543592,32.893093425574811],[-117.2419790192524,32.893093716912958],[-117.24197968411502,32.893094005546104],[-117.24198035216361,32.893094292350156],[-117.24198102017147,32.893094575547565],[-117.24198169031681,32.893094858727792],[-117.24198236146992,32.893095136489407],[-117.24198303585972,32.893095416930336],[-117.24198370697214,32.893095691085307],[-117.24198438130094,32.893095966116228],[-117.24198505559927,32.893096238442105],[-117.24198573307326,32.893096508037246],[-117.24198641054727,32.893096777632387],[-117.2419870879603,32.893097041817576],[-117.24198776856936,32.893097305075315],[-117.24198844918857,32.893097569234747],[-117.24198913615922,32.893097827932692],[-117.24198981350109,32.893098085806145],[-117.24199050044123,32.893098341799039],[-117.24199118413449,32.893098594211061],[-117.24199187104412,32.893098847498969],[-117.24199255791311,32.893099097180226],[-117.24199324476177,32.89309934505814],[-117.24199393477599,32.89309958930361],[-117.24199462479015,32.89309983354913],[-117.24199531799022,32.893100075965584],[-117.24199601221838,32.893100314766741],[-117.2419967085535,32.893100550845773],[-117.24199739847614,32.893100786976262],[-117.24199809479096,32.893101021251915],[-117.24199879106509,32.893101251920946],[-117.24199948840788,32.893101482581343],[-117.24200018459052,32.893101705135358],[-117.24200088404029,32.893101933073631],[-117.24200158663535,32.893102155576138],[-117.24200228709293,32.893102378095804],[-117.24200299283314,32.893102595162595],[-117.24200369216095,32.89310281228083],[-117.24200439572306,32.893103025758101],[-117.24200510140227,32.893103237414856],[-117.2420058070815,32.893103449071631],[-117.24200651062327,32.893103660745496],[-117.24200721940706,32.893103863359883],[-117.24200792820098,32.893104066875885],[-117.24200863806368,32.893104270383319],[-117.24200934678645,32.893104467587634],[-117.2420100597943,32.893104665659301],[-117.24201076848661,32.893104860158608],[-117.24201148146399,32.893105055525304],[-117.24201219650767,32.893105244563174],[-117.24201290942403,32.893105434519832],[-117.24201362443721,32.893105620852701],[-117.24201434051918,32.893105807176937],[-117.24201505548153,32.893105989001441],[-117.24201577470863,32.893106169889897],[-117.24201649283653,32.893106348082],[-117.24201721200261,32.893106523560547],[-117.24201793331636,32.893106699923536],[-117.24201864924581,32.893106872722782],[-117.24201937152665,32.893107040060528],[-117.24202009276922,32.893107210111879],[-117.24202081501956,32.893107374744567],[-117.24202153617061,32.893107536680915],[-117.24202460697921,32.893108204573394],[-117.24202768590044,32.893108833625554],[-117.2420307772195,32.893109424704626],[-117.24203387875824,32.893109974221183],[-117.24203698950885,32.893110487593781],[-117.24204010514556,32.893110960348444],[-117.2420432352769,32.893111391506196],[-117.242046367139,32.893111786580093],[-117.2420495081621,32.893112141001687],[-117.24205265512987,32.8931124538951],[-117.2420558091416,32.893112727956648],[-117.24205896486376,32.893112964130992],[-117.24206212439302,32.893113158794272],[-117.24206528876773,32.893113309232952],[-117.24206845383497,32.893113426301255],[-117.24207162058205,32.893113502777339],[-117.24207478793008,32.893113537768066],[-117.24207795801654,32.893113531256375],[-117.2420811276759,32.893113486874533],[-117.24208429579873,32.893113401024593],[-117.24208746134686,32.893113276420024],[-117.24209062323106,32.893113111266175],[-117.24209378360928,32.893112907349092],[-117.242096938176,32.893112661998174],[-117.24210008799996,32.893112375204851],[-117.24210323849603,32.893112053237893],[-117.24210637460023,32.893111687200701],[-117.24210950706085,32.893111282417479],[-117.24211262947573,32.893110839841434],[-117.24211574824704,32.893110358519408],[-117.2421188569319,32.893109835797809],[-117.24212195557098,32.893109275283358],[-117.24212503987916,32.893108676108739],[-117.24212811837576,32.893108035500255],[-117.24213118255166,32.893107357133239],[-117.2421342367021,32.893106642776758],[-117.24213727755976,32.893105887046396],[-117.24214030195927,32.893105093574739],[-117.24214331523407,32.893104261417122],[-117.2421463131396,32.893103393312892],[-117.24214929350808,32.893102486574222],[-117.24215225741827,32.893101542094151],[-117.24215520380147,32.893100559881312],[-117.24215813480534,32.893099540820174],[-117.24216104507602,32.893098484052054],[-117.24216393887825,32.893097388640861],[-117.24216680883261,32.893096263663395],[-117.24216966228805,32.893095097337884],[-117.24217249293373,32.893093898732509],[-117.24217530389468,32.893092660608154],[-117.24217809095686,32.893091388409168],[-117.24218085518899,32.893090082127003],[-117.24218359658099,32.893088740859994],[-117.24218631084764,32.893087363740719],[-117.24218900551082,32.8930859543159],[-117.24219166984253,32.893084509064536],[-117.24219431136453,32.893083031533358],[-117.24219692686047,32.89308152084638],[-117.2421995130936,32.893079974324401],[-117.24220207230316,32.893078400966814],[-117.24220460441792,32.893076794462047],[-117.24220710731055,32.893075155728908],[-117.24220957773416,32.893073481186505],[-117.2422120243404,32.89307177978278],[-117.2422144353324,32.893070048005498],[-117.24221681709217,32.893068283098238],[-117.24221916752288,32.893066488684752],[-117.24222148665498,32.89306466747005],[-117.24222377231037,32.893062815864681],[-117.24222602448909,32.893060933868568],[-117.2422282410943,32.893059025105607],[-117.24223042853836,32.893057089524291],[-117.24223257933008,32.893055126283009],[-117.24223469346933,32.893053135381791],[-117.24281226138083,32.893485874433047],[-117.24303689240173,32.893478940488713],[-117.24307338226278,32.894051983344127],[-117.24207103422404,32.894043902434483],[-117.24134697793662,32.894038064831143],[-117.24130066839065,32.893817577443421],[-117.24130012402136,32.893814987480567],[-117.24129958392712,32.893812397483444],[-117.24129904275399,32.893809806593218],[-117.24129850907228,32.893807216544623],[-117.24129797435231,32.893804629209626],[-117.24129744059951,32.893802032849386],[-117.24129691012416,32.893799442775091],[-117.24129638175579,32.893796849978614],[-117.24129585768277,32.893794258951196],[-117.24129533358943,32.893791666120507],[-117.24129481163368,32.8937890732726],[-117.24129429073648,32.893786479514439],[-117.24129377305576,32.893783886632249],[-117.2412932553344,32.893781290143394],[-117.24129274409667,32.893778699914741],[-117.241292232798,32.893776104276128],[-117.24129172472587,32.893773510415102],[-117.24129121556479,32.893770914759337],[-117.24129071070911,32.893768321774218],[-117.24129021008787,32.893765725148235],[-117.24128970840806,32.893763129432465],[-117.24128920992433,32.893760532789251],[-117.24128871465702,32.893757937022002],[-117.24128821937961,32.893755340353103],[-117.24128772731862,32.893752744560139],[-117.24128723522713,32.893750146062168],[-117.24128674743099,32.893747549333263],[-117.24128626175207,32.893744950783883],[-117.24128577929973,32.893742354012041],[-117.2412852968271,32.893739755436926],[-117.24128481861931,32.893737155925834],[-117.24128433935294,32.893734557325018],[-117.24128386435144,32.893731957788212],[-117.2412833914976,32.893729359135918],[-117.24128292291877,32.89372676044934],[-117.24128245002439,32.893724158190402],[-117.24128198465185,32.893721559478102],[-117.24128151820041,32.893718959872729],[-117.2412810560037,32.893716358429671],[-117.24128059593433,32.893713756067818],[-117.24128013697434,32.893711157304075],[-117.24127968118003,32.893708554907931],[-117.24127922539584,32.893705953413487],[-117.24127877173902,32.893703351000191],[-117.24127832236738,32.893700749454275],[-117.24127787619182,32.893698146981023],[-117.24127742999598,32.8936955427044],[-117.24127699023295,32.893692940179662],[-117.24127654402697,32.893690335001345],[-117.24127610427416,32.893687733378314],[-117.24127566448074,32.89368512814859],[-117.24127523110998,32.893682523769073],[-117.2412747977595,32.893679921192877],[-117.24127436759501,32.893677316787674],[-117.24127393424463,32.893674714211492],[-117.24127351046216,32.893672107049824],[-117.24127308670002,32.893669501691505],[-117.24127265970121,32.893666893653865],[-117.24127224343047,32.893664289137178],[-117.24127182608088,32.893661683727409],[-117.24127140871104,32.893659076514311],[-117.24127099563643,32.893656471070251],[-117.24127058467904,32.893653863805731],[-117.24127017371153,32.893651255639483],[-117.24126976707996,32.893648652848981],[-117.24126935929841,32.893646042853682],[-117.24126895581216,32.893643434627485],[-117.24126855447361,32.893640827285758],[-117.24126815416318,32.893638216328824],[-117.24126775281445,32.893635608085468],[-117.2412673621634,32.893633000658021],[-117.24126697150221,32.893630392328951],[-117.24126657974179,32.893627781303408],[-117.24126618909079,32.893625173875925],[-117.24126580481158,32.893622562790412],[-117.24126541950437,32.893619955320119],[-117.24126503843148,32.893617344208849],[-117.24126465735861,32.8936147330976],[-117.24126427950213,32.893612122862287],[-117.24126390163559,32.893609511725295],[-117.24126352697523,32.893606900562609],[-117.2412631555313,32.893604290275825],[-117.24126278728347,32.89360167906171],[-117.24126241903562,32.893599067847525],[-117.24126205400422,32.893596457509368],[-117.24126169213839,32.893593843538795],[-117.2412613303031,32.893591232273216],[-117.24126096844751,32.893588619204273],[-117.24126061302472,32.893586007887272],[-117.24126025757143,32.893583393865242],[-117.24125990643381,32.893580783415629],[-117.24125955418681,32.893578169367885],[-117.24125920193985,32.893575555320133],[-117.24125886039047,32.893572942088333],[-117.24125851455595,32.893570327989146],[-117.24125817192778,32.893567713864286],[-117.24125783357452,32.893565099705071],[-117.24125749416272,32.893562486456112],[-117.24125715898523,32.893559869566218],[-117.24125682597578,32.893557255364151],[-117.24125649404522,32.893554642055228],[-117.24125616421153,32.89355202512246],[-117.24125583868334,32.893549410860402],[-117.24125550991842,32.89354679391905],[-117.24125518974414,32.893544180515782],[-117.24125487059791,32.893541563497294],[-117.24125455145175,32.893538946478799],[-117.24125423551186,32.893536329434575],[-117.24125391854383,32.893533716005621],[-117.24125360581017,32.893531098935675],[-117.24125329625225,32.893528479135],[-117.24125298996154,32.893525864718654],[-117.24125268365059,32.893523248498923],[-117.24125238050517,32.893520628646854],[-117.24125207739027,32.8935180114998],[-117.24125177748159,32.893515394326982],[-117.24125148078936,32.893512778030093],[-117.24125118405651,32.89351015812656],[-117.24125089056031,32.893507540902291],[-117.24125060023992,32.893504920947365],[-117.24125030996021,32.893502304599053],[-117.2412500239148,32.893499684609822]]]}},{"attributes":{"OBJECTID":41,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":34883.821022613789,"SHAPE.STArea()":22141237.195486236,"GlobalID":"{185B3D3B-3BDE-4CEF-8D5D-8D96C33F3626}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"Yes","Region":"Elliott Field Station"},"geometry":{"rings":[[[-117.07524128575692,32.898376201522801],[-117.07523473732299,32.896636447515796],[-117.07833900644265,32.89658269852184],[-117.08159977030391,32.896541561063941],[-117.08410479980741,32.896510937359032],[-117.08416288393539,32.894996123568866],[-117.08417494436532,32.894674525408824],[-117.08630950457992,32.894704017315505],[-117.08638336610827,32.89287851480622],[-117.08808385329378,32.892871887378647],[-117.08829559931664,32.892871055393115],[-117.08831469563999,32.891114618930771],[-117.09143898718402,32.891131880757428],[-117.09123867170396,32.888920702448353],[-117.09550043517602,32.889004306647692],[-117.09532461628631,32.886979866930155],[-117.10485781891414,32.887144371881696],[-117.10489037096319,32.887144933006027],[-117.10522288908831,32.891166953787376],[-117.10523242024465,32.891166914879889],[-117.10761375294462,32.891161725220869],[-117.10974750162224,32.891157038300022],[-117.10975401686024,32.891157022730731],[-117.10975647106416,32.893188427688678],[-117.10976155289841,32.894198601355036],[-117.1097576908938,32.894199554307406],[-117.10945220280307,32.894275889494615],[-117.10943663076625,32.894279919445808],[-117.10942110157268,32.894284068126538],[-117.10940562057485,32.89428833640131],[-117.1093901824201,32.894292723405556],[-117.10937479353854,32.894297230898182],[-117.10935945494606,32.894301853461656],[-117.10934416773779,32.894306593793544],[-117.1093289287074,32.894311451916245],[-117.10931374744722,32.894316425057845],[-117.1092986154336,32.894321515982796],[-117.10928354332765,32.894326721911796],[-117.10926852471677,32.894332042889545],[-117.10925356601344,32.894337478871314],[-117.10923866721765,32.894343029857218],[-117.10922382726064,32.894348695854745],[-117.10920904826219,32.894354475045638],[-117.10919433127343,32.894360365619107],[-117.10917968060461,32.894366371152252],[-117.10916509620284,32.894372486234992],[-117.10915057168192,32.894378713616909],[-117.10913612090928,32.89438505049651],[-117.10912173859398,32.894391502320985],[-117.1091074257519,32.894398063672782],[-117.10909318555393,32.894404730923057],[-117.10907901486438,32.894411511307489],[-117.10906492110279,32.894418398462328],[-117.10905089891658,32.894425391523114],[-117.10903695258948,32.894432491361833],[-117.10902308643185,32.894439701555427],[-117.10900929609814,32.894447014920338],[-117.10899558803605,32.894454435018645],[-117.10898195579783,32.894461958288318],[-117.10896840904626,32.894469589170775],[-117.10895494129836,32.894477320497366],[-117.10894156007954,32.894485156724329],[-117.10892826427681,32.894493093350874],[-117.10891505391676,32.894501133082017],[-117.10890193323914,32.89450927228134],[-117.10888889690875,32.894517511887699],[-117.10887595027846,32.894525852765682],[-117.10886309652803,32.894534292188062],[-117.1088503313823,32.89454283018442],[-117.10883766124513,32.894551465808611],[-117.10882508289258,32.894560197279638],[-117.10881260059973,32.894569024567787],[-117.10880021328894,32.894577946778881],[-117.10878792203782,32.894586964807139],[-117.1087757289575,32.894596075932732],[-117.10876363085916,32.894605281981327],[-117.10875163838659,32.89461457837028],[-117.10873974411113,32.894623970561675],[-117.10872794898721,32.894633446826298],[-117.10871626271287,32.894643015212516],[-117.10870467672919,32.894652674878003],[-117.10869319422484,32.894662423997161],[-117.10868181621584,32.89467225715255],[-117.10867054594368,32.894682177928686],[-117.10865938446828,32.894692185416389],[-117.1086516538639,32.894699225793339],[-117.10849980710688,32.894829460979459],[-117.10807010957102,32.895197996190703],[-117.10805404769641,32.895200264665959],[-117.108038075536,32.895202964448721],[-117.10802221334339,32.895206089987951],[-117.108006480374,32.895209642953496],[-117.10799088831367,32.895213616050327],[-117.10797545313225,32.895218002855493],[-117.10796019085245,32.89522280235613],[-117.10794511857442,32.89522801443357],[-117.10793024899138,32.895233625473608],[-117.10791560239231,32.895239633532164],[-117.10790765728382,32.895243102665212],[-117.10765472539069,32.895364134679063],[-117.10747637453444,32.895449481854541],[-117.10649431652351,32.895887895001934],[-117.10528357955519,32.896428375399786],[-117.10374275488873,32.897116186111198],[-117.10267640468524,32.897408155067744],[-117.10226266736788,32.896600956488065],[-117.10181456114556,32.896436574242003],[-117.10118552351848,32.895553469678369],[-117.10042842715771,32.895149635664545],[-117.09799636396062,32.894957722407156],[-117.09713030513123,32.894135643608067],[-117.0962921912471,32.894229357420492],[-117.09083214464661,32.894839754112418],[-117.08956342848462,32.896734197419455],[-117.08882832879604,32.897829762565429],[-117.08651047811257,32.898483464497609],[-117.08511939515496,32.898875679815696],[-117.08405127750335,32.899125806765063],[-117.08400591961978,32.899139168187205],[-117.08279404567871,32.899493650876281],[-117.08248899881062,32.899136339839224],[-117.08165085773453,32.898154585287394],[-117.07953448856384,32.898292490498399],[-117.07922721818029,32.899158267498919],[-117.07915999599709,32.899347677231354],[-117.07971151763367,32.899772588082236],[-117.08029880301031,32.900225047744982],[-117.07720893471749,32.901130782452107],[-117.07884430205965,32.902840384793038],[-117.07722048535197,32.903398213874574],[-117.07527977917402,32.901784078974757],[-117.07427688796989,32.900457751391372],[-117.0738578364405,32.900003192472028],[-117.07372321957703,32.899857166389076],[-117.07367755406632,32.899807632720552],[-117.07358923488589,32.899711825776777],[-117.07348693708431,32.899600858154798],[-117.07345897618067,32.89957052792478],[-117.07328776961587,32.899384809100205],[-117.07311658645555,32.899199115134969],[-117.07309560705272,32.899176357089381],[-117.07289912384449,32.898963216574927],[-117.07271912864016,32.898767961027666],[-117.07255357279402,32.898588371456462],[-117.07240385878603,32.898425964322115],[-117.07240077906775,32.898422620440819],[-117.07524128575692,32.898376201522801]]]}},{"attributes":{"OBJECTID":42,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":7082.7351488126687,"SHAPE.STArea()":637194.96530804806,"GlobalID":"{C80AC6F4-5FA4-4D95-B372-15C275CE4AFD}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"zayu","last_edited_date":1779858104000,"Clery":"No","Region":"Governor Park"},"geometry":{"rings":[[[-117.18437760163967,32.856338971103426],[-117.18436588485575,32.856329426393216],[-117.18435440312982,32.856319681520333],[-117.18434317035921,32.856309737281322],[-117.18433218015328,32.856299595528135],[-117.18432144756392,32.856289265164449],[-117.18431097045453,32.856278746206499],[-117.18430075211603,32.856268046745129],[-117.1842908053968,32.856257169388456],[-117.18428113139365,32.856246116833482],[-117.18427172487046,32.856234899039123],[-117.18426259973411,32.856223517703661],[-117.18425375924691,32.856211978212961],[-117.18424520454401,32.856200286870795],[-117.18423504587018,32.856185645428475],[-117.18409795486765,32.855961817773341],[-117.18409737830821,32.854717488925736],[-117.1847145006892,32.855155374417777],[-117.18471502745807,32.855154072821747],[-117.18471556710369,32.855152776538652],[-117.18471612067535,32.85515148375724],[-117.18471668285059,32.855150196321119],[-117.18471726213754,32.855148910559073],[-117.18471785107731,32.855147628330911],[-117.184718449689,32.855146351440041],[-117.18471906438243,32.855145079837982],[-117.18471968229981,32.855143810015015],[-117.18472032375765,32.855142543620822],[-117.18472097171131,32.855141285293222],[-117.18472163246521,32.855140025065282],[-117.18472230617255,32.855138777363699],[-117.1847229894944,32.855137529589406],[-117.18472368570264,32.855136288029804],[-117.18472438940795,32.855135048216901],[-117.18472510923321,32.855133817299546],[-117.18472584189706,32.855132588088459],[-117.18472658103757,32.855131365140593],[-117.1847273362597,32.855130147481546],[-117.18472809901729,32.855128935175848],[-117.18472887678823,32.855127728167098],[-117.18472966527071,32.855126523782495],[-117.1847304634251,32.855125324735141],[-117.18473127128021,32.855124133730094],[-117.18473209199301,32.855122946234729],[-117.18473292667005,32.855121765847628],[-117.18473377102865,32.855120591699489],[-117.18473462395255,32.855119419290013],[-117.18473549085992,32.855118255792171],[-117.18473636423441,32.85511709765585],[-117.1847372547588,32.855115944800204],[-117.18473815071079,32.855114800019209],[-117.1847390605791,32.855113657838146],[-117.18473997588463,32.855112524633292],[-117.18474090835919,32.855111398512548],[-117.18474185369142,32.855110275901438],[-117.18474279910025,32.855109160503709],[-117.18474376166854,32.855108051288376],[-117.18474473286928,32.855106950123336],[-117.18474571801515,32.855105854263279],[-117.18474670962809,32.855104763764778],[-117.18474771414658,32.855103681284284],[-117.18474872514174,32.855102605066982],[-117.18474974903293,32.855101535966],[-117.18475078370261,32.855100475800931],[-117.18475182376157,32.855099420103777],[-117.18475287777521,32.855098370613256],[-117.18475394148956,32.855097329164991],[-117.18475501490457,32.855096295759033],[-117.18475609481543,32.855095270419589],[-117.18475718440789,32.855094251319059],[-117.18475828686748,32.855093236629948],[-117.18475940013447,32.855092233581658],[-117.18476051880025,32.855091235902961],[-117.18476164502057,32.855090245381128],[-117.18476278736085,32.85508926375465],[-117.18476393620659,32.85508829109645],[-117.18476509257809,32.855087322889993],[-117.18476626081566,32.855086365414671],[-117.18476743552985,32.855085414202478],[-117.18476861779867,32.855084470147105],[-117.18476981298257,32.855083535011417],[-117.1847710146623,32.8550826079423],[-117.18477222283794,32.855081688939684],[-117.18477344392862,32.855080778856795],[-117.18477467471047,32.855079875914477],[-117.18477590558805,32.855078981988896],[-117.18477715040117,32.855078092466535],[-117.1847784039137,32.855077217306309],[-117.1847796649617,32.855076347499462],[-117.18478092930063,32.855075485783374],[-117.18478220977875,32.85507463476614],[-117.18478349673356,32.855073790012021],[-117.18478478699848,32.855072955152067],[-117.18478609017855,32.855072129211798],[-117.18478739771794,32.855071311354237],[-117.1847887138897,32.85507050154704],[-117.18479003765432,32.855069702503314],[-117.18479136789573,32.855068909722718],[-117.18479271106176,32.855068126763541],[-117.18479405435228,32.855067355526053],[-117.18479540734353,32.855066592330857],[-117.18479676680191,32.855065834497154],[-117.18479813278488,32.855065087435079],[-117.18479950852597,32.855064353825185],[-117.18480088863598,32.855063629199734],[-117.18480227410647,32.855062906337153],[-117.18480367041303,32.855062197820494],[-117.18480507321546,32.855061497370357],[-117.18480647933764,32.855060807716008],[-117.18480789516049,32.855060126103922],[-117.18480931431269,32.855059456189338],[-117.18481074316556,32.855058794316939],[-117.18481217532864,32.855058142338763],[-117.18481361506545,32.855057499320637],[-117.18481506022982,32.855056864377126],[-117.18481651195707,32.855056243811894],[-117.18481796803411,32.855055630427607],[-117.18481943061656,32.855055026011563],[-117.18482089862658,32.855054429670112],[-117.18482237105337,32.85505384682137],[-117.18482385320962,32.855053274719964],[-117.18482533542328,32.855052708028516],[-117.18482682740475,32.855052155691084],[-117.1848283194628,32.855051610566974],[-117.18482982125988,32.855051077091858],[-117.18483132741623,32.855050551699385],[-117.18483283583365,32.855050038012514],[-117.1848343507661,32.85504953419553],[-117.18483587009617,32.855049042067861],[-117.18483739484421,32.855048557113122],[-117.18483892398994,32.855048083847741],[-117.18484045645539,32.855047621378205],[-117.18484199115316,32.855047167909163],[-117.18484353343426,32.855046724301985],[-117.18484507904471,32.855046292392174],[-117.18484662800364,32.855045873983194],[-117.18484818340099,32.855045458230684],[-117.18484973897075,32.855045058708313],[-117.18485130424115,32.85504466722815],[-117.18485286646005,32.85504429019899],[-117.18485443194115,32.85504391855558],[-117.18485600507267,32.855043563085651],[-117.18485758039819,32.855043213009587],[-117.18485915904347,32.855042873729282],[-117.18486073887198,32.855042545260972],[-117.18486232096156,32.855042228498164],[-117.18486390957572,32.855041922506913],[-117.18486550257794,32.855041627303329],[-117.18486709462681,32.855041342927947],[-117.18486868786849,32.855041070266125],[-117.1848702875965,32.855040804769217],[-117.18487188640941,32.855040553707056],[-117.18487348958168,32.855040310727595],[-117.1848750960737,32.855040078543944],[-117.18487670162197,32.855039858090073],[-117.1848783115487,32.855039647522219],[-117.18487992162868,32.855039451381145],[-117.1848815349997,32.855039263330816],[-117.18488314738869,32.855039083403561],[-117.18488476098962,32.855038916993337],[-117.1848863843296,32.85503876223202],[-117.1848880013652,32.855038617437614],[-117.18488962173021,32.855038484340632],[-117.18489124538623,32.855038359334486],[-117.18489286278583,32.855038248803503],[-117.18489448990535,32.855038148118211],[-117.1848961139158,32.855038056473752],[-117.18489774123643,32.855037974723494],[-117.1848993655055,32.85503790742419],[-117.18490099307519,32.855037849117359],[-117.18490262080775,32.85503780613886],[-117.1849042485786,32.855037766767076],[-117.18490587645478,32.85503773731368],[-117.18490750451299,32.855037724992002],[-117.18490913269575,32.855037724392048],[-117.18491076095512,32.855037731005417],[-117.18491238932945,32.855037748438846],[-117.18491401462347,32.855037777618271],[-117.18491564326602,32.855037820298442],[-117.18491727199476,32.855037871093678],[-117.18491889763364,32.855037932733175],[-117.18492052339704,32.855038006094432],[-117.18492214927539,32.855038090275727],[-117.1849237709956,32.85503818530939],[-117.18492539389902,32.855038291154983],[-117.18492701688866,32.855038405115621],[-117.18492863681713,32.855038532625571],[-117.18493025687016,32.85503867185728],[-117.18493187703815,32.855038821908977],[-117.18493349408752,32.855038980099941],[-117.18493511128057,32.855039151816015],[-117.18493672428674,32.855039331679414],[-117.18493833530964,32.85503952598571],[-117.18493994641872,32.855039728407064],[-117.18494248957047,32.855040071660206],[-117.18494410073707,32.855040279491519],[-117.18494571469661,32.855040448526665],[-117.18494733362388,32.855040582356168],[-117.18494895963643,32.85504067916051],[-117.18495058525623,32.855040738996252],[-117.18495221368808,32.855040761839206],[-117.18495384171761,32.855040746811895],[-117.18495546934483,32.855040693914333],[-117.18495709337441,32.855040604072528],[-117.18495871382555,32.855040479089674],[-117.1849603306695,32.855040316260897],[-117.18496194394461,32.855040119192772],[-117.18496354714532,32.855039878917196],[-117.18496514252325,32.855039606237966],[-117.18496672897172,32.855039297556552],[-117.18496830435421,32.855038952889089],[-117.18496986650534,32.855038569546714],[-117.18497141869717,32.85503815381697],[-117.18497295769596,32.855037703018958],[-117.18497447920953,32.855037215381813],[-117.18497598432525,32.855036692700693],[-117.18497747307188,32.855036137680671],[-117.18497894543985,32.855035549420016],[-117.18498039819561,32.855034925238087],[-117.18498182713306,32.855034271478814],[-117.18498323966304,32.855033581773931],[-117.1849846251412,32.855032859810954],[-117.18498598898546,32.85503211276292],[-117.18498732467128,32.855031329858207],[-117.18498863867532,32.855030517360085],[-117.18498992565624,32.855029675308842],[-117.18499118670141,32.855028805499821],[-117.18499241750901,32.855027905260378],[-117.18499361918566,32.855026978189059],[-117.18499479066308,32.85502602429397],[-117.18499592979505,32.855025042689682],[-117.1849970398153,32.855024036056825],[-117.18499848965418,32.855022634593091],[-117.18524456399795,32.854775523465705],[-117.18541317367534,32.85489449531287],[-117.18632857603461,32.855540383423786],[-117.18633868715159,32.855548420680059],[-117.18634818481648,32.85555955106031],[-117.18635478825803,32.855572086654092],[-117.18635821297303,32.85558549578576],[-117.18635832045797,32.855599212308128],[-117.18635510242511,32.855612658265727],[-117.18634869491085,32.8556252645282],[-117.18633936790053,32.855636499724575],[-117.1859608227399,32.856032349601634],[-117.18559540823195,32.856414471680893],[-117.18547399516378,32.856327438635276],[-117.18542871969342,32.856357025060319],[-117.18539314610052,32.856380272684795],[-117.18538018530208,32.856388591127136],[-117.18536702762732,32.856396681114013],[-117.18535366875531,32.856404538169329],[-117.18534011826242,32.856412158613608],[-117.18532638571541,32.856419537865555],[-117.1853124721539,32.856426673212049],[-117.18529838290989,32.856433563710858],[-117.18528413185213,32.856440207453474],[-117.18526971564165,32.856446591840722],[-117.18525514613525,32.856452726701939],[-117.18524042750076,32.856458602086356],[-117.18522556934339,32.856464217019372],[-117.18521057163446,32.856469568796072],[-117.18519544827157,32.85647465821274],[-117.18518020022731,32.856479476244665],[-117.18516483932011,32.856484029114512],[-117.18514936758135,32.856488306887663],[-117.18513379574196,32.856492313991573],[-117.18511812590037,32.856496046803358],[-117.18510236551566,32.856499503463006],[-117.1850865273596,32.856502679365079],[-117.18507061142282,32.856505573607947],[-117.18505462738707,32.856508192430368],[-117.18503858159532,32.856510529472246],[-117.18502248469233,32.856512581045862],[-117.18500633776578,32.85651434894654],[-117.18499015365448,32.856515834880653],[-117.18497393226285,32.856517029831309],[-117.18495768975907,32.85651794720237],[-117.18494142386319,32.856518573484905],[-117.18492514853979,32.856518915787127],[-117.18490886695557,32.856518970478227],[-117.18489258871583,32.856518736583602],[-117.18487631708304,32.856518219489146],[-117.18486006591665,32.856517416384698],[-117.18484383411001,32.856516323671634],[-117.18482763455958,32.856514948466383],[-117.18481147152912,32.856513289834915],[-117.18479535780962,32.856511344975253],[-117.18477928915678,32.856509116624707],[-117.18476328376047,32.85650660735093],[-117.18474734268925,32.85650381714585],[-117.18473147128469,32.856500745969079],[-117.18471568023946,32.856497394641465],[-117.18469998137209,32.856493769385892],[-117.1846843650297,32.856489866668369],[-117.18466885583111,32.856485690811382],[-117.18465345057156,32.856481241839333],[-117.18463815786465,32.856476525999128],[-117.18462298835512,32.856471539603412],[-117.18460794316887,32.8564662880542],[-117.18459302872537,32.856460772204606],[-117.18457825783466,32.856454991056118],[-117.18456363065009,32.856448959035447],[-117.18454915455413,32.856442667069508],[-117.18453483818895,32.856436124110211],[-117.18452068792614,32.856429326502564],[-117.1845067113683,32.856422285911783],[-117.18449290525315,32.856414996952147],[-117.1844792846519,32.856407470330495],[-117.18446585166286,32.856399702424241],[-117.18445261704561,32.856391700365883],[-117.18443957870191,32.856383467778365],[-117.18442674949935,32.856375009073147],[-117.18441412945693,32.856366326053674],[-117.18440172928649,32.856357421344114],[-117.18438955118209,32.85634830033851],[-117.18437760163967,32.856338971103426]],[[-117.18623726701965,32.85028864817442],[-117.18626827624055,32.850261683624062],[-117.18627626355702,32.850288355298915],[-117.18631244273671,32.850409140267629],[-117.18636257743449,32.850576521689234],[-117.18640942251662,32.850732915023492],[-117.18645781638493,32.850894487942611],[-117.18650214523488,32.851042484337754],[-117.18655276882069,32.85120976008249],[-117.18537718042857,32.85150815570541],[-117.1852237395094,32.851547074473984],[-117.185200963775,32.851472866520531],[-117.1851991000413,32.851459239942635],[-117.18520063219228,32.851445584047426],[-117.1852054810626,32.851432491880331],[-117.18521343708581,32.851420550259668],[-117.18522198011463,32.851408856682689],[-117.18522943756888,32.851396645607132],[-117.1852357631652,32.851383985014621],[-117.1852409267875,32.851370956290296],[-117.18524488754166,32.851357631883509],[-117.18524762594619,32.851344088590132],[-117.18524913432775,32.851330408527133],[-117.18524939537969,32.851316672080827],[-117.1852484067412,32.851302958622568],[-117.18524617781142,32.851289348336508],[-117.18524272014534,32.851275923193803],[-117.18523805379566,32.851262760592562],[-117.18523220630247,32.851249938775844],[-117.18522521372267,32.851237533217109],[-117.18521711207499,32.851225615782994],[-117.18520796193779,32.851214257252408],[-117.18519780247657,32.851203524057702],[-117.18519153454353,32.851198085298932],[-117.18537221480442,32.851040956216281],[-117.18623726701965,32.85028864817442]],[[-117.18334249234897,32.853294037553923],[-117.18332621372366,32.85329401266506],[-117.18330993465713,32.85329424838141],[-117.18329366470618,32.853294739220438],[-117.18327740708509,32.853295486059487],[-117.18326116822229,32.853296490653584],[-117.18324495554765,32.853297748437832],[-117.18322877442148,32.853299261175209],[-117.18321262912627,32.853301029735171],[-117.1832047431586,32.853301988350552],[-117.18310392205562,32.853313741343072],[-117.18308771879163,32.853315081094244],[-117.18307147705997,32.853316017152487],[-117.18305520754342,32.853316549436983],[-117.18303892734399,32.853316678720368],[-117.18302265246655,32.853316403078274],[-117.18300638933054,32.853315723363878],[-117.18299016139959,32.853314635792991],[-117.18297397518862,32.853313150235735],[-117.1829578488201,32.853311262948154],[-117.18294179727843,32.853308976522385],[-117.18292582913863,32.853306293598941],[-117.1829099646978,32.853303214024564],[-117.18289421254048,32.853299741341438],[-117.18287858659244,32.853295879051316],[-117.18286310396515,32.853291628828657],[-117.18284777654338,32.853287003208123],[-117.18283261707002,32.853281994879602],[-117.18281763630425,32.853276610975804],[-117.18280285032745,32.853270856785947],[-117.18278827202582,32.853264738524842],[-117.18277391430449,32.853258264211],[-117.18275978784628,32.85325143376366],[-117.18274590451675,32.853244257914291],[-117.18273227927168,32.853236736550095],[-117.1827189197323,32.853228883139757],[-117.182705839786,32.853220697578472],[-117.18269305029703,32.853212196917397],[-117.18268056300676,32.853203380166363],[-117.18266838869324,32.853194256261418],[-117.18265653705694,32.853184833245095],[-117.18264502103159,32.853175121840891],[-117.18263384708409,32.853165127410428],[-117.18262302494337,32.853154860701288],[-117.18261256752406,32.853144330633519],[-117.18260247917561,32.853133544388371],[-117.18259277281255,32.853122510885797],[-117.18258345071472,32.853111243634878],[-117.18257453433317,32.853099750589458],[-117.18256601518863,32.853088038125854],[-117.1825579105259,32.85307612054185],[-117.18255022473262,32.85306400862531],[-117.18254434015721,32.853054114025468],[-117.1823801595434,32.852797476174132],[-117.18285787454251,32.852592488293439],[-117.18286367857007,32.852030184373703],[-117.18363471434762,32.85203585901553],[-117.18363172446081,32.853339989647708],[-117.18361415718778,32.853333298021688],[-117.18359869526179,32.853328989121081],[-117.18358314297184,32.85332492347068],[-117.18356750464828,32.853321106448256],[-117.18355178454479,32.853317536218078],[-117.18353598158355,32.853314211886612],[-117.18352011400124,32.85331114052984],[-117.18350418284696,32.853308320336311],[-117.18348819019006,32.853305744978265],[-117.18347214789607,32.853303425186958],[-117.18345604630274,32.853301356526572],[-117.18343991115327,32.853299548721672],[-117.18342373379632,32.853297991918623],[-117.18340752600166,32.853296687831808],[-117.18339129210921,32.853295642740683],[-117.18337503739309,32.85329485029316],[-117.18335877045671,32.853294315834752],[-117.18334249234897,32.853294037553923]],[[-117.18280015989497,32.853841005797314],[-117.18244555654591,32.853258248147512],[-117.18245631403082,32.853268564054375],[-117.1824673173861,32.853278692345008],[-117.18247856229098,32.85328862854319],[-117.18249004340423,32.853298372689245],[-117.18250175315245,32.853307915822796],[-117.18251369898481,32.853317255182354],[-117.1825258637996,32.853326389995196],[-117.18253824430599,32.853335312170373],[-117.18255083731835,32.853344023535371],[-117.18256363631245,32.853352513318455],[-117.18257663918031,32.853360784240685],[-117.18258983728984,32.853368828251476],[-117.18260322850459,32.853376645366986],[-117.18261680316226,32.853384231151296],[-117.18263056121506,32.853391581095927],[-117.18264448555165,32.853398693526621],[-117.18265858685456,32.85340556836266],[-117.18267284797419,32.853412200322921],[-117.18268726667844,32.85341858040686],[-117.18270183131189,32.853424717719797],[-117.18271654389623,32.853430601425487],[-117.18273139694406,32.85343623067871],[-117.18274638191878,32.853441606445607],[-117.18276149341203,32.85344672245472],[-117.1827767218189,32.853451579680311],[-117.18279206597545,32.853456169113791],[-117.18280751745969,32.853460502541139],[-117.18282307077735,32.853464565576083],[-117.18283871847912,32.853468360980017],[-117.18285445413619,32.85347188699798],[-117.18287026919278,32.853475142792796],[-117.18288616255178,32.853478125667458],[-117.18290212354003,32.853480836604369],[-117.18291814463176,32.853483271151518],[-117.18293422477767,32.853485431120333],[-117.18295035331415,32.853487318394848],[-117.18296651947244,32.853488924940635],[-117.18298272329055,32.853490254364424],[-117.18299895727145,32.853491304919274],[-117.18301521181968,32.853492078481125],[-117.18303148262385,32.853492571475606],[-117.18304776330289,32.853492786656162],[-117.18306404100895,32.853492721414526],[-117.1830803189178,32.853492373021545],[-117.18309658005194,32.853491752426351],[-117.1831128264617,32.853490851497803],[-117.18312904637686,32.853489668521242],[-117.18323265679678,32.853477682526851],[-117.1832487780363,32.853475758144462],[-117.18326494777564,32.853474176056487],[-117.1832811649946,32.853472940779092],[-117.18329741041676,32.853472047949396],[-117.18331367661236,32.853471502132095],[-117.18332995612282,32.853471305187121],[-117.18334623606236,32.853471450899583],[-117.1833625100694,32.85347194382625],[-117.18337875463277,32.853472783243085],[-117.18339497402573,32.853473969117765],[-117.18341115540066,32.853475498842158],[-117.18342728379253,32.853477371627619],[-117.18344335174285,32.853479589334093],[-117.18345934746264,32.853482148443582],[-117.18347526234859,32.853485043610739],[-117.18349108680576,32.853488276711623],[-117.18350680693726,32.853491846949488],[-117.18352241735415,32.853495749856449],[-117.18353790949142,32.853499983693709],[-117.18355326302347,32.853504545909701],[-117.18356848007753,32.85350943558673],[-117.18358354345627,32.853514642935529],[-117.18359844787595,32.853520173406629],[-117.18361318255836,32.853526018064102],[-117.18362773890028,32.853532171562591],[-117.18363138005394,32.853533804153606],[-117.18362201189943,32.855187069815315],[-117.18280015989497,32.853841005797314]]]}},{"attributes":{"OBJECTID":44,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":2871.1406315256377,"SHAPE.STArea()":409582.61361639638,"GlobalID":"{B1C3664F-1D65-4408-A8A9-A0DCCA10276C}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"No","Region":"Mount Soledad"},"geometry":{"rings":[[[-117.24898972644348,32.842428255573651],[-117.24781591719858,32.839390964896843],[-117.24782538684273,32.839393716277357],[-117.24784072160406,32.839398328373633],[-117.24785599282895,32.839403083457775],[-117.24787120480008,32.839407982396985],[-117.24788634572764,32.839413021679547],[-117.24790142416659,32.839418202138077],[-117.24791643476642,32.839423522914124],[-117.24793137322416,32.839428981337193],[-117.24794623741388,32.839434578326291],[-117.24796103162846,32.839440315650151],[-117.24797574937763,32.839446186147356],[-117.24799038436539,32.83945219978802],[-117.24800494501382,32.839458345683092],[-117.24801942388724,32.839464627499751],[-117.24803381880865,32.83947104164853],[-117.24804813409135,32.83947759170163],[-117.24806235366297,32.839484273280263],[-117.24807648929293,32.839491088092799],[-117.24809053561023,32.839498033477454],[-117.24810449155699,32.839505110344547],[-117.24811835282,32.839512315121972],[-117.24813211941984,32.839519649613088],[-117.24814578812145,32.839527111138786],[-117.24815140365412,32.839529097397417],[-117.24816644350922,32.839534357489683],[-117.24818151457031,32.839539543384433],[-117.24819662433421,32.839544656824593],[-117.24821176954556,32.839549693327726],[-117.24822694605473,32.839554663748316],[-117.24824215694328,32.839559557240484],[-117.24825740326895,32.839564372893854],[-117.24827267875617,32.839569122481954],[-117.24828798752378,32.839573792445165],[-117.24830332965372,32.83957838999693],[-117.24831869978493,32.839582913376937],[-117.24833410112173,32.839587362559364],[-117.24834953470133,32.83959173483052],[-117.2483649963027,32.839596034733269],[-117.24838048694264,32.839600257750668],[-117.24839600558366,32.839604406596258],[-117.24841155007947,32.839608480385706],[-117.2484271257499,32.839612477272482],[-117.24844272621709,32.839616400013377],[-117.24845835253888,32.839620247698079],[-117.24847400683099,32.839624018505965],[-117.24848968591976,32.839627715167914],[-117.24850539084251,32.839631334970271],[-117.24852111838482,32.839634877037376],[-117.24853686964526,32.839638344065463],[-117.24855264354571,32.839641735161564],[-117.2485684432698,32.839645048496401],[-117.24858426455532,32.839648285006163],[-117.2486001042185,32.83965144652008],[-117.24861596864741,32.839654531183037],[-117.24863185250146,32.839657539038143],[-117.24864775467174,32.839660466487437],[-117.24866367844416,32.839663320718294],[-117.24867962159055,32.839666093632957],[-117.24869558209743,32.839668796068693],[-117.24871156305642,32.839671418081316],[-117.24872756126334,32.839673959696661],[-117.24874357573177,32.839676428136706],[-117.2487596053426,32.839678818901774],[-117.24876965516533,32.839681013647862],[-117.24878540333175,32.839684488785196],[-117.24880114026203,32.839688009098843],[-117.24881686374836,32.839691568294498],[-117.24883257481802,32.839695162756811],[-117.24884827673667,32.839698797869858],[-117.24886396311612,32.839702475488856],[-117.2488796296024,32.839706188434924],[-117.24889529015215,32.839709942907596],[-117.2489109351424,32.839713738082843],[-117.24892657093054,32.839717569400541],[-117.24894218799592,32.839721445053449],[-117.24895779155608,32.839725354178327],[-117.24897338276122,32.839729303979944],[-117.24898896159064,32.839733292654913],[-117.24900452486074,32.839737322032583],[-117.24902007252034,32.839741387604505],[-117.24903560676697,32.839745494763477],[-117.24905112863809,32.839749640795887],[-117.24906663171495,32.839753824851798],[-117.24908212562055,32.839758047755268],[-117.24909760290907,32.839762312271723],[-117.24911305603226,32.839766612149909],[-117.24912850535534,32.839770953537439],[-117.24914393479571,32.839775331153866],[-117.249159349745,32.839779749464377],[-117.24917474801582,32.83978420397785],[-117.24919013073777,32.839788700095717],[-117.24920549786982,32.839793234211342],[-117.24922084939161,32.839797804521289],[-117.24923618429646,32.839802416444279],[-117.24925150358078,32.839807063660039],[-117.24926680411204,32.839811752506087],[-117.24928209223728,32.839816477520628],[-117.24929736053119,32.839821243272446],[-117.2493126132149,32.83982604521875],[-117.24932784711486,32.839830886090347],[-117.24933350310346,32.839832668172797],[-117.2493486922245,32.839837610400174],[-117.24936378957698,32.839842749047918],[-117.24937879406215,32.839848081419717],[-117.24939369717636,32.839853611191394],[-117.24940849774923,32.839859329355036],[-117.24942319053257,32.839865244068825],[-117.24943777754989,32.839871345397228],[-117.24945224920906,32.839877635221349],[-117.24946660656792,32.839884112630983],[-117.24948084216018,32.839890778588291],[-117.24949495587323,32.839897623174977],[-117.24950894141131,32.839904656361313],[-117.24952279864128,32.839911866425638],[-117.24953652438974,32.839919256098995],[-117.24955011221734,32.839926822728188],[-117.24956355891993,32.839934566339309],[-117.24957686446692,32.839942484227265],[-117.24959002453461,32.839950571918479],[-117.24960303486105,32.839958830349218],[-117.24961589328959,32.839967257733413],[-117.24962859762262,32.839975848678485],[-117.24964114467635,32.839984605013704],[-117.24965353013754,32.839993523166982],[-117.24966575078139,32.840002601361086],[-117.24967780442053,32.840011835104917],[-117.24968968788149,32.840021227129519],[-117.24970140322868,32.840030771105951],[-117.2497129386927,32.840040465326062],[-117.2497242964097,32.840050309772579],[-117.24978383271524,32.840132283842188],[-117.2497905701477,32.840141906881378],[-117.24979880274964,32.840153760468418],[-117.2498069758888,32.840165645195754],[-117.24981509486472,32.840177557413519],[-117.24982314262878,32.840189500866707],[-117.24983114153929,32.840201469062158],[-117.24983907885084,32.840213468415236],[-117.24984695452238,32.840225495319324],[-117.24985477172744,32.840237547043522],[-117.24986253053771,32.840249629899439],[-117.24987022555128,32.840261738520361],[-117.24987786106104,32.84027387467502],[-117.24988543918255,32.840286036542786],[-117.24989295886824,32.840298225935761],[-117.24990041367884,32.840310440200696],[-117.24990781009447,32.840322685597471],[-117.2499151448086,32.840334953135354],[-117.249922417862,32.840347246421011],[-117.24992962924451,32.840359564552799],[-117.2499367832694,32.840371911102793],[-117.24994387132021,32.840384279828505],[-117.24995090200321,32.840396676070782],[-117.24995786672231,32.840409095390491],[-117.24996477401201,32.840421536816784],[-117.24997161967165,32.840434006695943],[-117.24997840045596,32.840446501447204],[-117.24998511631367,32.84045901656232],[-117.24999178011319,32.84047155644582],[-117.24999837583294,32.840484121227441],[-117.25000490662605,32.84049670637291],[-117.25001138002035,32.840509316329971],[-117.25001778424634,32.840521949390556],[-117.25002413317898,32.840534604540494],[-117.25003041506913,32.840547281874976],[-117.25003663419945,32.840559982261034],[-117.25004279266508,32.840572702074738],[-117.25004441189087,32.840575978547093],[-117.25005076183783,32.840588628277025],[-117.25005724055525,32.840601235483454],[-117.2500638469136,32.840613794765083],[-117.25007058199124,32.840626307014851],[-117.2500774436111,32.840638768643345],[-117.25008442855864,32.84065117877492],[-117.250091543263,32.840663539160886],[-117.25009878023725,32.84067584896016],[-117.25010614158688,32.840688105450425],[-117.25011362835964,32.840700306819684],[-117.25012124166456,32.840712456665884],[-117.25012897501111,32.840724547827556],[-117.25013683163435,32.840736582983816],[-117.25014481154467,32.840748563036193],[-117.25015291038764,32.840760480806011],[-117.25016112930309,32.84077234259626],[-117.25016946823993,32.840784143898581],[-117.25017792720837,32.840795885614519],[-117.25018650936148,32.8408075632099],[-117.25019520404909,32.840819179476121],[-117.25020401871716,32.840830731647593],[-117.25021295019222,32.840842222455322],[-117.25022200054889,32.840853646471906],[-117.25023116231056,32.840865003757955],[-117.25024044294371,32.840876293351108],[-117.25024983609099,32.840887519811687],[-117.25025934270784,32.840898673212557],[-117.25026895966164,32.84090975989146],[-117.25027869329953,32.840920774386326],[-117.25028853619618,32.840931721266138],[-117.25029848933757,32.840942593308782],[-117.25030855596913,32.840953394094981],[-117.25031872858334,32.840964120980345],[-117.25032901148342,32.840974776635086],[-117.25033940031497,32.840985353880605],[-117.2503498962178,32.840995859019785],[-117.25036049913051,32.841006286642589],[-117.25036393590622,32.841009608806857],[-117.2501440433021,32.841236527705526],[-117.24995669860192,32.841429947803441],[-117.24976803116677,32.841624730941874],[-117.2495822622144,32.841816520865294],[-117.24931161790293,32.842095934039385],[-117.24898972644348,32.842428255573651]]]}},{"attributes":{"OBJECTID":45,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":2002.1281650495357,"SHAPE.STArea()":245487.3619612176,"GlobalID":"{CF561A65-2F85-48C7-B012-99A71831CC64}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"Yes","Region":"Nimitz Marine Facility"},"geometry":{"rings":[[[-117.23692537729428,32.706813467638682],[-117.23692480773315,32.706788793169729],[-117.23693225221542,32.706788775072404],[-117.23898027355042,32.706783361931095],[-117.23898218523617,32.706953755278228],[-117.23898220018768,32.706955087941502],[-117.23898221517966,32.70695642421142],[-117.23898600863993,32.707294542876795],[-117.23884595390382,32.707858081528713],[-117.23846002558621,32.70786104289003],[-117.23796013100612,32.707864922415148],[-117.23787668850711,32.707865570121427],[-117.23770980033636,32.707866868095252],[-117.23762637131425,32.707867481257772],[-117.23755492653348,32.707868005609669],[-117.23737608209778,32.707869319522167],[-117.23710204514785,32.70787133293544],[-117.23703103912281,32.707871892246978],[-117.23701958429845,32.70785887071365],[-117.23700415888231,32.707854544948489],[-117.23698897445253,32.707849641937848],[-117.23697876582405,32.707845897525424],[-117.23697406526827,32.707844173130233],[-117.23695946019575,32.707838144607031],[-117.23694518926854,32.707831571457618],[-117.23693127394785,32.707824465233138],[-117.23691775494224,32.707816841839403],[-117.23691566861569,32.707810165765189],[-117.23691188087587,32.707796802420596],[-117.23690857954401,32.707783347713857],[-117.23690576899691,32.707769811529104],[-117.23690345152885,32.707756208276045],[-117.23690163158729,32.707742554150592],[-117.23690030720059,32.707728863596472],[-117.23689948369078,32.707715135669382],[-117.23689915817116,32.707701398346536],[-117.23689932963552,32.707687657046584],[-117.2369000078335,32.707673925217563],[-117.23690117375988,32.70766022014493],[-117.23690284459934,32.70764655251201],[-117.23690295137031,32.707640656031899],[-117.23690320708656,32.70762691405767],[-117.2369034628633,32.707613177493506],[-117.2369037249783,32.70759943546809],[-117.23690399029272,32.707585693417087],[-117.23690400355014,32.707585067498172],[-117.23690426310274,32.707571954011314],[-117.2369045348462,32.707558214614117],[-117.2369048097587,32.707544472486347],[-117.23690509536634,32.707530732978128],[-117.23690537990734,32.707516993478528],[-117.23690566551477,32.70750325397038],[-117.23690596285347,32.707489514368362],[-117.23690626125854,32.707475774757832],[-117.23690656606246,32.7074620350961],[-117.23690687087637,32.707448296336011],[-117.23690718101255,32.70743455663159],[-117.23690749541454,32.707420816893055],[-117.2369078130159,32.707407077128956],[-117.23690813701606,32.707393337313569],[-117.23690846421559,32.707379597472624],[-117.23690879568099,32.707365857597509],[-117.2369091293095,32.707352120410377],[-117.2369094693065,32.707338380467],[-117.23690981250287,32.707324640498072],[-117.23691015999539,32.707310903199989],[-117.23691050639103,32.707297163205432],[-117.2369108666811,32.70728342580491],[-117.23691122587429,32.707269685707963],[-117.23691158937376,32.707255949183491],[-117.23691195603213,32.70724220902683],[-117.23691232805311,32.707228471532467],[-117.23691270430957,32.707214731298997],[-117.23691308379573,32.70720099374487],[-117.23691346648116,32.70718725616522],[-117.23691385556536,32.707173518534276],[-117.23691424784892,32.707159780877781],[-117.2369146433015,32.707146040490677],[-117.23691504198371,32.707132302783002],[-117.23691544814125,32.70711856591722],[-117.23691585642155,32.707104828132707],[-117.23691626790115,32.707091090322592],[-117.236916686846,32.707077352452728],[-117.23691710472423,32.707063614591455],[-117.23691753009797,32.707049879375418],[-117.2369179607737,32.707036141411656],[-117.23691839251582,32.707022403439403],[-117.23691883066677,32.70700866631762],[-117.23691927203723,32.706994930973579],[-117.23691971551021,32.70698119290747],[-117.23691999692018,32.706972604215103],[-117.23692003613502,32.706971438843432],[-117.23692007217062,32.706970275300698],[-117.23692016327924,32.706967457512249],[-117.2369206174167,32.706953719360754],[-117.23692107478382,32.706939983888688],[-117.23692153531992,32.706926245686041],[-117.23692200336161,32.706912511030289],[-117.23692247669517,32.706898772725225],[-117.23692294685942,32.706885037150727],[-117.23692342342244,32.706871301525076],[-117.23692664328145,32.706868527230306],[-117.23692632136328,32.706854540095009],[-117.23692600611729,32.706840863107466],[-117.23692569285294,32.706827172577881],[-117.23692537729428,32.706813467638682]]]}},{"attributes":{"OBJECTID":46,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":2811.5468784860727,"SHAPE.STArea()":346355.69258069276,"GlobalID":"{AEFDBB63-D0DA-48B9-A304-524553B50640}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"Yes","Region":"Trade Street"},"geometry":{"rings":[[[-117.15034134804748,32.888836794368132],[-117.15028937790893,32.887307183393496],[-117.15077151382762,32.887310992039829],[-117.15115263468471,32.887312643603096],[-117.15145889219988,32.887314576822924],[-117.15163481846963,32.887315690168307],[-117.15164785105682,32.887314979188893],[-117.15170361243614,32.888942307242594],[-117.15253946204997,32.888952795702942],[-117.1525327382431,32.888967365549746],[-117.15252828019479,32.888980577057595],[-117.15252514486039,32.888994059346494],[-117.15252335580284,32.889007713053047],[-117.15252292705956,32.889021447900539],[-117.15252385972306,32.889035161984417],[-117.15252614858493,32.88904876426669],[-117.15252977873516,32.889062155664696],[-117.15253472146317,32.889075246213828],[-117.15254096332527,32.889087975595473],[-117.15226995916601,32.889213025118359],[-117.15226853403144,32.889391688501959],[-117.15040816494194,32.889365085833234],[-117.15035927395076,32.889364386113641],[-117.15034134804748,32.888836794368132]]]}},{"attributes":{"OBJECTID":47,"Campus":"Natural Reserves System","FeatureID":null,"SHAPE.STLength()":19915.467240340749,"SHAPE.STArea()":10126745.732693939,"GlobalID":"{DEBC39B8-B70D-4C68-AF45-B66E20741E56}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"Yes","Region":"Dawson Los Manos"},"geometry":{"rings":[[[-117.24842935223379,33.152298138812277],[-117.24819726990711,33.152110404210539],[-117.2480698832323,33.152114178510161],[-117.24805418765804,33.151883431424906],[-117.24908222331547,33.148909529962808],[-117.24789979047551,33.148956454089507],[-117.24735922068166,33.148810284177053],[-117.24687379381804,33.148679024039829],[-117.24625374822561,33.148511354574566],[-117.24659708941772,33.147585523117563],[-117.24561392867781,33.147327122882736],[-117.24459811441496,33.14706013002175],[-117.24459262864421,33.146674673976399],[-117.24459259912648,33.146672638099112],[-117.24459197347581,33.146628713370347],[-117.24458954274932,33.146457839954117],[-117.24458758346711,33.146320222290072],[-117.24458554978909,33.146177177687122],[-117.24458355950411,33.146037108454486],[-117.24458155353665,33.145896506421145],[-117.24457959948866,33.145759064545267],[-117.2445776389067,33.145621234974413],[-117.24457293240454,33.145290684587806],[-117.24456604085201,33.144806378186082],[-117.24462611300457,33.144780161535849],[-117.24477691293434,33.144714349247984],[-117.24492771264806,33.144648537677902],[-117.24507851213545,33.144582725923875],[-117.24522931138632,33.144516913084288],[-117.24538011042118,33.144451100962435],[-117.24553090922969,33.144385288656594],[-117.24568170780168,33.144319475265206],[-117.24583250615765,33.144253662591545],[-117.24601105740651,33.144175737341889],[-117.24622423353357,33.14408269999624],[-117.24645657710373,33.143981295182549],[-117.24660471740211,33.14391664181835],[-117.24663666421688,33.143902698406436],[-117.24663885692,33.143947001896471],[-117.24673084474716,33.14580581671089],[-117.24693265766959,33.145805777904272],[-117.25043553219022,33.145804954313341],[-117.25044404109899,33.145804959571905],[-117.25045254984316,33.145804950403374],[-117.25181653897488,33.145804631750096],[-117.2518250562831,33.145804621516454],[-117.25183355554559,33.145804626757567],[-117.25315965752786,33.145804262318947],[-117.25316815786216,33.145804267459823],[-117.25317667518055,33.14580425803495],[-117.25323788011845,33.14580423513241],[-117.25324638896537,33.145804234788628],[-117.25425652421075,33.1458039694365],[-117.25698143297024,33.145803186193831],[-117.25793421337728,33.145802898768054],[-117.2617247971412,33.145801682965995],[-117.26180176887851,33.145801656978421],[-117.26180296092089,33.145805937702058],[-117.2618302534277,33.149066666674365],[-117.26183432082806,33.149257555045864],[-117.26138825007931,33.14959029464665],[-117.25953698761167,33.149421238444468],[-117.25937027453728,33.149414350756935],[-117.25866471126049,33.149714183579654],[-117.25864967441701,33.149719552238629],[-117.25863453331841,33.149724710738276],[-117.25861929334486,33.14972966083829],[-117.25860396197874,33.149734400674333],[-117.25858853599416,33.149738929370784],[-117.25857302711958,33.149743241421838],[-117.25855743324236,33.14974733954984],[-117.25854176509168,33.149751224569222],[-117.25852601937946,33.149754890194529],[-117.25851020578371,33.149758339052191],[-117.25849432748895,33.14976156841103],[-117.25847838875164,33.149764575531293],[-117.25846239393198,33.149767366689531],[-117.25844634509086,33.149769934655154],[-117.25843025082399,33.149772281161582],[-117.25841411112114,33.149774405307213],[-117.25839793023879,33.149776304352194],[-117.25838171785487,33.14977798092297],[-117.25836547289769,33.149779435028236],[-117.25834920283936,33.149780663901971],[-117.25833290979256,33.149781664821866],[-117.25831660132265,33.149782443136694],[-117.25830027848087,33.149782997034421],[-117.25828395199642,33.149783327329466],[-117.25826761322186,33.149783427780193],[-117.25825127830791,33.149783304567215],[-117.25823494724426,33.149782956788926],[-117.25821862641041,33.149782379884755],[-117.25820231588943,33.149781581067884],[-117.25818602635856,33.149780556644558],[-117.25816975677721,33.149779309328487],[-117.25815351780194,33.149777833622551],[-117.25813730523863,33.149776137676504],[-117.25812113295949,33.149774215967085],[-117.2581049967083,33.149772071234167],[-117.25808890395707,33.149769700711808],[-117.25807285805629,33.149767116095241],[-117.2580568706618,33.149764305567238],[-117.25804093753806,33.149761273670862],[-117.2580250630245,33.149758024879588],[-117.25800925780877,33.14975455640127],[-117.25799351978864,33.149750871860007],[-117.25797894768199,33.149747247268522],[-117.25752068187445,33.149674014728689],[-117.2575044324699,33.149672561566035],[-117.25748815159918,33.149671448610903],[-117.25747184248807,33.149670676738658],[-117.25745551374224,33.149670248584705],[-117.25743917924409,33.149670159527375],[-117.25742284868147,33.149670413094952],[-117.25740652846471,33.149671007431841],[-117.25739022824028,33.149671942459605],[-117.25737396515792,33.149673218038913],[-117.25735774457662,33.149674834126138],[-117.25734157077339,33.149676789784969],[-117.25732546621555,33.149679081225749],[-117.25730943098593,33.149681715661693],[-117.25729348203733,33.149684675822236],[-117.25727762377089,33.149687971590531],[-117.25726186792519,33.149691598362722],[-117.25724622302312,33.149695551560832],[-117.25723070090687,33.149699835597318],[-117.25721531214988,33.14970443776209],[-117.25720005788597,33.14970936345626],[-117.2571849573464,33.149714607113374],[-117.25717001799266,33.14972016506578],[-117.25715524833738,33.149726031834049],[-117.25714064835975,33.149732205614846],[-117.25712624806148,33.149738685262776],[-117.25711203448679,33.149745462767605],[-117.25709803012415,33.149752536143104],[-117.25708423918834,33.149759899043026],[-117.257070669141,33.149767547799875],[-117.25705732851534,33.149775478737411],[-117.25704422583465,33.149783687277811],[-117.25703137067312,33.149792167031237],[-117.25702544214784,33.149796225211134],[-117.2566852758015,33.150049100708529],[-117.25667434315402,33.150059309665075],[-117.25666366352502,33.150069708635016],[-117.2566532378932,33.150080289494873],[-117.25664307910041,33.150091050336997],[-117.25663318710517,33.150101987554748],[-117.25662356391676,33.150113089409437],[-117.2566142181619,33.150124360339674],[-117.25660515187062,33.150135790409941],[-117.25659636499107,33.15014737511212],[-117.25658786713925,33.150159111662902],[-117.25657966253017,33.150170993716031],[-117.25657174572187,33.150183014101849],[-117.25656413171008,33.150195171796966],[-117.25655681719668,33.150207459614265],[-117.25654980425294,33.150219871224877],[-117.25654309924812,33.150232401166704],[-117.25653670322316,33.15024504672617],[-117.25653061822877,33.150257799771033],[-117.25652485276763,33.150270653920188],[-117.2565194003982,33.150283608324237],[-117.25651427068473,33.150296655691697],[-117.25650946140077,33.150309788826803],[-117.25650497676152,33.150323001383185],[-117.2565008156332,33.150336287959782],[-117.25649698335452,33.150349646709699],[-117.25649348092506,33.150363071312718],[-117.25649030929279,33.150376550940472],[-117.25648747164234,33.150390082861833],[-117.2564866610747,33.150394272588393],[-117.25635871453177,33.151203370706824],[-117.25635572648127,33.151216878596159],[-117.25635227339525,33.151230310908538],[-117.25634835830282,33.151243651388079],[-117.25634397895659,33.151256891035651],[-117.25633914698156,33.15127001532904],[-117.2563338558634,33.151283017107303],[-117.25632812152504,33.15129588271494],[-117.25632194172942,33.151308604054613],[-117.25631532276286,33.151321168450856],[-117.25630827628132,33.1513335640864],[-117.25630080002722,33.151345781060456],[-117.2562929035645,33.151357812081486],[-117.25628459315887,33.151369642670709],[-117.25627587834332,33.151381262831578],[-117.2562667655077,33.151392668905245],[-117.25625725872223,33.151403841922125],[-117.2562473697775,33.151414781786478],[-117.25623710812386,33.151425471288476],[-117.25622647799703,33.151435905884966],[-117.25622418000188,33.151438084193238],[-117.25587504825305,33.151765240131482],[-117.25573048639538,33.151980795932026],[-117.25562748263624,33.152116307428194],[-117.25521313843309,33.152161544027642],[-117.255020626621,33.152182561839155],[-117.25482486423192,33.152203935737028],[-117.25465169361561,33.152222843924413],[-117.25447243085506,33.152242412615031],[-117.2542960170391,33.152261671210852],[-117.25407738829212,33.152285537635727],[-117.25397950018308,33.152297324498583],[-117.25388481626577,33.152303588364049],[-117.25321584936619,33.152377786168387],[-117.25152768733361,33.152636136254557],[-117.25054471969003,33.152740249222511],[-117.2500662455414,33.153763505689994],[-117.24852618025668,33.15394326082685],[-117.24842935223379,33.152298138812277]],[[-117.24587642914071,33.15054964582761],[-117.24644897278357,33.150365438853918],[-117.24646673980453,33.151924886869871],[-117.24466708113228,33.151990364640774],[-117.24325281895736,33.15203743603432],[-117.24295258485019,33.151204302208143],[-117.24431988039055,33.15105041919935],[-117.24463276163431,33.150949760604334],[-117.24587642914071,33.15054964582761]]]}},{"attributes":{"OBJECTID":48,"Campus":"Natural Reserves System","FeatureID":null,"SHAPE.STLength()":4787.8994282461463,"SHAPE.STArea()":720193.82709783618,"GlobalID":"{7BF98FB7-D037-4985-B152-25AC601EED62}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887901000,"Clery":"Yes","Region":"Kendall-Frost Mission Bay Marsh"},"geometry":{"rings":[[[-117.23008071919379,32.796091199152002],[-117.22992364278571,32.795564856660498],[-117.22809405519855,32.79595286709047],[-117.22805547628364,32.795825946013153],[-117.22780318690135,32.794995933214196],[-117.22758090739221,32.794264632908153],[-117.22919263973552,32.793783810725856],[-117.22928032441878,32.793409135808687],[-117.22931379370631,32.793266124444933],[-117.23018277188977,32.792693029591746],[-117.2307374683743,32.791960207699219],[-117.23074101198516,32.791955531032265],[-117.23106177099791,32.792988658197167],[-117.23112553231621,32.793194018783147],[-117.23109366773988,32.793254739680592],[-117.23108445362671,32.793263411083181],[-117.23080349522138,32.79320482352918],[-117.23029634658971,32.793541424918828],[-117.23031289107936,32.79356603029202],[-117.23016097046808,32.793657938122841],[-117.23011031614428,32.793784773546648],[-117.23006527915847,32.793831856113144],[-117.23005289752228,32.794181018475129],[-117.23010086784879,32.794397771390912],[-117.23011582930867,32.794864900696858],[-117.23048127030484,32.794952702802391],[-117.23048787981251,32.794974638536132],[-117.23077525889033,32.795928845510453],[-117.23008071919379,32.796091199152002]]]}},{"attributes":{"OBJECTID":49,"Campus":"Natural Reserves System","FeatureID":null,"SHAPE.STLength()":8100.4684131013628,"SHAPE.STArea()":1965844.003897093,"GlobalID":"{DE523E31-70A5-471C-A087-4806A491AA42}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887901000,"Clery":"Yes","Region":"Scripps Coastal Reserve - Land"},"geometry":{"rings":[[[-117.24694022518059,32.879690228993702],[-117.2471208649312,32.878671813209834],[-117.246523381334,32.878919579841209],[-117.24608664900178,32.879100680903704],[-117.24514860259622,32.878678720144819],[-117.24524440976379,32.878521224546802],[-117.24611019979977,32.87869299073261],[-117.24632468752705,32.878260458099213],[-117.24656388616648,32.877810518598352],[-117.24664975153969,32.877138337774845],[-117.24670224785648,32.876797940533834],[-117.24675331844797,32.876418230395032],[-117.24682845076939,32.875862420128492],[-117.24683421719179,32.875796408864041],[-117.24680604304972,32.875568729925845],[-117.246730240757,32.874956195408636],[-117.24681488737754,32.874952766708894],[-117.24724267610709,32.874263527331806],[-117.24946376991613,32.874281809106904],[-117.25165639092943,32.874301771483573],[-117.25170945559654,32.874300255573729],[-117.25152362707776,32.874910065031209],[-117.25151958687235,32.874923321033506],[-117.25151554568961,32.874936585159304],[-117.25151150441327,32.874949841169958],[-117.25150746637205,32.874963099859514],[-117.25133581296468,32.875526382867655],[-117.25131725707806,32.876286528513688],[-117.25131692160667,32.876300244134796],[-117.25131658829282,32.87631396154196],[-117.25131625285204,32.876327679868091],[-117.25131608900675,32.876334410049573],[-117.25131765605128,32.876341020699272],[-117.25149111446781,32.877073222242117],[-117.25127091765891,32.877075343169992],[-117.25081773230204,32.877079012050501],[-117.25076203680898,32.877131704207557],[-117.2506590925999,32.877239381719242],[-117.25060231251631,32.877320568845867],[-117.25056207682084,32.877371947208339],[-117.25052188046146,32.877426882639611],[-117.25048081639764,32.87746218498436],[-117.25038016278253,32.877523541590655],[-117.25033977839422,32.87756186194995],[-117.25031887486749,32.877579835319942],[-117.25029825480019,32.877622740660023],[-117.2502945156475,32.877665510237996],[-117.25028918130391,32.877691669884257],[-117.25027405818865,32.877723848597263],[-117.25024478873334,32.877749015302278],[-117.25021818642648,32.877761100375565],[-117.25016756981391,32.877766260520659],[-117.25011692446276,32.877767858968156],[-117.25005631761617,32.87776122299077],[-117.25000272277333,32.877750972833383],[-117.249929323082,32.877732576014331],[-117.24986160966291,32.877718878142517],[-117.24976851299131,32.877701821006447],[-117.24966700929858,32.877687207927146],[-117.24953802101956,32.877678700115631],[-117.24939307415787,32.877681060179526],[-117.24931019690334,32.877695975420174],[-117.24922325571617,32.877723983502833],[-117.24916008952472,32.877739927744045],[-117.2491150899789,32.877742667730047],[-117.24902910046994,32.877731492390332],[-117.24884030576206,32.877715207370493],[-117.24862422063111,32.877700387944842],[-117.24843140525296,32.877701944341233],[-117.24833572163149,32.877703905081582],[-117.2482274604191,32.877714282389384],[-117.24811368903157,32.877735379920423],[-117.2480153502669,32.877751608593726],[-117.24792835642978,32.877776051572724],[-117.24784381003747,32.877802216002586],[-117.24770104991281,32.877873413073964],[-117.24748978657161,32.877986706592438],[-117.24743949202566,32.878019167977399],[-117.24741577287213,32.878038357495143],[-117.24739773812193,32.878061057621188],[-117.24738392798396,32.878084910345123],[-117.24738131422578,32.878102740986009],[-117.2473817841576,32.878144287982906],[-117.24738917265054,32.878175097916184],[-117.24740924659527,32.878206992151831],[-117.24742938736847,32.87824600515308],[-117.24744938055539,32.87827077351195],[-117.24748762284105,32.878291838049044],[-117.2475370609571,32.878308053659005],[-117.2475723126432,32.87831370797791],[-117.24761450971619,32.878310992085112],[-117.24765237618712,32.878298815726843],[-117.24770843776567,32.878278177411886],[-117.24776429679669,32.878238550774235],[-117.24783693019167,32.878189293230577],[-117.24792918040606,32.878132750688707],[-117.24802279778459,32.878071445718383],[-117.24808159400085,32.87804366493345],[-117.2481082639746,32.878037511482013],[-117.2481364214128,32.878037284026441],[-117.24816323852167,32.878044193914882],[-117.24818026874118,32.878057115467996],[-117.24819744537943,32.878081905558872],[-117.24820055732515,32.878107998678566],[-117.24818115653623,32.87813545946841],[-117.24815043763448,32.878157079980433],[-117.24811128520376,32.878179950803066],[-117.24807639716491,32.87820634997761],[-117.24802084636498,32.878272097937902],[-117.24798351853195,32.878331753458347],[-117.24794065266306,32.878399775035128],[-117.24791309929842,32.878452233182699],[-117.24787774889313,32.878578080014819],[-117.24784912367299,32.878660226970752],[-117.24782710790858,32.87870551926548],[-117.24779393651777,32.878759209454934],[-117.24775785521484,32.87880461531897],[-117.24770636621942,32.878856078189926],[-117.24763933730343,32.878904108207699],[-117.24758206986286,32.878942559453627],[-117.24752493594551,32.878992885628755],[-117.24747899897019,32.879038365563801],[-117.2474121366006,32.879122789601993],[-117.24733423315382,32.879204146600074],[-117.24726905553564,32.879290149448572],[-117.24723718327776,32.879334334483303],[-117.24720275092317,32.879401093813691],[-117.24716965957433,32.879461902491478],[-117.24713648813332,32.879516780101802],[-117.24708253255658,32.879599137592606],[-117.24704378167743,32.879657615795786],[-117.24699111317342,32.879729272625923],[-117.24695377065929,32.879787748453602],[-117.24692690939182,32.879839789589766],[-117.24694022518059,32.879690228993702]]]}},{"attributes":{"OBJECTID":50,"Campus":"La Jolla Campus","FeatureID":null,"SHAPE.STLength()":3230.0856990923171,"SHAPE.STArea()":452118.77552441973,"GlobalID":"{C54FA55F-A61E-4D49-B0DC-247A6BFB0959}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887901000,"Clery":"Yes","Region":"La Jolla Del Sol"},"geometry":{"rings":[[[-117.22214515221053,32.86445605999252],[-117.22215299125796,32.864443739955938],[-117.22306616350745,32.864854327605435],[-117.22460120902464,32.864954708732149],[-117.22507924730226,32.864985972253749],[-117.22502891517895,32.865050690238576],[-117.22497318135109,32.865130029381682],[-117.22490390383609,32.865226494956012],[-117.22484204748797,32.865326489083152],[-117.22478786426599,32.865429605803591],[-117.22474157392155,32.865535424982873],[-117.22470336406734,32.865643518623408],[-117.22467339119557,32.865753446347334],[-117.22465177540498,32.86586476175021],[-117.22463860575265,32.86597701326032],[-117.22420725471508,32.86598039559923],[-117.22270713183919,32.865992141785476],[-117.22270728609921,32.865972169575599],[-117.22267264291149,32.865972439624194],[-117.22148667322428,32.865981634113105],[-117.22076491165552,32.865981700506424],[-117.22077117169304,32.865976151561874],[-117.22078241273287,32.865966212547903],[-117.22094049894451,32.865830288904277],[-117.22094312571321,32.865828388117613],[-117.22095534638005,32.865819307065777],[-117.22096732631211,32.865810003369674],[-117.22097905907907,32.865800475276458],[-117.22099054261368,32.8657907291147],[-117.22100176312621,32.865780774010275],[-117.2210127238119,32.865770609036367],[-117.22102341303773,32.865760245105491],[-117.22103382867685,32.865749683136144],[-117.22104396544701,32.86573892858047],[-117.22105381698742,32.865727985997189],[-117.22106338339776,32.865716864403069],[-117.22107265402381,32.865705566587174],[-117.22107630592714,32.865702060745875],[-117.22108704358358,32.865691729793319],[-117.22109775758334,32.865681385499563],[-117.22110844993382,32.865671016126107],[-117.2211191218726,32.865660636992899],[-117.22112976686986,32.865650237330399],[-117.22114039035722,32.865639825211538],[-117.22115098904979,32.865629393448238],[-117.22116156939785,32.865618945596736],[-117.22117212282433,32.865608479019286],[-117.22118265365253,32.865597998190623],[-117.2211931618626,32.865587501307324],[-117.22120364638612,32.865576988377889],[-117.22121410826168,32.865566456688931],[-117.22122454753902,32.865555910748746],[-117.22123495989472,32.865545346082627],[-117.22124535286743,32.865534768041769],[-117.22125571890849,32.865524170373291],[-117.22126606660511,32.865513556616783],[-117.22127638637151,32.86550292955264],[-117.22128668454832,32.865492282819005],[-117.22129695906847,32.865481622744156],[-117.22130721097058,32.865470946614955],[-117.22131744022464,32.865460251726176],[-117.22132763940174,32.865449542645038],[-117.2213378180975,32.865438817492624],[-117.22134797524357,32.865428076277361],[-117.2213581087032,32.865417319016011],[-117.22136821632955,32.86540654482372],[-117.22137830026941,32.865395754585379],[-117.22138836161108,32.865384950095958],[-117.22139840034463,32.865374130453702],[-117.22140840897134,32.865363293914193],[-117.22141840139039,32.865352441269806],[-117.22142836797619,32.865341571694557],[-117.22143830771016,32.865330689705111],[-117.22144822481609,32.865319790759635],[-117.22145811929403,32.865308874858059],[-117.22146798689027,32.865297943837312],[-117.22147783188835,32.865286998565537],[-117.22148764999481,32.865276037272984],[-117.22149744974679,32.865265058990758],[-117.22150721944185,32.865254068319643],[-117.22151696867549,32.865243063380632],[-117.22152669202617,32.865232037002478],[-117.22153638960347,32.865220999103542],[-117.22154606349427,32.865209945158604],[-117.22155571476705,32.865198875159308],[-117.22156534024649,32.865187791835851],[-117.22157494200968,32.865176689761483],[-117.22158559910739,32.865164396294581],[-117.22159553984041,32.865153511579067],[-117.22160545042684,32.86514260635969],[-117.22161532769131,32.865131683366542],[-117.22162517912258,32.865120743442631],[-117.22163500467093,32.865109782079458],[-117.22164479691718,32.865098804745998],[-117.22165455899695,32.865087805105297],[-117.22166429632192,32.865076789427079],[-117.22167400034492,32.865065757778567],[-117.22168367740657,32.865054703797604],[-117.22169332223463,32.865043633837935],[-117.22170294116987,32.865032541537474],[-117.22171252684284,32.865021436873413],[-117.2217220855546,32.865010309876979],[-117.22173161312108,32.864999168696798],[-117.22174110944279,32.86498800431621],[-117.2217505810296,32.864976825701468],[-117.22176001928456,32.86496562841144],[-117.22176942740295,32.864954411519321],[-117.22177880649306,32.864943178623342],[-117.22178815655477,32.864931929723511],[-117.22179747645006,32.864920658516532],[-117.22180676090666,32.864909371356227],[-117.22181602488206,32.864898068124802],[-117.22182525338894,32.864886746235008],[-117.22183445285754,32.864875407439754],[-117.22184362222941,32.864864052649068],[-117.22185276147479,32.864852679157934],[-117.22186186844675,32.864841286081635],[-117.22187094962554,32.864829879681324],[-117.22187999425751,32.864818453729342],[-117.22188900984122,32.86480700997032],[-117.22189799858322,32.86479555469905],[-117.22190695823727,32.864784078013955],[-117.22191587917776,32.864772579089127],[-117.22192477328659,32.864761069553715],[-117.22193363726888,32.864749541317977],[-117.22194247225281,32.864737999783557],[-117.22195127175834,32.864726438689146],[-117.22196004754771,32.864714858843989],[-117.2219687879284,32.864703265750492],[-117.22197749820256,32.86469165576009],[-117.22198617621343,32.864680027086209],[-117.22199482415765,32.864668385122002],[-117.22200344304375,32.864656724449112],[-117.22201202971645,32.864645049601116],[-117.2220205862627,32.864633356052849],[-117.22202910953705,32.864621649239552],[-117.22203760053829,32.864609922841083],[-117.22204606254127,32.864598183144004],[-117.22205449441778,32.864586424746662],[-117.22206289408093,32.864574652174241],[-117.22207126045237,32.864562864533497],[-117.22207959778572,32.86455105998747],[-117.22208790180747,32.864539238569719],[-117.22209617360589,32.864527402075254],[-117.22210441639612,32.864515551380542],[-117.22211262908986,32.864503684690582],[-117.22212080529677,32.864491803859259],[-117.22212895242578,32.864479902515946],[-117.22213706737136,32.864467989702675],[-117.22214515221053,32.86445605999252]]]}},{"attributes":{"OBJECTID":51,"Campus":"Hillcrest Campus","FeatureID":null,"SHAPE.STLength()":8140.7460926851199,"SHAPE.STArea()":2799164.6686579422,"GlobalID":"{BC80D097-0AC6-4472-B971-9D5B5D3CF2AE}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"Yes","Region":"Hillcrest"},"geometry":{"rings":[[[-117.16487175600734,32.75839941776902],[-117.16471863098609,32.758314100187803],[-117.16462897739895,32.75826414632531],[-117.16448475762505,32.757939499408991],[-117.1643132228234,32.757759692483603],[-117.16367220601049,32.757791290910745],[-117.16373294287045,32.757266954750875],[-117.1637025140229,32.757198076821481],[-117.163065408664,32.757012878634214],[-117.16291919896163,32.756798014720246],[-117.16289594061988,32.756774392511304],[-117.16235895289242,32.75622898557377],[-117.16252787602308,32.755929621197559],[-117.16251496138652,32.755559851617285],[-117.16235071285351,32.755561066191305],[-117.1623504332205,32.755528086119256],[-117.16277316066703,32.755522208502725],[-117.16277179396192,32.755390291853203],[-117.16277042727025,32.755258376105608],[-117.16276897510707,32.755118210044934],[-117.16276470413868,32.754705963981223],[-117.16276377311452,32.754563050965444],[-117.16276287659331,32.754425631111147],[-117.16276198334147,32.754288217545167],[-117.16276092442658,32.754126057779011],[-117.16275919416205,32.7538607778841],[-117.16300694238105,32.753859712295871],[-117.16304258636421,32.753859559456394],[-117.16314104397215,32.753805025665315],[-117.1631778601872,32.753858977690982],[-117.16320736841753,32.753858852179121],[-117.16321382857316,32.753858824204642],[-117.16322105490225,32.753858793264477],[-117.16334464629819,32.753858268022888],[-117.16353330459532,32.753857470137],[-117.16368291591152,32.753856834867953],[-117.163701395774,32.753856756636331],[-117.16381626477796,32.753856268460417],[-117.16394636543458,32.753855716951293],[-117.16401466452729,32.753855428351287],[-117.16405378296815,32.753855262106278],[-117.16407098871983,32.753855188749206],[-117.16408947178279,32.753855110435715],[-117.16417140510039,32.753854765828883],[-117.16417267385653,32.753854759133922],[-117.16417198347155,32.753815682716912],[-117.16417164970493,32.753796782857719],[-117.16425799678169,32.753796143084273],[-117.16425794585319,32.753791235275642],[-117.16425749920215,32.753748192991651],[-117.16425725528275,32.753724687266391],[-117.16425662786149,32.753664224651331],[-117.16425588635539,32.753592767931906],[-117.16425520189794,32.753526808715606],[-117.16425440336552,32.753449856296655],[-117.1642537189103,32.753383897080482],[-117.16425297741827,32.753312441263084],[-117.16425220740861,32.753238237145034],[-117.16425157998491,32.7531777736287],[-117.16425086701513,32.753109066112167],[-117.16425015407454,32.753040361300677],[-117.16424932700421,32.752960657876635],[-117.16424873599065,32.752903702771945],[-117.16424864255659,32.752894698660924],[-117.16427261155414,32.752894624756564],[-117.16453161055105,32.752893827104423],[-117.16464870673023,32.752893467718771],[-117.16481457748223,32.752892955808555],[-117.16488287985086,32.752892746051508],[-117.16488356474522,32.752958702558608],[-117.16488433531228,32.753032909377374],[-117.16488464923593,32.753063140683032],[-117.16488504877543,32.753101616890227],[-117.16488584785549,32.753178569304652],[-117.1648865042531,32.753241781118255],[-117.164887274797,32.753315985232327],[-117.16488795972602,32.753381944444911],[-117.16488875881116,32.753458896859662],[-117.16488947376993,32.753527747739014],[-117.16489018575237,32.753596311886248],[-117.16489092777293,32.753667768601858],[-117.16489149855158,32.753722734612573],[-117.16498907536828,32.753722436682686],[-117.16499558041387,32.753722416397672],[-117.1649954050592,32.753705531661616],[-117.16504294851448,32.753705061859904],[-117.16506625662623,32.753704832193911],[-117.16508670510187,32.753704630044027],[-117.16516505358369,32.7537038559826],[-117.16520111798305,32.753703500115691],[-117.16605213091908,32.753695233568941],[-117.16605155575397,32.753653668392296],[-117.16622209415318,32.75365240215941],[-117.16641950682913,32.753652530374467],[-117.16674161393888,32.753652738225234],[-117.16699847600952,32.753652903528874],[-117.16733674604326,32.753653119554791],[-117.16764574757465,32.753653315172485],[-117.1678929594807,32.753653471931763],[-117.16822147797147,32.753653678721641],[-117.16826376241673,32.7536537076057],[-117.16826422072286,32.753697680401771],[-117.16826493682716,32.753766387895745],[-117.16826565293253,32.753835095389746],[-117.16826636903905,32.753903802883812],[-117.16826717107968,32.753980755277297],[-117.16826788718856,32.754049462771547],[-117.16826854601911,32.754112674567963],[-117.16826926213014,32.754181382062306],[-117.16827000688676,32.754252837856576],[-117.16827075164463,32.754324293650832],[-117.16827141046988,32.754387504545832],[-117.16827209794076,32.75445346374071],[-117.16827281405729,32.754522171235379],[-117.16827350153966,32.754588131332021],[-117.16827370205282,32.754607369430609],[-117.16827453275101,32.75468707012466],[-117.16827524887137,32.754755777619557],[-117.16827596499287,32.754824485114604],[-117.16827586328232,32.75488219923367],[-117.16827575497524,32.754942659209718],[-117.16827564353581,32.755005890265686],[-117.16827553948394,32.755063584564013],[-117.16827541603097,32.755132318145904],[-117.16827528560856,32.755206526262157],[-117.16827516310011,32.755275248114501],[-117.1682750458704,32.755343964517223],[-117.16827489352349,32.755426410220188],[-117.16827477450698,32.755495160000834],[-117.16827468932387,32.75554186641935],[-117.16827464062855,32.755569343796125],[-117.16827454340698,32.755624314779929],[-117.16827588972853,32.755753484872315],[-117.16827602688377,32.75576172939067],[-117.16827714101873,32.755813948257028],[-117.16827856578468,32.75588265949682],[-117.16828010424844,32.75595685248873],[-117.16828146821074,32.756022801240256],[-117.16828300566871,32.756096999650232],[-117.16828425705326,32.756157471150203],[-117.16828562422305,32.756223419878054],[-117.1682873329449,32.756305858044151],[-117.16828898313634,32.756385547231105],[-117.16829204321125,32.756446002565617],[-117.16829364386152,32.756514692658754],[-117.16829524782838,32.756583393548212],[-117.16829697432333,32.756657604078093],[-117.16829761789286,32.756685049251153],[-117.16829838810156,32.756718091503181],[-117.16829941260497,32.756762015902204],[-117.16832393658834,32.758490651738434],[-117.16756897008179,32.75846054010124],[-117.16683757335556,32.758407791714475],[-117.16671621830847,32.75839903928528],[-117.1661693685537,32.758359603358372],[-117.16559954458653,32.758318501341151],[-117.16507437915573,32.758621933489117],[-117.16494839698247,32.758442119642012],[-117.16487175600734,32.75839941776902]],[[-117.1652680786593,32.752839404297411],[-117.16527276960976,32.75283795376388],[-117.16541236734253,32.753136493361524],[-117.1653798360551,32.753139174825819],[-117.16538316292491,32.753268341942302],[-117.16538528709115,32.753350770729952],[-117.16508282685163,32.75335301426567],[-117.16508200225435,32.753273313528105],[-117.16508060995672,32.753138645855735],[-117.16507852574833,32.752937359849291],[-117.1650805121711,32.752923743228259],[-117.1650855147906,32.752910688567098],[-117.16509335610485,32.752898675105598],[-117.16510374924,32.752888131495169],[-117.16511631507947,32.752879441082484],[-117.16513060124592,32.752872920126755],[-117.16514609265015,32.752868805999285],[-117.16515887943822,32.752866388270121],[-117.16517469298992,32.752863187018612],[-117.16519044237603,32.752859767117542],[-117.1652061243766,32.752856126787243],[-117.16522173263603,32.752852270583631],[-117.16523726394381,32.752848197628865],[-117.1652527140597,32.752843910659536],[-117.1652680786593,32.752839404297411]]]}},{"attributes":{"OBJECTID":53,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":2223.8301622032891,"SHAPE.STArea()":299566.63406388066,"GlobalID":"{850756E4-4A2F-4B8F-95E1-55E265147F78}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"No","Region":"East Medical Center"},"geometry":{"rings":[[[-117.05788360075969,32.7773380722616],[-117.05762750824761,32.777242726094393],[-117.05761258272189,32.777237263661007],[-117.05759755235651,32.777232008409214],[-117.05758242354726,32.777226959395506],[-117.05756719847831,32.777222122015793],[-117.05755188036815,32.777217498052636],[-117.05753647768931,32.777213080236507],[-117.05752098838974,32.777208877598298],[-117.0575054231344,32.777204889166391],[-117.05748978089728,32.77720111945618],[-117.05747406697365,32.777197563924297],[-117.05745828673325,32.777194226142484],[-117.05744244870633,32.77719110515325],[-117.05742654546283,32.777188205513767],[-117.05741059192891,32.777185525322977],[-117.0573992248403,32.777183752931165],[-117.05640543991481,32.777022592274896],[-117.05638978029499,32.777019013707211],[-117.05637575031645,32.777012138566654],[-117.05636429998115,32.77700243405797],[-117.05636230813148,32.776999511923144],[-117.05635620491974,32.776990558791638],[-117.05635202009154,32.776977318900798],[-117.05635202381217,32.776963617008029],[-117.05635280894808,32.776959717283546],[-117.05670604401377,32.775540415709997],[-117.05841895587037,32.775559832359178],[-117.05789553482299,32.777298431402706],[-117.05788360075969,32.7773380722616]]]}},{"attributes":{"OBJECTID":54,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":400.30051424737763,"SHAPE.STArea()":10015.017534265144,"GlobalID":"{41B01CED-22E7-4BE9-9CC8-CDA1480B7EA0}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887928000,"Clery":"Yes","Region":"Framework Apartments"},"geometry":{"rings":[[[-117.15241139609489,32.713906179083473],[-117.1524103196888,32.713768638075102],[-117.15273564479936,32.713766653118171],[-117.15273663163136,32.713903313782005],[-117.1527376331034,32.714041820203313],[-117.1524124724951,32.714043719190727],[-117.15241139609489,32.713906179083473]]]}},{"attributes":{"OBJECTID":60,"Campus":"Downtown Culture Center","FeatureID":null,"SHAPE.STLength()":944.08998085209578,"SHAPE.STArea()":51613.484222035142,"GlobalID":"{E34D872C-3C4C-424D-98ED-AA966B013512}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"Yes","Region":"Park and Market"},"geometry":{"rings":[[[-117.15398192578108,32.711691560595547],[-117.15398174598214,32.711669660423695],[-117.15401001962343,32.711669511791236],[-117.15454128661104,32.711666724641482],[-117.15454758861053,32.712491422671995],[-117.15398852089024,32.712493970836348],[-117.15398739136995,32.712356585318076],[-117.15398626186247,32.712219200701931],[-117.15398513341574,32.712081815176852],[-117.15398400498181,32.711944430553935],[-117.15398287547562,32.711807045037745],[-117.15398192578108,32.711691560595547]]]}},{"attributes":{"OBJECTID":63,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":1255.5975972196477,"SHAPE.STArea()":85215.677539055745,"GlobalID":"{E2CDB12F-D2CF-4887-A7EA-1A2370E77DA8}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887901000,"Clery":"No","Region":"1200 Garden View"},"geometry":{"rings":[[[-117.25969455827658,33.058360974762479],[-117.2596868825562,33.058131173415156],[-117.25966839992137,33.057769421720536],[-117.26044080475984,33.057773394145102],[-117.26105789658787,33.057776564228661],[-117.26104197538669,33.058329030195274],[-117.26060455253372,33.058324355766139],[-117.26047074356825,33.058325447867745],[-117.26045442541761,33.058325303304308],[-117.26043810768212,33.058325194804979],[-117.26041852864677,33.058325873988281],[-117.2604054703168,33.058325092336631],[-117.26038915072849,33.058325101974191],[-117.26037283155522,33.058325147675859],[-117.26035651281767,33.058325231245057],[-117.26034019452629,33.058325353583314],[-117.2603238766395,33.058325511084099],[-117.26030755922993,33.058325710058952],[-117.26029124226642,33.058325947802935],[-117.26027492891971,33.058326220683213],[-117.26025861281717,33.058326533260406],[-117.26024230038321,33.058326885482195],[-117.26022598516226,33.058327274696012],[-117.2602096768014,33.058327701724828],[-117.26019336567421,33.058328167549043],[-117.26017705819481,33.058328671214433],[-117.26016075117168,33.058329214550611],[-117.2601444477859,33.058329794826413],[-117.26012814485634,33.05833041477301],[-117.26011184554338,33.058331069855832],[-117.26009554774699,33.058331763699087],[-117.26007924934636,33.058332498123519],[-117.26006295778485,33.058333268559657],[-117.26004666666913,33.058334077764918],[-117.26003038028207,33.058334925704351],[-117.26001409325963,33.058335811520067],[-117.2599978131073,33.058336736052375],[-117.25998153442995,33.05833769573853],[-117.2599652583708,33.058338696881343],[-117.25994898379692,33.058339734079468],[-117.25993271502237,33.058340810003131],[-117.25991645099711,33.058341926464294],[-117.25990018948632,33.058343075365499],[-117.25988393277667,33.058344269312528],[-117.25986767965206,33.058345495690851],[-117.25985143021639,33.058346763517122],[-117.25983518335728,33.058348069193393],[-117.25981894120589,33.058349411800506],[-117.25980270590367,33.058350791321111],[-117.25978647423831,33.058352207781297],[-117.25977024628244,33.058353667492725],[-117.25975402195309,33.058355163242105],[-117.25973780873504,33.058356694066703],[-117.25972159492269,33.058358266374185],[-117.25970538798012,33.058359877398381],[-117.25969455827658,33.058360974762479]]]}},{"attributes":{"OBJECTID":66,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":1441.8564643150135,"SHAPE.STArea()":115833.11658602566,"GlobalID":"{27D3F489-3D94-4410-A3C1-E7A02FE87804}","created_user":"GIS","created_date":1761979811000,"last_edited_user":"GIS","last_edited_date":1775887928000,"Clery":"No","Region":"La Jolla Professional"},"geometry":{"rings":[[[-117.22703023923096,32.870382840647174],[-117.22704025442579,32.869331414955262],[-117.22717841405188,32.869453145712498],[-117.22841447162656,32.869406673833623],[-117.22841395612348,32.869407977334312],[-117.22841343956189,32.869409281745156],[-117.22841291976488,32.869410583476373],[-117.22841239995779,32.869411884305933],[-117.22841188016073,32.869413186037093],[-117.22841135718839,32.869414490498727],[-117.22841083738125,32.869415791328258],[-117.22841031437888,32.869417093084813],[-117.22840978814097,32.869418392161748],[-117.22840926943229,32.86941969568786],[-117.22840874639972,32.869420994739372],[-117.22840822019188,32.869422296521364],[-117.22840769397399,32.869423597401664],[-117.22840716773598,32.86942489647857],[-117.22840663832277,32.869426198285908],[-117.22840610886936,32.869427496486573],[-117.2284055826614,32.869428798268487],[-117.22840505000266,32.869430096494511],[-117.22840452055925,32.869431395596862],[-117.2284039879105,32.86943269472453],[-117.22840345845701,32.869433992925202],[-117.22840292260291,32.869435292078258],[-117.22840238887561,32.869436590312738],[-117.2284018561967,32.869437886735462],[-117.22840132034248,32.869439185888538],[-117.22840078447828,32.869440484139908],[-117.22840024538858,32.869441780613371],[-117.22839970949424,32.86944307615979],[-117.22839917043464,32.869444375338176],[-117.22839863134494,32.869445671811626],[-117.22839809117674,32.869446967391852],[-117.228397552087,32.869448263865273],[-117.22839700978184,32.869449559462424],[-117.22839646748673,32.869450855961269],[-117.22839592518157,32.869452151558413],[-117.22839537861265,32.869453448091086],[-117.2283948362773,32.869454740983187],[-117.22839429077679,32.869456037507383],[-117.22839374523613,32.869457330424886],[-117.22839319543169,32.869458624277925],[-117.22839264993112,32.869459920802065],[-117.22839210118507,32.869461213744955],[-117.22839155138055,32.869462507597952],[-117.22839100263447,32.869463800540856],[-117.22839045069306,32.869465094410813],[-117.22838990087843,32.869466387362102],[-117.22838934893703,32.869467681232059],[-117.22838879375006,32.869468971520654],[-117.22838824074012,32.869470265399052],[-117.22838768558323,32.869471558392696],[-117.22838713040625,32.869472849582969],[-117.22838657415079,32.869474139880069],[-117.22838601897378,32.86947543107032],[-117.22838545954301,32.869476724097815],[-117.22838490116064,32.86947801531349],[-117.22838434169977,32.869479305635899],[-117.22838378007192,32.869480593270318],[-117.22838322062104,32.869481884494462],[-117.22838266222855,32.86948317480843],[-117.22838210064076,32.86948446604945],[-117.228381534739,32.869485753717633],[-117.22838097208272,32.869487044967151],[-117.22838040404399,32.869488332652296],[-117.22837984135764,32.869489621196777],[-117.22837927652425,32.869490908856477],[-117.22837871062244,32.86949219652471],[-117.22837814256364,32.869493482406455],[-117.22837757348651,32.869494772805076],[-117.22837700545779,32.869496061391779],[-117.22837643635053,32.869497349085407],[-117.22837586400787,32.869498634099337],[-117.22837529277366,32.869499922711491],[-117.22837472043096,32.869501207725413],[-117.22837414812832,32.869502496345994],[-117.22837357364867,32.869503781376856],[-117.2283730013059,32.869505066390801],[-117.22837242576779,32.869506352331797],[-117.22837185128809,32.869507637362602],[-117.2283712725345,32.869508922427272],[-117.22837069379101,32.869510208393642],[-117.22837011503741,32.869511493458347],[-117.22836953736231,32.869512779416212],[-117.22836895857867,32.869514061775902],[-117.22836837982504,32.869515346840544],[-117.22836779784598,32.869516630127279],[-117.22836670789312,32.869519029291325],[-117.22822294349908,32.869835416810481],[-117.22821641014764,32.869849427591802],[-117.22820958194634,32.869863348728984],[-117.22820247260458,32.869877163881988],[-117.22819507782835,32.869890871281292],[-117.22818739973434,32.869904469106558],[-117.22817943931084,32.86991795013595],[-117.22817120508532,32.869931312498323],[-117.22816269489063,32.869944553505682],[-117.22815391077344,32.869957665025893],[-117.22814485377209,32.869970644345521],[-117.22813553883475,32.869983490444433],[-117.2281259509129,32.869996195325882],[-117.22811610818012,32.870008759747748],[-117.228106003067,32.870021175654152],[-117.22809564194414,32.870033439387605],[-117.22808503229066,32.87004555088884],[-117.22807416974248,32.870057502076577],[-117.22806306394583,32.87006929557969],[-117.22805171585875,32.870080921471235],[-117.22804013080356,32.870092377905571],[-117.22802830980854,32.870103661267521],[-117.22801625605898,32.870114769728183],[-117.22800397484716,32.870125698736985],[-117.22799146721135,32.870136445580393],[-117.22797874273763,32.870147007477179],[-117.22796580028741,32.870157378124034],[-117.22795264521305,32.870167558380309],[-117.2279392817282,32.870177542802075],[-117.22792571406669,32.870187327748788],[-117.22791194650236,32.870196913186469],[-117.22789798109193,32.870206291884962],[-117.22788382641328,32.870215466481419],[-117.2278694813178,32.870224429770843],[-117.22785495541157,32.870233180775536],[-117.2278402475862,32.870241715897144],[-117.22782536745781,32.870250035059492],[-117.22781031922018,32.870258131015341],[-117.22779510502035,32.870266004649352],[-117.2277797301906,32.870273655017598],[-117.22776419785625,32.870281074881298],[-117.22774851446835,32.870288267796226],[-117.22773268849431,32.87029522648151],[-117.22771671567054,32.870301951872463],[-117.22770061093547,32.870308442047289],[-117.22768436888686,32.87031469163837],[-117.22766800451326,32.870320703232089],[-117.2276515166762,32.870326470525264],[-117.22763491504203,32.870331997950075],[-117.22761819738383,32.870337277408453],[-117.22760137545475,32.870342308807274],[-117.22758445033338,32.870347093039705],[-117.22756743161601,32.870351628226288],[-117.22755032140959,32.870355911645099],[-117.22753312394809,32.870359939655614],[-117.22751584463403,32.870363717625466],[-117.22749849193508,32.870367238273772],[-117.22748106801839,32.870370504288516],[-117.22746357818635,32.870373512020727],[-117.2274460309968,32.87037626230444],[-117.22742842854673,32.870378751516071],[-117.22741077514029,32.870380982326779],[-117.22739308254056,32.870382955545175],[-117.22737534748231,32.870384665786666],[-117.22735758386574,32.870386113843018],[-117.22733979062248,32.870387299722637],[-117.22732197630044,32.870388223357914],[-117.2273041451636,32.870388883813355],[-117.22728630154606,32.870389286465091],[-117.22726845496393,32.870389422220555],[-117.22725060868295,32.870389296464218],[-117.2272318177621,32.870388878796902],[-117.22703023923096,32.870382840647174]]]}},{"attributes":{"OBJECTID":74,"Campus":"Downtown Culture Center","FeatureID":null,"SHAPE.STLength()":774.97761423551981,"SHAPE.STArea()":33256.491785749706,"GlobalID":"{AA3F5742-E334-40C9-A605-1806B3999162}","created_user":"GIS","created_date":1774579374000,"last_edited_user":"GIS","last_edited_date":1775887901000,"Clery":null,"Region":"Museum of Contemporary Art"},"geometry":{"rings":[[[-117.16932006347221,32.717521896934763],[-117.1693203851361,32.717061124871613],[-117.16973756944614,32.717061338378279],[-117.16973725309711,32.717522104106948],[-117.16973708203723,32.717773639243724],[-117.16963544843362,32.717773589134914],[-117.16931989122178,32.717773432070977],[-117.16932006347221,32.717521896934763]]]}}]} diff --git a/lib/core/services/esri_map_services/esrimap_boundary_service.dart b/lib/core/services/esri_map_services/esrimap_boundary_service.dart new file mode 100644 index 000000000..482a00955 --- /dev/null +++ b/lib/core/services/esri_map_services/esrimap_boundary_service.dart @@ -0,0 +1,223 @@ +/// ============================================================================ +/// File: esrimap_boundary_service.dart +/// Description: Service providing UC San Diego campus boundary geometry loading +/// and constructing subtle off-campus vignette masks with feathered +/// perimeter highlighting to stylize non-campus map regions. +/// ============================================================================ + +import 'dart:convert'; +import 'package:arcgis_maps/arcgis_maps.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_basemaps.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart' show rootBundle; +import 'package:http/http.dart' as http; + +/// Service managing campus boundary geometry and vignette overlay graphic generation. +class EsriMapBoundaryService { + /// Singleton instance accessor. + static final EsriMapBoundaryService instance = EsriMapBoundaryService._(); + EsriMapBoundaryService._(); + + /// Asset bundle path for pre-packaged campus boundary JSON geometry. + static const String BOUNDARY_ASSET_PATH = 'assets/esri_map_assets/ucsd_boundary.json'; + + /// Live REST endpoint querying official UCSD campus boundary features (Layer 3). + static const String BOUNDARY_SERVICE_URL = + 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/AdministrationServices/Areas_and_Boundaries/MapServer/3/query?where=1%3D1&outFields=*&returnGeometry=true&outSR=4326&f=json'; + + List? _cachedPolygons; + + /// Loads and caches UC San Diego campus boundary [Polygon] geometries. + /// First attempts to read from bundled local asset, with live network fallback. + Future> loadCampusBoundaries() async { + if (_cachedPolygons != null && _cachedPolygons!.isNotEmpty) { + return _cachedPolygons!; + } + + String? jsonString; + + // 1. Attempt loading from bundled offline asset for instant startup + try { + jsonString = await rootBundle.loadString(BOUNDARY_ASSET_PATH); + } catch (e) { + debugPrint('Local boundary asset load failed ($e), falling back to remote endpoint...'); + } + + // 2. Fallback to live REST query if local asset was unavailable + if (jsonString == null || jsonString.isEmpty) { + try { + final response = await http.get(Uri.parse(BOUNDARY_SERVICE_URL)).timeout(const Duration(seconds: 6)); + if (response.statusCode == 200) { + jsonString = response.body; + } + } catch (e) { + debugPrint('Remote boundary fetch failed: $e'); + } + } + + if (jsonString == null || jsonString.isEmpty) { + return []; + } + + // 3. Deserialize JSON features into ArcGIS Polygon geometries + try { + final data = jsonDecode(jsonString) as Map; + final features = data['features'] as List? ?? []; + final polygons = []; + + for (final feature in features) { + final geometryMap = feature['geometry'] as Map?; + if (geometryMap != null && geometryMap['rings'] != null) { + final poly = Geometry.fromJson({ + 'rings': geometryMap['rings'], + 'spatialReference': {'wkid': 4326}, + }); + if (poly is Polygon) { + polygons.add(poly); + } + } + } + + _cachedPolygons = polygons; + return polygons; + } catch (e) { + debugPrint('Failed to parse boundary geometries: $e'); + return []; + } + } + + /// Constructs vignette overlay graphics (inverted off-campus mask + feathered perimeter lines). + /// + /// The inverted mask covers the region outside the campus perimeter with a soft translucent + /// tint, while multi-tiered feathered perimeter lines create a smooth aesthetic glow around + /// UC San Diego. + List createVignetteGraphics({ + required BasemapType basemapType, + required List campusBoundaries, + }) { + if (campusBoundaries.isEmpty) return []; + + final graphics = []; + + // Theme-specific color configuration + final (maskColor, primaryStrokeColor, glow1Color, glow2Color) = _getColorsForBasemap(basemapType); + + // ------------------------------------------------------------------------- + // 1. Inverted Mask (Dims off-campus areas, keeping campus 100% vibrant) + // ------------------------------------------------------------------------- + try { + // Large bounding box encompassing the world in WGS84 + final outerBox = Geometry.fromJson({ + 'rings': [ + [ + [-180.0, -85.0], + [-180.0, 85.0], + [180.0, 85.0], + [180.0, -85.0], + [-180.0, -85.0], + ], + ], + 'spatialReference': {'wkid': 4326}, + }); + + // Subtract all campus boundary polygons from the world box to create a cutout hole + Geometry maskedArea = outerBox; + for (final boundary in campusBoundaries) { + final diff = GeometryEngine.difference(geometry1: maskedArea, geometry2: boundary); + if (diff != null) { + maskedArea = diff; + } + } + + final maskSymbol = SimpleFillSymbol( + style: SimpleFillSymbolStyle.solid, + color: maskColor, + outline: null, + ); + + graphics.add(Graphic(geometry: maskedArea, symbol: maskSymbol)); + } catch (e) { + debugPrint('Error constructing inverted vignette mask: $e'); + } + + // ------------------------------------------------------------------------- + // 2. Feathered Perimeter Highlighting (Soft glow rings around campus boundary) + // ------------------------------------------------------------------------- + for (final boundary in campusBoundaries) { + try { + final polyline = boundary.toPolyline(); + + // Outer glow layer 2 (Widest, most diffuse feather ring) + graphics.add( + Graphic( + geometry: polyline, + symbol: SimpleLineSymbol( + style: SimpleLineSymbolStyle.solid, + color: glow2Color, + width: 8.0, + ), + ), + ); + + // Outer glow layer 1 (Medium feather ring) + graphics.add( + Graphic( + geometry: polyline, + symbol: SimpleLineSymbol( + style: SimpleLineSymbolStyle.solid, + color: glow1Color, + width: 4.5, + ), + ), + ); + + // Crisp primary boundary stroke (UCSD Navy / Brand Accent) + graphics.add( + Graphic( + geometry: polyline, + symbol: SimpleLineSymbol( + style: SimpleLineSymbolStyle.solid, + color: primaryStrokeColor, + width: 1.8, + ), + ), + ); + } catch (e) { + debugPrint('Error creating boundary perimeter lines: $e'); + } + } + + return graphics; + } + + /// Returns styling colors matched to the active [BasemapType]. + (Color mask, Color primaryStroke, Color glow1, Color glow2) _getColorsForBasemap(BasemapType type) { + switch (type) { + case BasemapType.dark: + return ( + const Color(0x38000000), // ~22% dark dimming + const Color(0xAA00629B), // Bright UCSD blue stroke + const Color(0x3500629B), // Medium blue glow + const Color(0x1500629B), // Diffuse blue glow + ); + + case BasemapType.satellite: + return ( + const Color(0x22000000), // ~13% soft vignette + const Color(0xCCFFCD00), // UCSD Gold stroke on satellite + const Color(0x40FFCD00), // Medium gold glow + const Color(0x18FFCD00), // Diffuse gold glow + ); + + case BasemapType.defaultMap: + case BasemapType.light: + default: + return ( + const Color(0x1F000000), // ~12% soft neutral dimming + const Color(0x9900629B), // UCSD Navy stroke + const Color(0x3000629B), // Medium navy glow + const Color(0x1200629B), // Diffuse navy glow + ); + } + } +} diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 072871397..79ee898c4 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -14,6 +14,7 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_s import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_auth_handler.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_basemap_factory.dart'; +import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_boundary_service.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_config_service.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_route_service.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_search_service.dart'; @@ -50,8 +51,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // --------------------------------------------------------------------------- final _mapViewController = ArcGISMapView.createController(); late final ArcGISMap _map; + final _vignetteGraphicsOverlay = GraphicsOverlay(); final _graphicsOverlay = GraphicsOverlay(); final _routeGraphicsOverlay = GraphicsOverlay(); + List _campusBoundaries = []; final _searchController = TextEditingController(); final _fromController = TextEditingController(); @@ -211,6 +214,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.selectionProperties = SelectionProperties(color: const Color(0xFF34C759)); _mapViewController.interactionOptions.rotateEnabled = true; + final isVignetteOverlayMissing = !_mapViewController.graphicsOverlays.contains(_vignetteGraphicsOverlay); + if (isVignetteOverlayMissing) _mapViewController.graphicsOverlays.add(_vignetteGraphicsOverlay); final isGraphicsOverlayMissing = !_mapViewController.graphicsOverlays.contains(_graphicsOverlay); if (isGraphicsOverlayMissing) _mapViewController.graphicsOverlays.add(_graphicsOverlay); final isRouteOverlayMissing = !_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay); @@ -221,6 +226,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.locationDisplay.autoPanMode = LocationDisplayAutoPanMode.off; _startLocationDisplay(); + _initCampusBoundaryVignette(); _preloadAlternateBasemaps(); _preloadHeavyLayers(); @@ -338,6 +344,29 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } + /// Loads campus boundary polygons and renders the stylized off-campus vignette mask. + Future _initCampusBoundaryVignette() async { + try { + final boundaries = await EsriMapBoundaryService.instance.loadCampusBoundaries(); + if (!mounted || boundaries.isEmpty) return; + _campusBoundaries = boundaries; + _updateVignetteGraphics(); + } catch (e) { + debugPrint('Failed to load campus boundary vignette: $e'); + } + } + + /// Updates vignette graphics based on the current basemap theme (Default, Light, Dark, Satellite). + void _updateVignetteGraphics() { + if (_campusBoundaries.isEmpty) return; + final graphics = EsriMapBoundaryService.instance.createVignetteGraphics( + basemapType: _currentBasemapType, + campusBoundaries: _campusBoundaries, + ); + _vignetteGraphicsOverlay.graphics.clear(); + _vignetteGraphicsOverlay.graphics.addAll(graphics); + } + /// Switches active basemap without resetting viewpoint frame. void _switchBasemap(BasemapType newType) { final isSameType = newType == _currentBasemapType; @@ -349,6 +378,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { setState(() { _map.basemap = newBasemap; _currentBasemapType = newType; + _updateVignetteGraphics(); }); } diff --git a/test/core/services/esrimap_boundary_service_test.dart b/test/core/services/esrimap_boundary_service_test.dart new file mode 100644 index 000000000..81a45d60d --- /dev/null +++ b/test/core/services/esrimap_boundary_service_test.dart @@ -0,0 +1,46 @@ +import 'dart:convert'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_basemaps.dart'; +import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_boundary_service.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + TestWidgetsFlutterBinding.ensureInitialized(); + + group('EsriMapBoundaryService & Campus Boundary Asset', () { + test('ucsd_boundary.json asset is present and contains valid polygon rings', () async { + final jsonString = await rootBundle.loadString(EsriMapBoundaryService.BOUNDARY_ASSET_PATH); + expect(jsonString, isNotEmpty); + + final data = jsonDecode(jsonString) as Map; + final features = data['features'] as List?; + expect(features, isNotNull); + expect(features!.isNotEmpty, isTrue); + + // Verify that features contain geometry with coordinates / rings + for (final feature in features) { + final geometry = (feature as Map)['geometry'] as Map?; + expect(geometry, isNotNull); + final rings = geometry!['rings'] as List?; + expect(rings, isNotNull); + expect(rings!.isNotEmpty, isTrue); + } + }); + + test('createVignetteGraphics returns empty list when given empty boundaries', () { + final graphics = EsriMapBoundaryService.instance.createVignetteGraphics( + basemapType: BasemapType.defaultMap, + campusBoundaries: [], + ); + expect(graphics, isEmpty); + }); + + test('Boundary service constants are configured properly', () { + expect(EsriMapBoundaryService.BOUNDARY_ASSET_PATH, 'assets/esri_map_assets/ucsd_boundary.json'); + expect( + EsriMapBoundaryService.BOUNDARY_SERVICE_URL, + contains('Areas_and_Boundaries/MapServer/3'), + ); + }); + }); +} From 59e3ff94558bd080be90fae26dd4ccb1062ceac0 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 11:30:43 -0700 Subject: [PATCH 061/139] restored geographical visibility outside ucsd --- assets/esri_map_assets/mapConfig.json | 24 +++++ .../esrimap_basemap_factory.dart | 92 ++++++++++++------- .../esrimap_basemap_factory_test.dart | 31 ++++--- 3 files changed, 99 insertions(+), 48 deletions(-) diff --git a/assets/esri_map_assets/mapConfig.json b/assets/esri_map_assets/mapConfig.json index a9fe0914c..39862d675 100644 --- a/assets/esri_map_assets/mapConfig.json +++ b/assets/esri_map_assets/mapConfig.json @@ -17,6 +17,14 @@ "label": "Default", "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/default-thumbnail.png", "baseLayers": [ + { + "type": "arcgisTiled", + "serviceKey": "hillshade" + }, + { + "type": "arcgisTiled", + "serviceKey": "lightGrayBase" + }, { "type": "arcgisVectorTiled", "portalKey": "age", @@ -28,6 +36,14 @@ "label": "Light", "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/light-thumbnail.png", "baseLayers": [ + { + "type": "arcgisTiled", + "serviceKey": "hillshade" + }, + { + "type": "arcgisTiled", + "serviceKey": "lightGrayBase" + }, { "type": "arcgisVectorTiled", "portalKey": "age", @@ -39,6 +55,14 @@ "label": "Dark", "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/dark-thumbnail.png", "baseLayers": [ + { + "type": "arcgisTiled", + "serviceKey": "hillshade" + }, + { + "type": "arcgisTiled", + "serviceKey": "darkGrayBase" + }, { "type": "arcgisVectorTiled", "portalKey": "age", diff --git a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart index 31628fa40..83508502c 100644 --- a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart +++ b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart @@ -10,52 +10,77 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_c /// Constructs an ArcGIS [Basemap] for the requested [type] using configuration settings in [config]. /// -/// Vector Tile Basemaps ([BasemapStyle.arcGISLightGrayBase] and [BasemapStyle.arcGISDarkGrayBase]) -/// are used as the foundation layer because they provide seamless worldwide vector coverage down -/// to room/building level (Level 22+) without triggering "Map data not yet available" raster tile cutoffs. -/// Custom UCSD campus vector tile layers are layered on top. +/// Public ArcGIS tiled MapServer layers (e.g. World_Light_Gray_Base, World_Hillshade, World_Dark_Gray_Base) +/// provide the geographical base imagery (coastlines, islands, terrain, ocean) as a background. +/// +/// To prevent the "Map data not yet available" raster watermark tiles from ever appearing when zooming in +/// closer than Level 16 (scale ~1:9,000), [NoDataTileBehavior.upSample] and [maxScale] = 0 are configured +/// on each tiled layer. This automatically stretches and resamples the coarser tiles smoothly in the background, +/// while the custom UCSD campus vector tile layer draws sharp building and street details on top. Basemap buildBasemap(BasemapType type, EsriMapConfig config) { - // 1. Satellite Basemap: Use global World Imagery layer. + // 1. Satellite Basemap: Use global World Imagery layer with tile upsampling. if (type == BasemapType.satellite) { final basemap = Basemap(); - basemap.baseLayers.add( - ArcGISTiledLayer.withUri( - Uri.parse('https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer'), - ), + final tiledLayer = ArcGISTiledLayer.withUri( + Uri.parse('https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer'), ); + tiledLayer.noDataTileBehavior = NoDataTileBehavior.upSample; + tiledLayer.maxScale = 0; + basemap.baseLayers.add(tiledLayer); return basemap; } - // 2. Vector Basemaps: Initialize with global vector tile base styles. - // arcGISLightGrayBase for Default/Light, and arcGISDarkGrayBase for Dark mode. - final basemap = switch (type) { - BasemapType.dark => Basemap.withStyle(BasemapStyle.arcGISDarkGrayBase), - _ => Basemap.withStyle(BasemapStyle.arcGISLightGrayBase), - }; - - // 3. Retrieve campus vector tile layer specifications from configuration. final entry = config.basemaps[basemapKey(type)]; + final isEntryNull = entry == null; + if (isEntryNull) return Basemap(); + + final basemap = Basemap(); final portalUrl = config.portals['age'] ?? 'https://admin-enterprise-gis.ucsd.edu/portal'; - // Extract vector layers from config entry if present (ignoring legacy raster arcgisTiled layers) - final vectorLayers = entry?.baseLayers.where((l) => l.type == 'arcgisVectorTiled').toList() ?? []; + // 2. Iterate through configured base layers + for (final layer in entry.baseLayers) { + switch (layer.type) { + case 'arcgisTiled': + final hasServiceKey = layer.serviceKey != null; + final url = hasServiceKey ? config.serviceUrls[layer.serviceKey!] : null; + final isUrlNotNull = url != null; + if (isUrlNotNull) { + final tiledLayer = ArcGISTiledLayer.withUri(Uri.parse(url)); + // Key fix: Upsample coarser tiles instead of displaying "Map data not yet available" watermark + tiledLayer.noDataTileBehavior = NoDataTileBehavior.upSample; + tiledLayer.maxScale = 0; + basemap.baseLayers.add(tiledLayer); + } + break; - if (vectorLayers.isNotEmpty) { - for (final layer in vectorLayers) { - final pUrl = layer.portalKey != null ? config.portals[layer.portalKey!] : portalUrl; - if (pUrl != null && layer.itemId != null) { - basemap.baseLayers.add( - ArcGISVectorTiledLayer.withItem( - PortalItem.withPortalAndItemId( - portal: Portal(Uri.parse(pUrl)), - itemId: layer.itemId!, + case 'arcgisVectorTiled': + final pUrl = layer.portalKey != null ? config.portals[layer.portalKey!] : portalUrl; + if (pUrl != null && layer.itemId != null) { + basemap.baseLayers.add( + ArcGISVectorTiledLayer.withItem( + PortalItem.withPortalAndItemId( + portal: Portal(Uri.parse(pUrl)), + itemId: layer.itemId!, + ), ), - ), - ); - } + ); + } + break; + + case 'arcgisMapImage': + final hasServiceKey = layer.serviceKey != null; + final url = hasServiceKey ? config.serviceUrls[layer.serviceKey!] : null; + final isUrlNotNull = url != null; + if (isUrlNotNull) { + basemap.baseLayers.add(ArcGISMapImageLayer.withUri(Uri.parse(url))); + } + break; } - } else { - // Fallback: Use known default UCSD campus vector layer item IDs if config entry is missing + } + + // 3. Fallback: If no vector layer was present in the config, append known UCSD vector layer + final hasVectorLayer = basemap.baseLayers.any((l) => l is ArcGISVectorTiledLayer); + if (!hasVectorLayer) { final fallbackItemId = switch (type) { BasemapType.light => '6643ee62af494f5bafe7dfdb8eb3f857', BasemapType.dark => '09d7b3934b6c4c2cad8380c04e08c1b1', @@ -74,4 +99,3 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { return basemap; } - diff --git a/test/core/services/esrimap_basemap_factory_test.dart b/test/core/services/esrimap_basemap_factory_test.dart index 1abc1cafd..16c6a160f 100644 --- a/test/core/services/esrimap_basemap_factory_test.dart +++ b/test/core/services/esrimap_basemap_factory_test.dart @@ -7,32 +7,35 @@ import 'package:flutter_test/flutter_test.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); - group('EsriMapConfig & Vector Tile Basemaps', () { - test('mapConfig.json parses vector tile basemap configurations correctly', () async { + group('EsriMapConfig & Vector/Tiled Basemaps', () { + test('mapConfig.json parses geographical basemap configurations correctly', () async { final configString = await rootBundle.loadString('assets/esri_map_assets/mapConfig.json'); final jsonMap = jsonDecode(configString) as Map; final config = EsriMapConfig.fromJson(jsonMap); - // Verify Default basemap uses vector tiled layer without legacy raster layers + // Verify Default basemap includes hillshade, lightGrayBase, and campus vector tile final defaultBasemap = config.basemaps['defaultMap']; expect(defaultBasemap, isNotNull); - expect(defaultBasemap!.baseLayers.length, 1); - expect(defaultBasemap.baseLayers.first.type, 'arcgisVectorTiled'); - expect(defaultBasemap.baseLayers.first.itemId, 'e19f33d2c1f44967aef673306c483913'); + expect(defaultBasemap!.baseLayers.length, 3); + expect(defaultBasemap.baseLayers.any((l) => l.serviceKey == 'hillshade'), isTrue); + expect(defaultBasemap.baseLayers.any((l) => l.serviceKey == 'lightGrayBase'), isTrue); + expect(defaultBasemap.baseLayers.any((l) => l.itemId == 'e19f33d2c1f44967aef673306c483913'), isTrue); - // Verify Light basemap uses vector tiled layer + // Verify Light basemap includes hillshade, lightGrayBase, and campus vector tile final lightBasemap = config.basemaps['light']; expect(lightBasemap, isNotNull); - expect(lightBasemap!.baseLayers.length, 1); - expect(lightBasemap.baseLayers.first.type, 'arcgisVectorTiled'); - expect(lightBasemap.baseLayers.first.itemId, '6643ee62af494f5bafe7dfdb8eb3f857'); + expect(lightBasemap!.baseLayers.length, 3); + expect(lightBasemap.baseLayers.any((l) => l.serviceKey == 'hillshade'), isTrue); + expect(lightBasemap.baseLayers.any((l) => l.serviceKey == 'lightGrayBase'), isTrue); + expect(lightBasemap.baseLayers.any((l) => l.itemId == '6643ee62af494f5bafe7dfdb8eb3f857'), isTrue); - // Verify Dark basemap uses vector tiled layer + // Verify Dark basemap includes hillshade, darkGrayBase, and campus vector tile final darkBasemap = config.basemaps['dark']; expect(darkBasemap, isNotNull); - expect(darkBasemap!.baseLayers.length, 1); - expect(darkBasemap.baseLayers.first.type, 'arcgisVectorTiled'); - expect(darkBasemap.baseLayers.first.itemId, '09d7b3934b6c4c2cad8380c04e08c1b1'); + expect(darkBasemap!.baseLayers.length, 3); + expect(darkBasemap.baseLayers.any((l) => l.serviceKey == 'hillshade'), isTrue); + expect(darkBasemap.baseLayers.any((l) => l.serviceKey == 'darkGrayBase'), isTrue); + expect(darkBasemap.baseLayers.any((l) => l.itemId == '09d7b3934b6c4c2cad8380c04e08c1b1'), isTrue); // Verify Satellite basemap uses worldImagery final satelliteBasemap = config.basemaps['satellite']; From f5477651e3df88a0ec25f671ef2a41e06e1245fb Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 11:49:40 -0700 Subject: [PATCH 062/139] Added a maximum zoom limit of 2ft and added a zoom scale widget --- assets/esri_map_assets/mapConfig.json | 29 +- .../esrimap_basemap_factory.dart | 107 ++++---- .../esri_map_widgets/esrimap_scale_bar.dart | 256 ++++++++++++++++++ lib/ui/esrimap/esrimap.dart | 24 +- .../esrimap_basemap_factory_test.dart | 25 +- test/ui/esrimap/esrimap_scale_bar_test.dart | 109 ++++++++ 6 files changed, 458 insertions(+), 92 deletions(-) create mode 100644 lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart create mode 100644 test/ui/esrimap/esrimap_scale_bar_test.dart diff --git a/assets/esri_map_assets/mapConfig.json b/assets/esri_map_assets/mapConfig.json index 39862d675..0f8593814 100644 --- a/assets/esri_map_assets/mapConfig.json +++ b/assets/esri_map_assets/mapConfig.json @@ -1,7 +1,7 @@ { "portals": { "age": "https://admin-enterprise-gis.ucsd.edu/portal", - "ago": "https://ucsd-admin.maps.arcgis.com" + "ago": "https://www.arcgis.com" }, "serviceUrls": { @@ -18,12 +18,9 @@ "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/default-thumbnail.png", "baseLayers": [ { - "type": "arcgisTiled", - "serviceKey": "hillshade" - }, - { - "type": "arcgisTiled", - "serviceKey": "lightGrayBase" + "type": "arcgisVectorTiled", + "portalKey": "ago", + "itemId": "291da5eab3a0412593b66d384379f89f" }, { "type": "arcgisVectorTiled", @@ -37,12 +34,9 @@ "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/light-thumbnail.png", "baseLayers": [ { - "type": "arcgisTiled", - "serviceKey": "hillshade" - }, - { - "type": "arcgisTiled", - "serviceKey": "lightGrayBase" + "type": "arcgisVectorTiled", + "portalKey": "ago", + "itemId": "291da5eab3a0412593b66d384379f89f" }, { "type": "arcgisVectorTiled", @@ -56,12 +50,9 @@ "thumbnailAsset": "https://dvsbke0idzv4u.cloudfront.net/thumbnails/dark-thumbnail.png", "baseLayers": [ { - "type": "arcgisTiled", - "serviceKey": "hillshade" - }, - { - "type": "arcgisTiled", - "serviceKey": "darkGrayBase" + "type": "arcgisVectorTiled", + "portalKey": "ago", + "itemId": "5e9b3685f4c24d8781073dd928ebda50" }, { "type": "arcgisVectorTiled", diff --git a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart index 83508502c..c804c5ab1 100644 --- a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart +++ b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart @@ -10,77 +10,68 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_c /// Constructs an ArcGIS [Basemap] for the requested [type] using configuration settings in [config]. /// -/// Public ArcGIS tiled MapServer layers (e.g. World_Light_Gray_Base, World_Hillshade, World_Dark_Gray_Base) -/// provide the geographical base imagery (coastlines, islands, terrain, ocean) as a background. -/// -/// To prevent the "Map data not yet available" raster watermark tiles from ever appearing when zooming in -/// closer than Level 16 (scale ~1:9,000), [NoDataTileBehavior.upSample] and [maxScale] = 0 are configured -/// on each tiled layer. This automatically stretches and resamples the coarser tiles smoothly in the background, -/// while the custom UCSD campus vector tile layer draws sharp building and street details on top. +/// To provide complete geographical background (coastlines, ocean, islands, regional streets) +/// without ever displaying "Map data not yet available" raster watermarks or requiring API keys: +/// 1. Public Esri Living Atlas Vector Tile base layers are used as the foundation (Light Gray / Dark Gray Canvas Base). +/// Vector tiles scale seamlessly to building/room level (Level 22+) without tile cutoff watermarks. +/// 2. Custom UC San Diego campus vector tile layers are layered directly on top to display campus-specific facilities. Basemap buildBasemap(BasemapType type, EsriMapConfig config) { - // 1. Satellite Basemap: Use global World Imagery layer with tile upsampling. + // 1. Satellite Basemap: Use global World Imagery layer. if (type == BasemapType.satellite) { final basemap = Basemap(); - final tiledLayer = ArcGISTiledLayer.withUri( - Uri.parse('https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer'), + basemap.baseLayers.add( + ArcGISTiledLayer.withUri( + Uri.parse('https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer'), + ), ); - tiledLayer.noDataTileBehavior = NoDataTileBehavior.upSample; - tiledLayer.maxScale = 0; - basemap.baseLayers.add(tiledLayer); return basemap; } - final entry = config.basemaps[basemapKey(type)]; - final isEntryNull = entry == null; - if (isEntryNull) return Basemap(); - final basemap = Basemap(); + + // 2. Global Public Vector Tile Base (Coastlines, ocean, off-campus streets, islands) + // Living Atlas Item IDs (100% public, keyless vector tile services hosted by Esri): + // - Light Gray Canvas Base: 291da5eab3a0412593b66d384379f89f + // - Dark Gray Canvas Base: 5e9b3685f4c24d8781073dd928ebda50 + final globalBaseItemId = switch (type) { + BasemapType.dark => '5e9b3685f4c24d8781073dd928ebda50', + _ => '291da5eab3a0412593b66d384379f89f', + }; + + basemap.baseLayers.add( + ArcGISVectorTiledLayer.withItem( + PortalItem.withPortalAndItemId( + portal: Portal.arcGISOnline(), + itemId: globalBaseItemId, + ), + ), + ); + + // 3. Custom UC San Diego Campus Vector Tile Layer (campus buildings, walkways, landscaping) + final entry = config.basemaps[basemapKey(type)]; final portalUrl = config.portals['age'] ?? 'https://admin-enterprise-gis.ucsd.edu/portal'; + final vectorLayers = entry?.baseLayers.where((l) => l.type == 'arcgisVectorTiled').toList() ?? []; - // 2. Iterate through configured base layers - for (final layer in entry.baseLayers) { - switch (layer.type) { - case 'arcgisTiled': - final hasServiceKey = layer.serviceKey != null; - final url = hasServiceKey ? config.serviceUrls[layer.serviceKey!] : null; - final isUrlNotNull = url != null; - if (isUrlNotNull) { - final tiledLayer = ArcGISTiledLayer.withUri(Uri.parse(url)); - // Key fix: Upsample coarser tiles instead of displaying "Map data not yet available" watermark - tiledLayer.noDataTileBehavior = NoDataTileBehavior.upSample; - tiledLayer.maxScale = 0; - basemap.baseLayers.add(tiledLayer); - } - break; + // Filter out any duplicate reference to the global base item ID + final campusVectorLayers = vectorLayers.where((l) => l.itemId != globalBaseItemId).toList(); - case 'arcgisVectorTiled': - final pUrl = layer.portalKey != null ? config.portals[layer.portalKey!] : portalUrl; - if (pUrl != null && layer.itemId != null) { - basemap.baseLayers.add( - ArcGISVectorTiledLayer.withItem( - PortalItem.withPortalAndItemId( - portal: Portal(Uri.parse(pUrl)), - itemId: layer.itemId!, - ), + if (campusVectorLayers.isNotEmpty) { + for (final layer in campusVectorLayers) { + final pUrl = layer.portalKey != null ? config.portals[layer.portalKey!] : portalUrl; + if (pUrl != null && layer.itemId != null) { + final portal = pUrl.contains('arcgis.com') ? Portal.arcGISOnline() : Portal(Uri.parse(pUrl)); + basemap.baseLayers.add( + ArcGISVectorTiledLayer.withItem( + PortalItem.withPortalAndItemId( + portal: portal, + itemId: layer.itemId!, ), - ); - } - break; - - case 'arcgisMapImage': - final hasServiceKey = layer.serviceKey != null; - final url = hasServiceKey ? config.serviceUrls[layer.serviceKey!] : null; - final isUrlNotNull = url != null; - if (isUrlNotNull) { - basemap.baseLayers.add(ArcGISMapImageLayer.withUri(Uri.parse(url))); - } - break; + ), + ); + } } - } - - // 3. Fallback: If no vector layer was present in the config, append known UCSD vector layer - final hasVectorLayer = basemap.baseLayers.any((l) => l is ArcGISVectorTiledLayer); - if (!hasVectorLayer) { + } else { + // Fallback: Append known UCSD campus vector tile layer IDs final fallbackItemId = switch (type) { BasemapType.light => '6643ee62af494f5bafe7dfdb8eb3f857', BasemapType.dark => '09d7b3934b6c4c2cad8380c04e08c1b1', diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart new file mode 100644 index 000000000..019d91909 --- /dev/null +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart @@ -0,0 +1,256 @@ +/// ============================================================================ +/// File: esrimap_scale_bar.dart +/// Description: Google Maps-style dynamic scale indicator widget displaying +/// dual Imperial and Metric distance scale brackets based on current +/// map zoom scale, with automatic fade-in on zoom and fade-out on stop. +/// ============================================================================ + +import 'dart:async'; +import 'package:flutter/material.dart'; + +/// Dynamic scale bar widget modeled after Google Maps' scale indicator. +/// Appears when zooming in/out and automatically fades out when zooming stops. +class EsriMapScaleBar extends StatefulWidget { + /// Current map scale denominator (e.g. 24000 for 1:24,000 scale). + final double scale; + + /// Whether dark mode is active. + final bool isDark; + + /// Whether the scale bar automatically fades in on scale change and fades out when stopped. + final bool autoFade; + + /// Inactivity delay before fading out after zooming ceases. + final Duration fadeDelay; + + const EsriMapScaleBar({ + Key? key, + required this.scale, + this.isDark = false, + this.autoFade = true, + this.fadeDelay = const Duration(milliseconds: 1080), + }) : super(key: key); + + @override + State createState() => _EsriMapScaleBarState(); +} + +class _EsriMapScaleBarState extends State { + bool _isVisible = false; + Timer? _fadeTimer; + double _lastScale = 0.0; + + /// Standard round imperial distances in feet. + static const List _imperialDistances = [ + 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, + 5280, // 1 mi + 10560, // 2 mi + 26400, // 5 mi + 52800, // 10 mi + 105600, // 20 mi + 264000, // 50 mi + ]; + + /// Standard round metric distances in meters. + static const List _metricDistances = [ + 0.5, 1, 2, 5, 10, 20, 50, 100, 200, 500, + 1000, // 1 km + 2000, // 2 km + 5000, // 5 km + 10000, // 10 km + 20000, // 20 km + 50000, // 50 km + 100000, // 100 km + ]; + + @override + void initState() { + super.initState(); + _lastScale = widget.scale; + if (!widget.autoFade) { + _isVisible = true; + } + } + + @override + void didUpdateWidget(covariant EsriMapScaleBar oldWidget) { + super.didUpdateWidget(oldWidget); + // Detect zoom/scale changes + if (widget.scale > 0 && (widget.scale - _lastScale).abs() > 0.05) { + _lastScale = widget.scale; + if (widget.autoFade) { + _triggerZoomFade(); + } + } + } + + void _triggerZoomFade() { + _fadeTimer?.cancel(); + if (!_isVisible) { + setState(() { + _isVisible = true; + }); + } + _fadeTimer = Timer(widget.fadeDelay, () { + if (mounted) { + setState(() { + _isVisible = false; + }); + } + }); + } + + @override + void dispose() { + _fadeTimer?.cancel(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + if (widget.scale <= 0) return const SizedBox.shrink(); + + return AnimatedOpacity( + opacity: _isVisible ? 1.0 : 0.0, + duration: const Duration(milliseconds: 300), + curve: Curves.easeInOut, + child: _buildScaleContent(context), + ); + } + + Widget _buildScaleContent(BuildContext context) { + // 1 logical pixel in meters at standard 96 DPI: (scale * 0.0254 / 96.0) + final metersPerPx = (widget.scale * 0.0254) / 96.0; + if (metersPerPx <= 0) return const SizedBox.shrink(); + + // Target scale bar width between 40 and 100 logical pixels + double chosenImperialFt = _imperialDistances.first; + double chosenWidthPx = 60.0; + + for (final ft in _imperialDistances) { + final meters = ft * 0.3048; + final px = meters / metersPerPx; + if (px >= 40 && px <= 100) { + chosenImperialFt = ft; + chosenWidthPx = px; + break; + } + if (px > 100) { + chosenImperialFt = ft; + chosenWidthPx = px.clamp(40.0, 100.0); + break; + } + } + + // Format imperial label (e.g. "20 ft", "500 ft", "1 mi") + final String imperialLabel = chosenImperialFt >= 5280 + ? '${(chosenImperialFt / 5280).toStringAsFixed(chosenImperialFt % 5280 == 0 ? 0 : 1)} mi' + : '${chosenImperialFt.toInt()} ft'; + + // Find matching metric distance for the chosen width + final barMeters = chosenWidthPx * metersPerPx; + double chosenMetricMeters = _metricDistances.first; + for (final m in _metricDistances) { + if (m <= barMeters * 1.3) { + chosenMetricMeters = m; + } else { + break; + } + } + + // Format metric label (e.g. "5 m", "200 m", "1 km") + final String metricLabel = chosenMetricMeters >= 1000 + ? '${(chosenMetricMeters / 1000).toStringAsFixed(chosenMetricMeters % 1000 == 0 ? 0 : 1)} km' + : (chosenMetricMeters < 1 + ? '${(chosenMetricMeters * 100).round()} cm' + : '${chosenMetricMeters % 1 == 0 ? chosenMetricMeters.toInt() : chosenMetricMeters.toStringAsFixed(1)} m'); + + final textColor = widget.isDark ? Colors.white70 : const Color(0xFF3C4043); + final lineColor = widget.isDark ? Colors.white70 : const Color(0xFF5F6368); + + return Container( + padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2), + decoration: BoxDecoration( + color: (widget.isDark ? Colors.black54 : Colors.white70).withOpacity(0.65), + borderRadius: BorderRadius.circular(4), + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + // Imperial distance (Top) + Text( + imperialLabel, + style: TextStyle( + fontSize: 10, + fontWeight: FontWeight.w600, + color: textColor, + letterSpacing: -0.2, + height: 1.1, + ), + ), + const SizedBox(height: 1), + + // Scale bracket bar: |___________| + SizedBox( + width: chosenWidthPx, + height: 6, + child: CustomPaint( + painter: _ScaleBarBracketPainter(color: lineColor), + ), + ), + const SizedBox(height: 1), + + // Metric distance (Bottom) + Text( + metricLabel, + style: TextStyle( + fontSize: 10, + fontWeight: FontWeight.w600, + color: textColor, + letterSpacing: -0.2, + height: 1.1, + ), + ), + ], + ), + ); + } +} + +/// Custom painter rendering the horizontal line with vertical tick marks on both ends. +class _ScaleBarBracketPainter extends CustomPainter { + final Color color; + + const _ScaleBarBracketPainter({required this.color}); + + @override + void paint(Canvas canvas, Size size) { + final paint = Paint() + ..color = color + ..strokeWidth = 1.6 + ..style = PaintingStyle.stroke + ..strokeCap = StrokeCap.round; + + final path = Path(); + // Left tick + path.moveTo(1, 0); + path.lineTo(1, size.height); + // Horizontal center bar + path.lineTo(size.width - 1, size.height); + // Right tick + path.lineTo(size.width - 1, 0); + + // Center tick + final midX = size.width / 2; + path.moveTo(midX, size.height); + path.lineTo(midX, size.height - 3); + + canvas.drawPath(path, paint); + } + + @override + bool shouldRepaint(covariant _ScaleBarBracketPainter oldDelegate) { + return oldDelegate.color != color; + } +} diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 79ee898c4..b06449e2b 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -6,6 +6,7 @@ /// ============================================================================ import 'dart:async'; +import 'dart:math' as math; import 'package:arcgis_maps/arcgis_maps.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_ai_search_model.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_basemaps.dart'; @@ -24,6 +25,7 @@ import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_c import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_fab.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_scene.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart'; @@ -104,6 +106,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { bool _isRecenterActive = false; bool _ignoreViewpointReset = false; double _mapRotation = 0.0; + double _currentScale = 24000.0; StreamSubscription? _viewpointChangedSubscription; // Routing State @@ -199,6 +202,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } _map = ArcGISMap.withBasemap(_basemaps[_currentBasemapType]!); + _map.maxScale = 38.4; // Limit zoom to scale 1:38.4 (~23.88 max zoom level) _map.initialViewpoint = Viewpoint.fromCenter( ArcGISPoint(x: -117.2340, y: 32.8801, spatialReference: SpatialReference.wgs84), scale: 24000, @@ -230,13 +234,19 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _preloadAlternateBasemaps(); _preloadHeavyLayers(); - // Track map heading rotation changes + // Track map heading rotation and zoom level changes _viewpointChangedSubscription = _mapViewController.onViewpointChanged.listen((_) { final vp = _mapViewController.getCurrentViewpoint(ViewpointType.centerAndScale); final isVpValid = vp != null && mounted; if (isVpValid) { + final scale = vp.targetScale; + final zoomLevel = scale > 0 ? (math.log(591657550.5 / scale) / math.ln2) : 0.0; + // Print current zoom scale and estimated level in PINK ANSI color (\x1B[38;2;255;105;180m) + debugPrint('\x1B[38;2;255;105;180m🔍 [MAP ZOOM] Scale: 1:${scale.toStringAsFixed(1)} | Zoom Level: ~${zoomLevel.toStringAsFixed(2)}\x1B[0m'); + setState(() { _mapRotation = vp.rotation; + _currentScale = scale; final shouldResetVP = !_ignoreViewpointReset && (_isLocationActive || _isRecenterActive); if (shouldResetVP) { _isLocationActive = false; @@ -377,6 +387,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { setState(() { _map.basemap = newBasemap; + _map.maxScale = 38.4; _currentBasemapType = newType; _updateVignetteGraphics(); }); @@ -2043,6 +2054,17 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { iconForResult: _iconForResult, ), + // Dynamic Google Maps-style Scale Bar Indicator + if (_sceneMode == 'default' && _selectedResult == null && !shouldShowCatListPanel) + Positioned( + bottom: 24, + right: 16, + child: EsriMapScaleBar( + scale: _currentScale, + isDark: isDark, + ), + ), + // Transit Legend if (_layerVisible['tritonTransit'] == true) Positioned(bottom: 24, left: 16, child: _buildTransitLegend()), diff --git a/test/core/services/esrimap_basemap_factory_test.dart b/test/core/services/esrimap_basemap_factory_test.dart index 16c6a160f..553f7b708 100644 --- a/test/core/services/esrimap_basemap_factory_test.dart +++ b/test/core/services/esrimap_basemap_factory_test.dart @@ -7,34 +7,31 @@ import 'package:flutter_test/flutter_test.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); - group('EsriMapConfig & Vector/Tiled Basemaps', () { - test('mapConfig.json parses geographical basemap configurations correctly', () async { + group('EsriMapConfig & Vector Basemaps', () { + test('mapConfig.json parses Living Atlas and UCSD vector tile basemap configurations correctly', () async { final configString = await rootBundle.loadString('assets/esri_map_assets/mapConfig.json'); final jsonMap = jsonDecode(configString) as Map; final config = EsriMapConfig.fromJson(jsonMap); - // Verify Default basemap includes hillshade, lightGrayBase, and campus vector tile + // Verify Default basemap includes Living Atlas Light Gray vector base and UCSD campus vector tile final defaultBasemap = config.basemaps['defaultMap']; expect(defaultBasemap, isNotNull); - expect(defaultBasemap!.baseLayers.length, 3); - expect(defaultBasemap.baseLayers.any((l) => l.serviceKey == 'hillshade'), isTrue); - expect(defaultBasemap.baseLayers.any((l) => l.serviceKey == 'lightGrayBase'), isTrue); + expect(defaultBasemap!.baseLayers.length, 2); + expect(defaultBasemap.baseLayers.any((l) => l.itemId == '291da5eab3a0412593b66d384379f89f'), isTrue); expect(defaultBasemap.baseLayers.any((l) => l.itemId == 'e19f33d2c1f44967aef673306c483913'), isTrue); - // Verify Light basemap includes hillshade, lightGrayBase, and campus vector tile + // Verify Light basemap includes Living Atlas Light Gray vector base and UCSD campus vector tile final lightBasemap = config.basemaps['light']; expect(lightBasemap, isNotNull); - expect(lightBasemap!.baseLayers.length, 3); - expect(lightBasemap.baseLayers.any((l) => l.serviceKey == 'hillshade'), isTrue); - expect(lightBasemap.baseLayers.any((l) => l.serviceKey == 'lightGrayBase'), isTrue); + expect(lightBasemap!.baseLayers.length, 2); + expect(lightBasemap.baseLayers.any((l) => l.itemId == '291da5eab3a0412593b66d384379f89f'), isTrue); expect(lightBasemap.baseLayers.any((l) => l.itemId == '6643ee62af494f5bafe7dfdb8eb3f857'), isTrue); - // Verify Dark basemap includes hillshade, darkGrayBase, and campus vector tile + // Verify Dark basemap includes Living Atlas Dark Gray vector base and UCSD campus vector tile final darkBasemap = config.basemaps['dark']; expect(darkBasemap, isNotNull); - expect(darkBasemap!.baseLayers.length, 3); - expect(darkBasemap.baseLayers.any((l) => l.serviceKey == 'hillshade'), isTrue); - expect(darkBasemap.baseLayers.any((l) => l.serviceKey == 'darkGrayBase'), isTrue); + expect(darkBasemap!.baseLayers.length, 2); + expect(darkBasemap.baseLayers.any((l) => l.itemId == '5e9b3685f4c24d8781073dd928ebda50'), isTrue); expect(darkBasemap.baseLayers.any((l) => l.itemId == '09d7b3934b6c4c2cad8380c04e08c1b1'), isTrue); // Verify Satellite basemap uses worldImagery diff --git a/test/ui/esrimap/esrimap_scale_bar_test.dart b/test/ui/esrimap/esrimap_scale_bar_test.dart new file mode 100644 index 000000000..608ab888a --- /dev/null +++ b/test/ui/esrimap/esrimap_scale_bar_test.dart @@ -0,0 +1,109 @@ +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + TestWidgetsFlutterBinding.ensureInitialized(); + + group('EsriMapScaleBar Widget Tests', () { + testWidgets('renders imperial and metric units when autoFade is false', (tester) async { + await tester.pumpWidget( + const MaterialApp( + home: Scaffold( + body: EsriMapScaleBar( + scale: 24000.0, + isDark: false, + autoFade: false, + ), + ), + ), + ); + + expect(find.byType(EsriMapScaleBar), findsOneWidget); + expect(find.byType(CustomPaint), findsWidgets); + }); + + testWidgets('renders close-up zoom scale (e.g. 500)', (tester) async { + await tester.pumpWidget( + const MaterialApp( + home: Scaffold( + body: EsriMapScaleBar( + scale: 500.0, + isDark: false, + autoFade: false, + ), + ), + ), + ); + + expect(find.byType(EsriMapScaleBar), findsOneWidget); + expect(find.text('20 ft'), findsOneWidget); + expect(find.text('5 m'), findsOneWidget); + }); + + testWidgets('fades in on zoom change and fades out after delay', (tester) async { + double currentScale = 24000.0; + + await tester.pumpWidget( + StatefulBuilder( + builder: (context, setState) => MaterialApp( + home: Scaffold( + body: Column( + children: [ + EsriMapScaleBar( + scale: currentScale, + autoFade: true, + fadeDelay: const Duration(milliseconds: 500), + ), + ElevatedButton( + onPressed: () => setState(() => currentScale = 12000.0), + child: const Text('Zoom'), + ), + ], + ), + ), + ), + ), + ); + + // Initially opacity is 0.0 + final animatedOpacityFinder = find.byType(AnimatedOpacity); + expect(animatedOpacityFinder, findsOneWidget); + AnimatedOpacity opacityWidget = tester.widget(animatedOpacityFinder); + expect(opacityWidget.opacity, 0.0); + + // Trigger zoom/scale change + await tester.tap(find.text('Zoom')); + await tester.pump(); + await tester.pump(const Duration(milliseconds: 300)); + + // Now opacity is 1.0 (visible while zooming) + opacityWidget = tester.widget(animatedOpacityFinder); + expect(opacityWidget.opacity, 1.0); + + // Wait for fade delay + await tester.pump(const Duration(milliseconds: 600)); + await tester.pump(const Duration(milliseconds: 300)); + + // Now opacity has returned to 0.0 (faded out when zooming stopped) + opacityWidget = tester.widget(animatedOpacityFinder); + expect(opacityWidget.opacity, 0.0); + }); + + testWidgets('returns SizedBox.shrink when scale is 0 or negative', (tester) async { + await tester.pumpWidget( + const MaterialApp( + home: Scaffold( + body: EsriMapScaleBar( + scale: 0.0, + isDark: false, + autoFade: false, + ), + ), + ), + ); + + expect(find.text('ft'), findsNothing); + }); + }); +} From 62134ff5c82830e0aa069e02e6065d053a1bd94a Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 11:53:53 -0700 Subject: [PATCH 063/139] made boundary thinner --- .../esri_map_services/esrimap_boundary_service.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/core/services/esri_map_services/esrimap_boundary_service.dart b/lib/core/services/esri_map_services/esrimap_boundary_service.dart index 482a00955..93ce43ce5 100644 --- a/lib/core/services/esri_map_services/esrimap_boundary_service.dart +++ b/lib/core/services/esri_map_services/esrimap_boundary_service.dart @@ -147,38 +147,38 @@ class EsriMapBoundaryService { try { final polyline = boundary.toPolyline(); - // Outer glow layer 2 (Widest, most diffuse feather ring) + // Outer glow layer 2 (Widest, most diffuse feather ring - reduced by 60%) graphics.add( Graphic( geometry: polyline, symbol: SimpleLineSymbol( style: SimpleLineSymbolStyle.solid, color: glow2Color, - width: 8.0, + width: 3.2, ), ), ); - // Outer glow layer 1 (Medium feather ring) + // Outer glow layer 1 (Medium feather ring - reduced by 60%) graphics.add( Graphic( geometry: polyline, symbol: SimpleLineSymbol( style: SimpleLineSymbolStyle.solid, color: glow1Color, - width: 4.5, + width: 1.8, ), ), ); - // Crisp primary boundary stroke (UCSD Navy / Brand Accent) + // Crisp primary boundary stroke (UCSD Navy / Brand Accent - reduced by 60%) graphics.add( Graphic( geometry: polyline, symbol: SimpleLineSymbol( style: SimpleLineSymbolStyle.solid, color: primaryStrokeColor, - width: 1.8, + width: 0.72, ), ), ); From dcd7451c295e3133e8ca3a5f2ec96f7275f1c0c6 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 12:09:50 -0700 Subject: [PATCH 064/139] cleaned up --- assets/esri_map_assets/ucsd_boundary.json | 1 - .../esrimap_boundary_service.dart | 223 ------------------ lib/ui/esrimap/esrimap.dart | 30 --- .../esrimap_boundary_service_test.dart | 46 ---- 4 files changed, 300 deletions(-) delete mode 100644 assets/esri_map_assets/ucsd_boundary.json delete mode 100644 lib/core/services/esri_map_services/esrimap_boundary_service.dart delete mode 100644 test/core/services/esrimap_boundary_service_test.dart diff --git a/assets/esri_map_assets/ucsd_boundary.json b/assets/esri_map_assets/ucsd_boundary.json deleted file mode 100644 index ec11c431f..000000000 --- a/assets/esri_map_assets/ucsd_boundary.json +++ /dev/null @@ -1 +0,0 @@ -{"displayFieldName":"FeatureID","fieldAliases":{"OBJECTID":"OBJECTID","Campus":"Campus Area","FeatureID":"Feature Identifier","SHAPE.STLength()":"SHAPE_Length","SHAPE.STArea()":"SHAPE_Area","GlobalID":"GlobalID","created_user":"created_user","created_date":"created_date","last_edited_user":"last_edited_user","last_edited_date":"last_edited_date","Clery":"Clery","Region":"Region"},"geometryType":"esriGeometryPolygon","spatialReference":{"wkid":4326,"latestWkid":4326},"fields":[{"name":"OBJECTID","type":"esriFieldTypeOID","alias":"OBJECTID"},{"name":"Campus","type":"esriFieldTypeString","alias":"Campus Area","length":255},{"name":"FeatureID","type":"esriFieldTypeString","alias":"Feature Identifier","length":50},{"name":"SHAPE.STLength()","type":"esriFieldTypeDouble","alias":"SHAPE_Length"},{"name":"SHAPE.STArea()","type":"esriFieldTypeDouble","alias":"SHAPE_Area"},{"name":"GlobalID","type":"esriFieldTypeGlobalID","alias":"GlobalID","length":38},{"name":"created_user","type":"esriFieldTypeString","alias":"created_user","length":255},{"name":"created_date","type":"esriFieldTypeDate","alias":"created_date","length":8},{"name":"last_edited_user","type":"esriFieldTypeString","alias":"last_edited_user","length":255},{"name":"last_edited_date","type":"esriFieldTypeDate","alias":"last_edited_date","length":8},{"name":"Clery","type":"esriFieldTypeString","alias":"Clery","length":50},{"name":"Region","type":"esriFieldTypeString","alias":"Region","length":255}],"features":[{"attributes":{"OBJECTID":37,"Campus":"La Jolla Campus","FeatureID":null,"SHAPE.STLength()":13876.894869037975,"SHAPE.STArea()":11536296.981464531,"GlobalID":"{E960D7DA-60FE-4E5A-B0F3-CB33CC9C0214}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887928000,"Clery":"Yes","Region":"East Campus"},"geometry":{"rings":[[[-117.22099292733958,32.882509370498568],[-117.22098222325303,32.882499013285418],[-117.22097149586861,32.88248867519107],[-117.22096074091183,32.882478356249145],[-117.22094996155867,32.882468053729426],[-117.22093915784895,32.882457771238585],[-117.22092833085131,32.882447508768259],[-117.22091747199691,32.882437264582215],[-117.22090659303056,32.882427037686497],[-117.2208956886291,32.882416829926356],[-117.22088475773387,32.882406642211819],[-117.22087380247211,32.882396473624532],[-117.2208628239125,32.882386324155988],[-117.22085181881928,32.882376191126411],[-117.22084079153663,32.882366080813853],[-117.22082973879888,32.882355987833535],[-117.22081865957746,32.882345915800464],[-117.22080755810673,32.882335861074438],[-117.22079643120101,32.882325825483925],[-117.22078528100731,32.88231580991382],[-117.22077410537851,32.882305813479206],[-117.22076290434448,32.88229583888517],[-117.22075167995283,32.882285877999813],[-117.22074043019578,32.882275942561584],[-117.22072916031679,32.88226602351191],[-117.22071786183668,32.88225612722961],[-117.22070653789164,32.882246247377715],[-117.22069519388435,32.882236389324362],[-117.2206838254908,32.882226548594744],[-117.22067242955467,32.882216729722359],[-117.22066101566375,32.882206929926689],[-117.22064957100463,32.882197150210061],[-117.22063810838074,32.882187388668434],[-117.22062661930286,32.882177650779006],[-117.22061510475014,32.882167928418355],[-117.22060357121379,32.882158228749418],[-117.22059201118363,32.882148549125894],[-117.22058042570848,32.882138887736161],[-117.22056882018103,32.8821292490465],[-117.22056977490762,32.882086757554106],[-117.22057335371784,32.881927771334382],[-117.22057537027534,32.881838354520774],[-117.22051806536719,32.881780963879834],[-117.22040998381004,32.881672715805593],[-117.22040848020197,32.881673785362906],[-117.22040723641166,32.881674672530359],[-117.22040599154276,32.881675558804588],[-117.22040474777228,32.881676447775362],[-117.22040350718774,32.881677334917647],[-117.22040226234861,32.881678223896799],[-117.22040102178384,32.88167911284237],[-117.22039978016043,32.881680002698026],[-117.22039853962548,32.881680894348563],[-117.22039729799205,32.88168178330249],[-117.22039606067277,32.881682675829552],[-117.2203948233137,32.881683564749892],[-117.22039358495562,32.881684459990339],[-117.22039234765616,32.881685354320659],[-117.22039110929803,32.881686249561014],[-117.22038987199855,32.881687143891298],[-117.22038863791478,32.881688039098137],[-117.22038740275244,32.88168893341161],[-117.22038616869844,32.881689831323392],[-117.22038493460465,32.881690725628445],[-117.22038369947208,32.881691622646905],[-117.22038246865365,32.881692523238485],[-117.22038123459953,32.881693421150224],[-117.22038000270248,32.881694320848482],[-117.22037877188399,32.881695221439998],[-117.22037754105553,32.881696121129835],[-117.22037631344277,32.881697021696162],[-117.22037508154567,32.88169792139437],[-117.22037385396268,32.881698824665676],[-117.22037262637971,32.881699727936976],[-117.2203713987867,32.881700630306561],[-117.22037017334091,32.881701533561071],[-117.22036894577772,32.881702438635671],[-117.22036772143022,32.881703344586768],[-117.22036649705292,32.881704247832801],[-117.22036527272532,32.881705155587191],[-117.22036404727932,32.881706058841587],[-117.22036282299143,32.881706970202664],[-117.22036160183971,32.881707875226795],[-117.22036038072773,32.881708783857647],[-117.22035915643976,32.881709695218667],[-117.22035793852362,32.881710602922617],[-117.22035671637281,32.88171151426684],[-117.22035549526069,32.8817124228976],[-117.22035427738425,32.8817133342082],[-117.22035305952767,32.881714247322137],[-117.22035184165112,32.881715158632709],[-117.22035062380445,32.881716072648281],[-117.22034940595769,32.881716986663832],[-117.22034819131676,32.881717900654202],[-117.22034697666582,32.8817188137429],[-117.22034576208446,32.881719733143299],[-117.22034454741366,32.881720644428626],[-117.2203433328024,32.881721561123932],[-117.220342121397,32.881722477794121],[-117.22034090681554,32.881723397194385],[-117.22033969540007,32.881724312962866],[-117.22033848720039,32.881725229607774],[-117.22033727264869,32.881726151713096],[-117.22033606447876,32.881727071062983],[-117.22033485310304,32.881727990438094],[-117.22033364493304,32.881728909787974],[-117.2203324368227,32.881729834547841],[-117.22033122868247,32.881730756602757],[-117.22033002054231,32.881731678657623],[-117.22032881560781,32.881732600687286],[-117.22032761070319,32.881733525421943],[-117.22032640582835,32.881734452861643],[-117.22032520089383,32.881735374891242],[-117.22032399598909,32.881736299625906],[-117.22032279111419,32.88173722706555],[-117.22032158941521,32.881738151774989],[-117.2203203888147,32.881739079180988],[-117.22031918714552,32.881740006595471],[-117.22031798550616,32.881740936714863],[-117.22031678383689,32.881741864129268],[-117.22031558540331,32.881742794223491],[-117.22031438376385,32.88174372434284],[-117.22031318639877,32.881744654428701],[-117.22031198796506,32.881745584522861],[-117.22031079273717,32.881746514591825],[-117.22030959433324,32.881747447390993],[-117.22030839913509,32.881748380164979],[-117.22030720501553,32.881749313832238],[-117.22030600984709,32.881750249311217],[-117.22030481464893,32.881751182085168],[-117.22030361948052,32.881752117564076],[-117.22030242858649,32.881753053009454],[-117.22030123982968,32.881753988438021],[-117.22030004467112,32.881754924818594],[-117.22029885273822,32.881755862977307],[-117.22029766507973,32.881756801102469],[-117.22029647314683,32.881757739261204],[-117.22029528122384,32.88175867832156],[-117.22029409356527,32.881759616446679],[-117.2202929048679,32.881760557285141],[-117.22029171934652,32.881761495393484],[-117.22029053175748,32.881762439830247],[-117.22028934626583,32.881763380643534],[-117.22028815756838,32.881764321481974],[-117.22028697638095,32.881765264966731],[-117.22028579092901,32.88176620938664],[-117.22028460653569,32.881767152896487],[-117.22028342427957,32.881768096389543],[-117.22028223882758,32.881769040809473],[-117.22028105766987,32.881769986999139],[-117.22027987864927,32.881770933172049],[-117.22027869750143,32.881771880263337],[-117.22027751848083,32.881772826436126],[-117.22027633733292,32.881773773527463],[-117.22027515834209,32.881774722405282],[-117.22027398041985,32.881775671274738],[-117.22027280464471,32.881776621029005],[-117.22027162672241,32.881777569898425],[-117.22027045094723,32.88177851965272],[-117.22026927626047,32.881779471201924],[-117.22026810051507,32.881780423661176],[-117.22026692582828,32.881781375210394],[-117.22026565340695,32.88178237982828],[-117.22026443555842,32.881783293843021],[-117.22026319069654,32.881784181017458],[-117.22026191986994,32.881785039539871],[-117.22026062631437,32.881785872090035],[-117.22025930683382,32.881786679594867],[-117.22025796347614,32.881787453922549],[-117.22025659637052,32.881788206794816],[-117.22025521073076,32.881788926447932],[-117.22025380125358,32.881789616530504],[-117.22025237541921,32.881790276983942],[-117.22025092572747,32.881790906063522],[-117.22024946075713,32.881791506407161],[-117.22024797834116,32.881792075326679],[-117.22024647954805,32.88179261281352],[-117.22024496327941,32.881793116171337],[-117.22024343492798,32.881793589866263],[-117.22024189232675,32.881794031210219],[-117.22024033971036,32.881794436562942],[-117.22023877075665,32.881794814089723],[-117.22023719393491,32.881795156510186],[-117.22023560816658,32.881795462930988],[-117.22023401137412,32.881795738778926],[-117.22023240888068,32.881795982208772],[-117.22023079848935,32.881796187827227],[-117.22022918131846,32.881796360134253],[-117.22022756380952,32.881796501784557],[-117.22022593946136,32.881796604713415],[-117.2202243115494,32.881796675207326],[-117.22022268324963,32.881796710536172],[-117.22022105458193,32.881796712503252],[-117.22021942554638,32.88179668110854],[-117.22021779932876,32.881796614523616],[-117.22021617594898,32.881796514551738],[-117.22021455644594,32.881796378479486],[-117.22021293872204,32.881796209930407],[-117.22021133021791,32.881796005239067],[-117.22020972456157,32.881795768062389],[-117.22020812922331,32.881795497440095],[-117.22020653989894,32.881795190700721],[-117.22020496200108,32.881794854113899],[-117.22020339439145,32.881794481376474],[-117.22020183607113,32.881794078808447],[-117.22020029445071,32.881793640039369],[-117.22019876105094,32.881793171448123],[-117.2201972475867,32.881792669335717],[-117.22019574340185,32.881792136491015],[-117.22019426129962,32.881791571010012],[-117.22019279596694,32.881790975639667],[-117.22019134204085,32.881790348618694],[-117.22018991451162,32.881789692534504],[-117.22018850053612,32.88178900568446],[-117.22018711400621,32.881788287959566],[-117.2201857442458,32.881787540345321],[-117.22018440095189,32.88178676997962],[-117.22018307867198,32.881785966985994],[-117.22018177959318,32.881785135856099],[-117.22018050696086,32.881784280171338],[-117.22017925856839,32.881783393636873],[-117.22004213948567,32.881685955226395],[-117.21993300745433,32.881611477284487],[-117.21982234920601,32.881538619040576],[-117.21971020131917,32.881467402747099],[-117.21959659925349,32.881397846156737],[-117.21948157321492,32.881329975179163],[-117.21936516508399,32.881263808418346],[-117.21924740177042,32.881199363694343],[-117.21912832519391,32.881136663218193],[-117.2190079719107,32.881075727439487],[-117.21888637523116,32.881016573226418],[-117.21841828694274,32.880813731879492],[-117.21840491670291,32.880806065413708],[-117.21839322742584,32.880796644499995],[-117.21838353934103,32.880785726332086],[-117.21837611542034,32.880773609131268],[-117.21837116130853,32.880760625834192],[-117.21836881235147,32.880747130668638],[-117.21836913033079,32.880733493768425],[-117.2183721097269,32.8807200875981],[-117.21837766694395,32.880707278921747],[-117.21841013677202,32.88064117350536],[-117.21843610924576,32.880573053101664],[-117.21845541306436,32.880503373537778],[-117.21846791761443,32.880432597534849],[-117.21847354046919,32.880361196452817],[-117.21852068573098,32.878804462773928],[-117.21858421355041,32.878748783321669],[-117.21858737250582,32.878671517647575],[-117.21859294065327,32.878535469866193],[-117.21852619509869,32.878479012594866],[-117.21853042576792,32.877757839117088],[-117.21852959591982,32.877679447768095],[-117.21851268393004,32.877054604973473],[-117.21858140347669,32.87699654297942],[-117.21858277601633,32.876762839159795],[-117.21850348070468,32.87669715710301],[-117.2184992854103,32.876541847892],[-117.21848878648795,32.876386750404691],[-117.21847199773954,32.876232047586093],[-117.21846138680186,32.876132586940585],[-117.21845518531373,32.876032860885473],[-117.21844150917012,32.875690944580924],[-117.2184689528757,32.872668790475593],[-117.21846117408812,32.872434579448424],[-117.21846277831993,32.872416840336221],[-117.21846733375645,32.872399470350906],[-117.21847474910177,32.872382815576763],[-117.21848487524318,32.87236721173015],[-117.21849151496785,32.872356979864641],[-117.21849637754539,32.872346059468583],[-117.218499363872,32.872334669541758],[-117.21850041661421,32.872323037773981],[-117.21850505521286,32.871597770680559],[-117.21852413711379,32.871571407320324],[-117.21881805281237,32.871425189584947],[-117.22129875385129,32.871437722716635],[-117.22383797028941,32.871450581661897],[-117.22403273207054,32.871451565871325],[-117.22422542498836,32.871452539034692],[-117.22428642229312,32.871452847074437],[-117.22558327801897,32.87207090164619],[-117.22571800266782,32.872132345094812],[-117.22585534513176,32.87218951417951],[-117.22599511430545,32.872242329243683],[-117.22613711594636,32.872290716968685],[-117.22610385485589,32.872313307010451],[-117.22655909713492,32.872494282887722],[-117.22712399935932,32.872587505634762],[-117.22797044284758,32.872727185678656],[-117.22843983257712,32.873827628593787],[-117.22817642810324,32.87568138867131],[-117.2282448549295,32.876377788614334],[-117.22813880209398,32.877473465936269],[-117.22802003456577,32.878430389088564],[-117.228068566118,32.878716726347264],[-117.22809180789663,32.879178182032796],[-117.22795510240074,32.880823300123851],[-117.22775783249112,32.881833951682147],[-117.227752467415,32.881861432502127],[-117.22761796330286,32.88187246915372],[-117.22761485277802,32.881904534648172],[-117.22759516214354,32.882107469051419],[-117.22748207782952,32.882157292471994],[-117.22736618923321,32.882206741200015],[-117.22724881216499,32.882253624396469],[-117.2270955177668,32.882310197624726],[-117.22694005856611,32.882362396267332],[-117.22678261027194,32.882410162117445],[-117.22658652156082,32.882462527278136],[-117.22638803833775,32.882508020796202],[-117.22618749963306,32.882546565137119],[-117.2259852467366,32.88257809357151],[-117.22578162431608,32.882602554675259],[-117.22557697818937,32.882619904231326],[-117.22537165863993,32.882630115122915],[-117.22516601496339,32.882633167457378],[-117.22496039664578,32.882629058475906],[-117.22475515433153,32.88261779352878],[-117.22455063774595,32.882599391501927],[-117.22434719570479,32.88257388571877],[-117.22414517390661,32.882541317645249],[-117.2241447723592,32.882541246867589],[-117.22399510324145,32.882512538292545],[-117.22384655194206,32.882479954937928],[-117.22334872925619,32.883131695935184],[-117.22239688404929,32.884377761799648],[-117.22239228037233,32.884383791937999],[-117.22210836123335,32.883865542073494],[-117.22199983165515,32.883700130842058],[-117.22188586287378,32.883537344900965],[-117.22176654500898,32.883377310672969],[-117.22164197138419,32.883220154555154],[-117.22151223848624,32.883065999312507],[-117.22137744810297,32.882914964061079],[-117.22128649042301,32.882815843964487],[-117.2212855832979,32.882814507492171],[-117.22128477929382,32.882813315390443],[-117.22128396460363,32.882812123372744],[-117.22128315311933,32.882810931329821],[-117.22128233845909,32.882809742017137],[-117.22128152700469,32.882808552679201],[-117.22128071338318,32.882807360653075],[-117.22127989872295,32.882806171340313],[-117.22127908085697,32.882804982052839],[-117.22127826620675,32.882803793641706],[-117.2212774515466,32.882802604328994],[-117.22127662726894,32.882801415091834],[-117.22127581370735,32.882800228475716],[-117.22127498945957,32.882799041943528],[-117.22127458868063,32.882798459860119],[-117.22127222731753,32.882795889506092],[-117.22126222526944,32.882785045265706],[-117.22125219351163,32.882774220194719],[-117.22124213202433,32.882763412489844],[-117.22123204827778,32.882752621190548],[-117.22122193910597,32.882741849928649],[-117.22121180019469,32.882731095131206],[-117.22120163581833,32.882720356764516],[-117.22119144597696,32.882709634828586],[-117.22118123284757,32.882698932913314],[-117.22117099104729,32.882688247453935],[-117.22116072274328,32.882677581138744],[-117.22115042577832,32.882666932181223],[-117.22114010660394,32.882656304137512],[-117.2211297608561,32.882645688926225],[-117.22111938966314,32.882635091949034],[-117.22110899304506,32.882624515009283],[-117.22109856992311,32.882613957213593],[-117.22108812134614,32.882603416750285],[-117.22107764622562,32.88259289182438],[-117.22106714570977,32.882582389640859],[-117.22105661864033,32.882571902093126],[-117.2210460672343,32.882561436377614],[-117.22103549140196,32.882550984379407],[-117.22102488802716,32.882540554238673],[-117.22101426133452,32.882530141413476],[-117.22100360600093,32.882519747749136],[-117.22099292733958,32.882509370498568]]]}},{"attributes":{"OBJECTID":38,"Campus":"La Jolla Campus","FeatureID":null,"SHAPE.STLength()":32113.368541068307,"SHAPE.STArea()":8838828.3304704335,"GlobalID":"{4A1FBC00-E2AB-4F0C-A5D5-CA952EC2C574}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887928000,"Clery":"Yes","Region":"Coastal Campus"},"geometry":{"rings":[[[-117.24245966347868,32.869961497347454],[-117.24272279110461,32.86879051047643],[-117.24413647173397,32.868806628577858],[-117.24414627032347,32.8673637415489],[-117.24415114529096,32.866646160855659],[-117.24416091370605,32.866645978548718],[-117.24429443440906,32.86664346935644],[-117.24456794746467,32.866638329005781],[-117.24488378272738,32.866632391860009],[-117.24525172973607,32.866626305541899],[-117.245766199972,32.866616662936288],[-117.24645323488967,32.866602877950541],[-117.24646532732564,32.866520327182542],[-117.24653459360987,32.866022280697905],[-117.24657985894318,32.865692108029243],[-117.24668923625373,32.864894273280896],[-117.24677224490212,32.864288785060303],[-117.24724764920606,32.864280542480905],[-117.24787607396638,32.864269641924253],[-117.24792165711453,32.864268938277931],[-117.24835146471754,32.864262290642131],[-117.24908410260036,32.864249401023351],[-117.24957902055989,32.864241370394581],[-117.25038002277283,32.864227056053451],[-117.25106705951541,32.864215578966196],[-117.25137967303993,32.864209747733405],[-117.25210899508411,32.864196137530811],[-117.25228481238011,32.864191962724135],[-117.25244760281856,32.864187890666166],[-117.25243971227462,32.864199913696105],[-117.25243169704603,32.864211871909475],[-117.25242355404063,32.864223775250586],[-117.25241528959677,32.864235617355838],[-117.25240689405787,32.864247394696442],[-117.25239838450781,32.864259106232062],[-117.25238974926623,32.86427075836967],[-117.25238099037735,32.864282342976928],[-117.25237066936972,32.864295710392639],[-117.25236360670112,32.864308092810766],[-117.25235663847998,32.864320512335652],[-117.25234975829579,32.864332969019323],[-117.252342970371,32.864345458318837],[-117.25233627476713,32.864357985644112],[-117.25232967252185,32.864370548281556],[-117.25232315932048,32.864383142659236],[-117.25231674053586,32.864395771438673],[-117.25231041722616,32.864408433709691],[-117.25230418512808,32.864421130408616],[-117.25229804421089,32.864433858830388],[-117.25229199872756,32.864446617137148],[-117.25228604767142,32.864459410747443],[-117.25228019200819,32.864472230636018],[-117.252274427526,32.86448508224759],[-117.2522687606557,32.864497967333378],[-117.25226318486374,32.864510875125504],[-117.25225770885135,32.864523819079686],[-117.25225232287981,32.864536788453798],[-117.25224703552712,32.864549785883639],[-117.25224184248893,32.864562808698835],[-117.25223674810043,32.864575862274698],[-117.25223174479049,32.864588938556999],[-117.25222683902089,32.864602042002026],[-117.25222203186001,32.864615172601077],[-117.2522173200617,32.864628326773598],[-117.25221495400665,32.864635044164267],[-117.25221026684079,32.864648203547119],[-117.25220565258077,32.864661384882126],[-117.25220110685044,32.864674579187231],[-117.25219663291651,32.864687791846499],[-117.25219223077912,32.86470102285994],[-117.25218789718173,32.864714267745207],[-117.2521836353808,32.86472753098456],[-117.25217944107214,32.864740809907737],[-117.25217532388146,32.86475410533847],[-117.25217127738827,32.864767416427064],[-117.25216729945573,32.864780743190799],[-117.25216339326852,32.864794083800383],[-117.25215955883701,32.864807439157538],[-117.25215579615086,32.864820808360605],[-117.25215210630937,32.864834194105789],[-117.25214848712442,32.864847591902262],[-117.25214494075335,32.864861003535964],[-117.25214146507999,32.864874430827506],[-117.25213806217947,32.864887868349669],[-117.2521347299562,32.864901319726407],[-117.25213147052641,32.864914783137039],[-117.25212828604741,32.864928260367606],[-117.25212517006788,32.86494174786344],[-117.25212212903925,32.864955249179189],[-117.25211915649984,32.864968759858598],[-117.25211625888062,32.864982281652935],[-117.25211343299691,32.86499581639152],[-117.25211068199242,32.865009358638389],[-117.25210799952856,32.865022914757269],[-117.25210539196449,32.865036480187712],[-117.25210285715312,32.865050054045525],[-117.25210039618344,32.865063638125299],[-117.25209800475115,32.865077229756686],[-117.25209568719143,32.865090834315133],[-117.25209344558972,32.865104447274852],[-117.25209127562117,32.865118064162175],[-117.25208917629959,32.865131692199228],[-117.25208714972065,32.865145327761937],[-117.25208519802129,32.865158970832958],[-117.25208332117069,32.865172618707362],[-117.25208151923043,32.865186276795079],[-117.25207978253371,32.86519994066586],[-117.25207812177474,32.865213611134557],[-117.25207653798095,32.865227284586034],[-117.25207502270783,32.865240970106157],[-117.25207358333155,32.865254658617637],[-117.25207221773584,32.86526835194114],[-117.2520709248523,32.865282050085405],[-117.25206970682817,32.865295753934646],[-117.25206856043759,32.865309461711583],[-117.25206748782776,32.865323174300585],[-117.25206648794058,32.865336892611936],[-117.25206556283074,32.865350609415003],[-117.25206471044355,32.865364331940462],[-117.25206393185773,32.865378061081266],[-117.25206323127513,32.865391790491174],[-117.25206259696382,32.865405522068741],[-117.25206203640269,32.865419255753409],[-117.25206155171828,32.865432990626104],[-117.25206114079437,32.865446728507514],[-117.25206080575754,32.865460468478638],[-117.25206054230337,32.865474207869163],[-117.25206035046271,32.865487949384047],[-117.25206023341008,32.865501690292341],[-117.25206019117621,32.865515433299031],[-117.25206022055598,32.865529178430108],[-117.2520603246622,32.86554291754458],[-117.25206050358736,32.865556658757399],[-117.2520607551638,32.865570399380964],[-117.25206108042927,32.865584136701592],[-117.25206147837692,32.86559787613794],[-117.25206195001358,32.865611612271316],[-117.25206249747615,32.865625345084439],[-117.25206311652178,32.865639077316963],[-117.25206381035576,32.865652808942805],[-117.25206457568051,32.865666531873053],[-117.25206541585528,32.865680259606719],[-117.25206632751063,32.865693977743071],[-117.2520673139647,32.865707696174447],[-117.25206837621408,32.865721408580548],[-117.25206951214253,32.865735116782083],[-117.25207071749708,32.865748822616943],[-117.25207199649989,32.865762521542131],[-117.25207335130841,32.865776215343757],[-117.25207477765932,32.865789904958064],[-117.25207627766906,32.865803588564361],[-117.25207785347422,32.865817266145413],[-117.25207950084248,32.865830941342473],[-117.25208121965058,32.865844603335518],[-117.2520830131962,32.865858260213642],[-117.2520848793323,32.865871911092377],[-117.25208681911701,32.865885555061503],[-117.25208883363935,32.865899193915631],[-117.2520909174752,32.865912820484802],[-117.25209286094629,32.865925099175051],[-117.25209591351968,32.865938597051944],[-117.25209890105474,32.865952107179105],[-117.25210182029484,32.865965625074118],[-117.25210467342819,32.865979155228075],[-117.2521074593452,32.865992694042951],[-117.25211018021352,32.866006244206339],[-117.2521128360023,32.866019803013309],[-117.25211542347549,32.866033367784901],[-117.25211794270491,32.866046944832689],[-117.25212039684445,32.866060529622445],[-117.25212278164096,32.866074123992128],[-117.25212510242619,32.86608772699671],[-117.25212735489562,32.866101335965908],[-117.25212954228535,32.866114953578695],[-117.2521316614003,32.866128580762776],[-117.25213371215835,32.86614221030478],[-117.25213569786739,32.866155851195408],[-117.25213761523992,32.866169496247323],[-117.25213946753257,32.866183149942856],[-117.25214124830404,32.86619680962901],[-117.25214296716996,32.866210475227795],[-117.25214461451461,32.866224146817238],[-117.25214619674844,32.866237824345291],[-117.25214770743014,32.866251505158942],[-117.25214915944215,32.866265194564264],[-117.25215053990202,32.866278887255199],[-117.25215185202515,32.866292584107505],[-117.25215309902707,32.866306285996778],[-117.25215427769211,32.866319992047323],[-117.25215538480485,32.866333701383532],[-117.25215643106992,32.866347415722061],[-117.25215740469363,32.866361131551571],[-117.25215831320621,32.866374853319748],[-117.25215915337154,32.866388578347525],[-117.25215992835383,32.866402303002346],[-117.25216024449627,32.866408295269267],[-117.25216204447612,32.866421952094122],[-117.25216361710046,32.866435629699858],[-117.25216496447534,32.866449325364286],[-117.25216608761757,32.866463034570401],[-117.25216698331155,32.866476756442452],[-117.25216765149571,32.866490485570552],[-117.25216809433739,32.866504224642334],[-117.25216830957655,32.86651796285512],[-117.25216830051068,32.866531708297885],[-117.25216806271199,32.866545447480313],[-117.25216759727965,32.86655918309885],[-117.2521669063092,32.866572911529296],[-117.2521659876536,32.866586631887479],[-117.25216484446644,32.866600339639021],[-117.252163473522,32.866614033006535],[-117.25216187692608,32.866627709267725],[-117.25216005570599,32.866641364807236],[-117.25215800877262,32.866654997830366],[-117.25215573715322,32.866668604721816],[-117.2521535737484,32.866680455028948],[-117.252005576575,32.86730024934716],[-117.25191421092075,32.867682864135638],[-117.25166231788224,32.868729350825426],[-117.25165848641872,32.868742707041747],[-117.25165472345739,32.8687560735235],[-117.25165102591612,32.868769461116742],[-117.25164739792496,32.868782857163474],[-117.25164383735732,32.868796262582713],[-117.25164034863076,32.868809689963172],[-117.25163692304378,32.86882312584909],[-117.25163356808569,32.868836571081566],[-117.25163027525024,32.868850029336485],[-117.25162706057412,32.868863501385675],[-117.25162390905824,32.868876983743704],[-117.25162082819196,32.868890477251632],[-117.25161780940729,32.868903980175432],[-117.25161486664528,32.868917496910782],[-117.25161198811205,32.868931023946303],[-117.25160917805056,32.868944558542488],[-117.25160644079632,32.868958106074516],[-117.25160376774016,32.868971661201812],[-117.25160116316611,32.868985224791317],[-117.25159863459439,32.868998800389114],[-117.25159616382045,32.869012384535786],[-117.25159376792918,32.869025976191011],[-117.25159144161942,32.869039579004905],[-117.25158918267219,32.869053185781389],[-117.2515869933065,32.869066803716464],[-117.25158487133422,32.869080428319172],[-117.25158282211807,32.869094061349486],[-117.25158084030572,32.869107701949027],[-117.25157892159247,32.869121347447589],[-117.25157708310437,32.869135000411404],[-117.25157530775661,32.869148661880843],[-117.25157359977159,32.869162327312893],[-117.25157196454293,32.86917600117259],[-117.25157039667718,32.86918967899495],[-117.25156890474238,32.869203362513943],[-117.25156747163318,32.869217050966569],[-117.25156696184726,32.869222112110492],[-117.25144808288915,32.870223544283817],[-117.25139434248699,32.870652750925629],[-117.25139213592519,32.870666366290386],[-117.25138922835963,32.870679885439138],[-117.25138563879661,32.870693288379279],[-117.25138135729127,32.870706546335292],[-117.25137639851449,32.870719633939366],[-117.25137077723984,32.87073253484008],[-117.2513644994262,32.870745209312126],[-117.25135757240901,32.870757644671421],[-117.25135001834872,32.870769816390997],[-117.25134184552603,32.870781700958219],[-117.25133725491854,32.870787892603786],[-117.2513275249507,32.870798910584391],[-117.25131725665372,32.870809573129101],[-117.2513064626542,32.870819863002176],[-117.25129516944818,32.870829761052001],[-117.25128338860414,32.870839250953246],[-117.25127115409744,32.870848313493617],[-117.25126632727816,32.870851683673237],[-117.2512551127798,32.870861644203906],[-117.25124338802088,32.870871180537691],[-117.25123117731965,32.870880269933622],[-117.25121850509701,32.870888898667403],[-117.25120539360597,32.870897050327017],[-117.25119187252788,32.870904703931657],[-117.25117582818491,32.870912887470119],[-117.25116194373823,32.8709200669905],[-117.25114778442224,32.870926849261537],[-117.25113336300753,32.870933229671039],[-117.25111869650753,32.870939200866907],[-117.25110380082631,32.870944751899358],[-117.25108869406648,32.870949877211039],[-117.25107339116609,32.870954574877373],[-117.25105791019701,32.87095883663612],[-117.25104226498804,32.870962656964629],[-117.25102648329889,32.870966033834449],[-117.25101057363655,32.870968963569631],[-117.25099455837751,32.870971440578323],[-117.25097845248052,32.870973464739286],[-117.25096227404822,32.87097503049538],[-117.25094541266674,32.87097677221287],[-117.25092920129022,32.870978072215415],[-117.25091295554458,32.870978981135025],[-117.25089668299131,32.870979506124371],[-117.25088039958584,32.870979640741993],[-117.250864118191,32.870979388490738],[-117.2508478516081,32.870978747463319],[-117.25083161374801,32.870977719350535],[-117.2508154174222,32.870976303147017],[-117.25079927441476,32.870974501462427],[-117.25078319972555,32.870972317782353],[-117.25076720081351,32.870969750242871],[-117.25075129590428,32.870966804106949],[-117.25073549781965,32.870963479270728],[-117.25071981510757,32.870959775664979],[-117.2507042628191,32.870955701283656],[-117.25068885169024,32.87095126054853],[-117.25067359988518,32.870946453312598],[-117.25065851064024,32.870941282254975],[-117.25064360220155,32.870935754441838],[-117.25062888529493,32.870929873393429],[-117.25061436960844,32.87092364534373],[-117.2506000722788,32.870917073760793],[-117.25058599762087,32.870910162216916],[-117.250572158559,32.870902919624903],[-117.25055856899355,32.870895346774155],[-117.25055022999511,32.870890467308975],[-117.25053848511141,32.870880950675236],[-117.25052696242412,32.870871240168412],[-117.25051566836451,32.870861337539985],[-117.25050460734994,32.870851255378689],[-117.25049378467162,32.870840989133079],[-117.25048319719578,32.870830545140763],[-117.25047285991168,32.870819925985728],[-117.2504627676,32.870809142531265],[-117.25045293092488,32.870798192887577],[-117.25044334885884,32.870787080670056],[-117.25043402682614,32.870775813048766],[-117.25042496915184,32.870764394497641],[-117.25041618118847,32.870752825874995],[-117.25002423227329,32.870174608678745],[-117.2500159266931,32.870162789044606],[-117.25000779857399,32.870150882307456],[-117.24999985215885,32.870138885727549],[-117.24999208755018,32.870126808321771],[-117.24998450684387,32.870114646466057],[-117.24997710792341,32.870102401981114],[-117.24996989408642,32.87009008295604],[-117.2499628674389,32.870077686668608],[-117.24995603012798,32.870065214003169],[-117.24994938008845,32.870052671288718],[-117.24994292159404,32.870040058490687],[-117.24993665036062,32.870027374742122],[-117.24993057498702,32.870014624482074],[-117.24992468696649,32.870001811386487],[-117.24991899700399,32.869988937172224],[-117.24991350294209,32.869976000053285],[-117.24990820271556,32.869963006358653],[-117.24990310063899,32.869949959660488],[-117.24990111245316,32.869944728471602],[-117.24974577939463,32.86945949443637],[-117.24974083923253,32.869446398628867],[-117.24973554227896,32.869433405802411],[-117.24972988857495,32.869420519563675],[-117.24972388139778,32.869407746198362],[-117.2497175261512,32.869395091073152],[-117.24971082195134,32.869382570426623],[-117.24970377308237,32.869370185125781],[-117.249696387044,32.869357936913481],[-117.2496886640002,32.869345840216234],[-117.24968061035159,32.869333894080469],[-117.24967223374124,32.869322112872275],[-117.2496635298955,32.869310496626177],[-117.24965451175866,32.869299056058345],[-117.2496451793924,32.86928779657871],[-117.24963554030649,32.869276720831721],[-117.2496255967301,32.869265836914884],[-117.24961535300881,32.869255151105399],[-117.2496048273984,32.869244671371142],[-117.24959400923498,32.869234399601773],[-117.24958291247995,32.869224341996578],[-117.24957154469456,32.869214505708271],[-117.2495599059299,32.869204895245147],[-117.24954800584307,32.869195514135924],[-117.24953584778262,32.869186374977964],[-117.24952344549503,32.869177465035513],[-117.24951080462981,32.869168811315298],[-117.24949791972173,32.86916040304034],[-117.24948481228306,32.869152252661166],[-117.24947148016663,32.869144359293244],[-117.24945794160764,32.869136729101257],[-117.24944418917806,32.869129366653958],[-117.24943024004467,32.869122278124671],[-117.24941609951888,32.869115460765116],[-117.24940177309647,32.869108928056967],[-117.24938727353712,32.869102674486477],[-117.24937260523757,32.869096710839052],[-117.24935777774191,32.869091030725137],[-117.24934279653561,32.869085646724749],[-117.24932766908751,32.869080557875833],[-117.24931240718092,32.869075766788093],[-117.24929701940441,32.869071276999101],[-117.24928150790483,32.869067089393198],[-117.24926588979775,32.869063205635371],[-117.24924818326252,32.869060218873933],[-117.24907313041768,32.869030666690634],[-117.24905047148387,32.869030621777853],[-117.24903416088941,32.869030588649558],[-117.24901788060689,32.869030684224185],[-117.24900160444997,32.869031143168243],[-117.24898534843487,32.8690319644505],[-117.24896912638978,32.869033142548702],[-117.24895294696432,32.869034686410345],[-117.24893681747375,32.8690365815484],[-117.24892075727257,32.869038838627262],[-117.24890476947388,32.86904144950617],[-117.24888887011433,32.869044414957173],[-117.24887306556344,32.869047731321828],[-117.24886825766725,32.86904881441874],[-117.2488525550863,32.869052453684354],[-117.24883695747613,32.869056397792278],[-117.24882147016855,32.869060645797774],[-117.24880610271799,32.869065192213142],[-117.24879086685668,32.869070035139977],[-117.24877576793706,32.86907517543694],[-117.24876080802413,32.869080606775036],[-117.24874600206584,32.869086328131843],[-117.24873135857887,32.869092336733175],[-117.24871688180623,32.869098629839669],[-117.24870258022362,32.869105201070525],[-117.24868846450529,32.869112049437845],[-117.24867453670612,32.869119167711055],[-117.24866080862999,32.869126560303556],[-117.24864728439729,32.86913421365589],[-117.24863397472294,32.869142130386791],[-117.24862088379886,32.869150303248347],[-117.24860802014184,32.869158729466548],[-117.24859539114907,32.86916740176779],[-117.24858300108414,32.869176319215867],[-117.24857085626547,32.869185473644031],[-117.24855896737759,32.869194864966012],[-117.24854733857141,32.869204482327355],[-117.24853597303186,32.869214323898909],[-117.2485248835291,32.869224385068748],[-117.24851406677594,32.869234658649546],[-117.24850353552209,32.86924513822602],[-117.24849329616816,32.869255822844906],[-117.24848334859122,32.869266701686165],[-117.24847369705499,32.869277773813671],[-117.24846708809383,32.869285682362502],[-117.24846003735819,32.869298069862687],[-117.2484530284639,32.869310472354087],[-117.24844606576667,32.869322897015422],[-117.24843914920508,32.869335338436713],[-117.24843227555336,32.869347794840607],[-117.24842545020496,32.869360270692276],[-117.24841866781759,32.8693727660348],[-117.24841193154546,32.869385276334008],[-117.24840524034069,32.86939780340191],[-117.24839859529212,32.869410349033124],[-117.24839199317393,32.8694229114503],[-117.24838543933875,32.869435491511922],[-117.2483789284442,32.869448089261198],[-117.24837246366501,32.869460701967149],[-117.24836604715853,32.869473331415882],[-117.24835967357235,32.869485976748983],[-117.24835334504337,32.869498637949107],[-117.2483470669445,32.869511317678139],[-117.24834083067708,32.869524011496793],[-117.2483346394976,32.869536723887506],[-117.24832849869712,32.869549450298798],[-117.24832239974856,32.869562192603041],[-117.24831634909334,32.869574953453487],[-117.24831034557097,32.86958772474383],[-117.24830438710592,32.869600511901197],[-117.24829847367771,32.869613313122336],[-117.24829260750515,32.869626135603404],[-117.2482867863695,32.869638972148223],[-117.24828101452415,32.869651820918946],[-117.2482752877157,32.869664683753491],[-117.24826960703312,32.869677562446512],[-117.24785516968167,32.870755597028214],[-117.24785010748805,32.870768657367485],[-117.24784477300298,32.870781640551755],[-117.24783916402809,32.870794541188225],[-117.24783328696385,32.870807358323461],[-117.2478271417181,32.870820083842347],[-117.2478207325442,32.870832715907063],[-117.24781405726415,32.870845250928092],[-117.24780712115889,32.870857683452343],[-117.24779992633462,32.870870010757443],[-117.24779247277075,32.870882231040028],[-117.2477847635294,32.870894331650817],[-117.24777680619211,32.870906321546087],[-117.24776859315679,32.87091818996609],[-117.24776013825218,32.870929931388723],[-117.24775143293039,32.870941545882872],[-117.24774248997201,32.870953029738352],[-117.24773330291517,32.870964378498456],[-117.24772388023595,32.870975585782517],[-117.24771422835535,32.870986652440351],[-117.24770434400654,32.870997573087777],[-117.24769423248075,32.871008343173258],[-117.24768389804157,32.871018961760626],[-117.24767334065824,32.871029426144737],[-117.24766256559145,32.871039729069132],[-117.24765157389925,32.871049869623427],[-117.24764685095421,32.871054120732317],[-117.2476364012475,32.87106465818718],[-117.2476257975613,32.871075092281522],[-117.24761505908729,32.871085419253454],[-117.24760417627044,32.871095644590461],[-117.24759315219359,32.871105757446642],[-117.24758199013355,32.871115764107849],[-117.24757068893,32.871125656467612],[-117.24755925401722,32.87113544259774],[-117.24754768418357,32.871145109883471],[-117.24753597629531,32.871154664662313],[-117.24752414635894,32.871164105001569],[-117.24751218149154,32.871173425594641],[-117.24750008816525,32.871182631799783],[-117.24748787056201,32.871191715467496],[-117.24747552657549,32.871200679319863],[-117.24746306151742,32.871209520608829],[-117.24745047430908,32.871218238441209],[-117.24743776493011,32.871226831013765],[-117.24742494085986,32.871235298265994],[-117.24741200102972,32.871243640206487],[-117.24739894540922,32.871251854130264],[-117.2473857750258,32.87125993642195],[-117.24737249739979,32.87126789062777],[-117.24735910929515,32.871275714068631],[-117.24734330661245,32.871284703122392],[-117.24732962033964,32.871292146625308],[-117.24731583863881,32.871299467357339],[-117.24730196361634,32.87130666259629],[-117.24728799953597,32.871313731405813],[-117.24727394637716,32.871320671982673],[-117.24725980737621,32.871327487005907],[-117.24724557822846,32.87133417380501],[-117.24723126958808,32.871340729588724],[-117.24721687399627,32.871347156220637],[-117.24720239674429,32.871353449149389],[-117.24718784215717,32.871359612848742],[-117.24717321233106,32.871365643694709],[-117.24715850193388,32.871371542632069],[-117.24714372161969,32.871377306869604],[-117.24712886175193,32.871382934681506],[-117.24711393838835,32.871388428643492],[-117.24709894511814,32.871393788807168],[-117.24708388296902,32.871399011557237],[-117.2470687562558,32.871404100465909],[-117.24705356273931,32.871409046533635],[-117.24703830890211,32.871413856020531],[-117.2470229958025,32.871418528016079],[-117.24700762232095,32.871423058020611],[-117.2469921906557,32.871427451426847],[-117.24697670610838,32.871431704585028],[-117.24696116864848,32.871435814790132],[-117.2469455793853,32.871439785640121],[-117.24692994363068,32.871443614386934],[-117.24691425072032,32.871447302920124],[-117.24689851769887,32.87145084659327],[-117.24688274031287,32.871454247244309],[-117.24686692177804,32.871457505748978],[-117.2468510599473,32.87146062122283],[-117.24683516014269,32.871463591819385],[-117.24681922235411,32.871466416636991],[-117.24680325515989,32.871469098311742],[-117.24678724889293,32.871471632412735],[-117.24677121323079,32.871474024272473],[-117.24675514813273,32.871476270284212],[-117.24673905680413,32.871478370422153],[-117.24672293708792,32.871480322900169],[-117.24670679327828,32.871482129487063],[-117.24669062752254,32.871483791067298],[-117.24667444405384,32.871485303999677],[-117.24665823970761,32.871486671916799],[-117.24664202085401,32.871487891160143],[-117.24662578431831,32.871488964460731],[-117.24660953862796,32.871489889946112],[-117.24659327844067,32.871490667659494],[-117.24657701338297,32.871491298424878],[-117.24656722661179,32.871491605507956],[-117.24630681341822,32.871504699852309],[-117.24600744923103,32.871558252619721],[-117.24600720181444,32.871558296094662],[-117.24598502151321,32.871562264949567],[-117.2444539915129,32.871541615168439],[-117.24421619454192,32.871538471935352],[-117.24411843661764,32.871537178217352],[-117.2440663487932,32.871536489065157],[-117.24388227138959,32.87153261628778],[-117.24388026658799,32.871527872082829],[-117.2438871055674,32.871526936961281],[-117.24387727335004,32.871521518993411],[-117.24387392350813,32.87151330034898],[-117.24386949131315,32.871500077589317],[-117.2438649706704,32.871486876281189],[-117.24386036689177,32.871473693676684],[-117.24385567469606,32.871460535228636],[-117.24385089404248,32.871447397330527],[-117.24384603349931,32.87143428171683],[-117.24384108455953,32.871421192062911],[-117.24383604822025,32.871408122048656],[-117.24383093095361,32.871395077032346],[-117.24382572525987,32.871382055270843],[-117.24382043650174,32.871369058524508],[-117.24381505827873,32.871356087746527],[-117.24380960016633,32.871343139252964],[-117.24380405796192,32.871330219389698],[-117.24379843055644,32.871317324558788],[-117.2437927158129,32.871304454777409],[-117.2437869191144,32.871291613609138],[-117.24378103935183,32.871278797455929],[-117.24377507763438,32.8712660099159],[-117.24376902860959,32.871253250130287],[-117.24376290190393,32.871240518923415],[-117.24375668686315,32.871227819086229],[-117.24375038874825,32.871215143362377],[-117.24374401192482,32.871202499832549],[-117.24373755101998,32.871189885834561],[-117.24373100499577,32.871177304082067],[-117.24372437913351,32.871164749122201],[-117.24371767138797,32.871152229086945],[-117.24371088274613,32.8711397367545],[-117.24370401006374,32.871127277560525],[-117.24369705869334,32.871114852363789],[-117.24369002433055,32.871102458493638],[-117.24368291126959,32.871090097718948],[-117.24367571737363,32.871077770056971],[-117.24366844263245,32.871065474606027],[-117.2436610860082,32.87105321407963],[-117.24365364963776,32.871040988460663],[-117.24364613456935,32.871028795937114],[-117.24363853869657,32.871016639231208],[-117.24363086524521,32.871004520120451],[-117.24362311419492,32.87099243680148],[-117.24361528124129,32.870980386603648],[-117.24360737179801,32.870968375795741],[-117.24359938049221,32.870956401715581],[-117.24359131479297,32.870944463401393],[-117.24358317153563,32.87093256448567],[-117.24357495068972,32.870920702263298],[-117.24356664907017,32.870908878563391],[-117.24355827523496,32.870897094218861],[-117.24354981743089,32.870885349324247],[-117.24354128633256,32.870873642891937],[-117.24353267984374,32.870861978545747],[-117.24352445791746,32.870850965776185],[-117.2435165155285,32.870838968753745],[-117.24350847644071,32.870827019399336],[-117.24350033317491,32.870815117773056],[-117.24348826533725,32.87080352273783],[-117.24348102577197,32.870791215270543],[-117.24347531050611,32.870779711628593],[-117.24346677198939,32.870768008857937],[-117.24345813258162,32.870756361002847],[-117.24344940074911,32.870744760781292],[-117.24344324768957,32.870730350714759],[-117.24343537973836,32.870718319723991],[-117.24342741189328,32.870706337328649],[-117.24341933665463,32.870694401785521],[-117.24341116048421,32.870682517551387],[-117.2434028844301,32.870670682814243],[-117.24339450529716,32.870658898501539],[-117.24338602525286,32.870647167301072],[-117.24337744429718,32.870635489212773],[-117.24336876025258,32.870623860647264],[-117.24335998602203,32.870612288714661],[-117.2433511076341,32.870600766313345],[-117.24334212840618,32.870589303335805],[-117.24333305680456,32.870577892499973],[-117.24332388005861,32.8705665384173],[-117.2433146067263,32.870555241920641],[-117.2433052400027,32.870544002082539],[-117.24329577669273,32.870532819830494],[-117.24328621891294,32.870521693343889],[-117.24327656349872,32.870510626255118],[-117.24326681152867,32.870499619457355],[-117.24325696942387,32.870488673800608],[-117.24324702968454,32.870477787541645],[-117.24323700300563,32.870466961496227],[-117.24322687658598,32.870456197570789],[-117.24321666219905,32.870445497474101],[-117.24320635446169,32.870434857642493],[-117.24319595553132,32.870424279861979],[-117.24318547083166,32.870413771303042],[-117.24317488744956,32.870403323953667],[-117.2431642182371,32.870392940415705],[-117.2431534610981,32.87038262431313],[-117.24314261708062,32.870372373833881],[-117.24313168193123,32.870362190815634],[-117.24312066417727,32.870352073386343],[-117.24310955529137,32.870342023418054],[-117.24309836170465,32.870332042662511],[-117.24308708553377,32.870322129299197],[-117.24307571827164,32.870312287003458],[-117.24306427379811,32.870302514761953],[-117.24305274141841,32.870292811758887],[-117.24304112968026,32.870283177925472],[-117.24302943327177,32.870273616009726],[-117.24301765327171,32.870264126904658],[-117.24300579608062,32.870254709656997],[-117.24299385424978,32.87024536703192],[-117.24298183626576,32.870236093550645],[-117.24296973688813,32.870226898272797],[-117.242957557114,32.870217774878043],[-117.24294530338472,32.870208726019904],[-117.24293296823122,32.870199752660092],[-117.24292056021135,32.870190855631513],[-117.24290807398279,32.870182034977233],[-117.24289551165194,32.87017328797485],[-117.24288287754347,32.870164619098468],[-117.24287016633546,32.870156030194323],[-117.2428573812129,32.870147519433232],[-117.24284452537097,32.870139085887807],[-117.2428315988097,32.870130729557978],[-117.24281859728571,32.870122453183086],[-117.24280552615149,32.870114257621829],[-117.24279238751335,32.87010614015206],[-117.24277917714841,32.870098105316451],[-117.242765897163,32.870090150392741],[-117.24275255292989,32.870082278042972],[-117.2427391369597,32.870074487425583],[-117.24272565780009,32.870066778471902],[-117.24271210689317,32.870059150348908],[-117.24269849924822,32.870051607444701],[-117.24269208263942,32.870048107914236],[-117.24268630886073,32.870042959330483],[-117.2426815054924,32.870038677645823],[-117.24245966347868,32.869961497347454]],[[-117.24853301146474,32.871487223019614],[-117.24851674301169,32.871486706141219],[-117.24850509625489,32.871486953564634],[-117.24768105055527,32.871485364906349],[-117.24766544475784,32.871481467317878],[-117.24765039343937,32.871476240580641],[-117.24763605006676,32.871469742971101],[-117.24762257357206,32.871462043542664],[-117.24761010051036,32.871453216939912],[-117.24759876129158,32.871443361302596],[-117.24758867570216,32.871432580266756],[-117.24757995287423,32.871420980259643],[-117.24757602898352,32.87141475109761],[-117.24757011918317,32.871401974137996],[-117.2475674674134,32.871388439553932],[-117.2475681850586,32.871374735288391],[-117.24757223927975,32.871361452252195],[-117.24757945701273,32.871349159944337],[-117.24758953017795,32.8713383946872],[-117.24759789110053,32.8713321186355],[-117.24760316414084,32.87132841225219],[-117.24761559674879,32.871319536042932],[-117.24762791373969,32.871310547145626],[-117.24764011189778,32.871301444684413],[-117.24765219554817,32.871292233133225],[-117.24766415718085,32.871282909847494],[-117.24767600003179,32.871273477506314],[-117.24768772089571,32.871263936135662],[-117.24769931766626,32.87125428845777],[-117.24771078927503,32.87124453448137],[-117.24772213469436,32.871234677821768],[-117.24773334962998,32.871224716710152],[-117.24774444051315,32.871214652898118],[-117.24775539881664,32.871204488258087],[-117.24776622560873,32.871194222781462],[-117.24777692093056,32.87118386007495],[-117.24778747941919,32.871173398378367],[-117.24779965514757,32.871161190458174],[-117.24781041402257,32.871150873224607],[-117.24782100050848,32.871140431137469],[-117.24783141784125,32.871129866875926],[-117.24784165646615,32.87111918592759],[-117.24785172593798,32.871108382804927],[-117.24786161352726,32.871097465726557],[-117.24787132456611,32.871086433747571],[-117.24788084842092,32.871075291462752],[-117.24789019897167,32.871064037858304],[-117.24789935915358,32.8710526757773],[-117.24790833543884,32.871041210577957],[-117.24791712245445,32.871029639598575],[-117.24792571812492,32.871017968266358],[-117.2479341246281,32.871006200170775],[-117.24794233767996,32.870994334444738],[-117.24795035410585,32.870982373819203],[-117.24795817822054,32.870970321866267],[-117.24796580146617,32.870958177753444],[-117.2479732292465,32.870945946847584],[-117.24798045305474,32.870933632824361],[-117.24798747501764,32.870921234764957],[-117.24799429624474,32.87090875626749],[-117.2480009092567,32.870896197392284],[-117.24800731947785,32.870883565309612],[-117.24801352264461,32.870870860955684],[-117.24801951768852,32.870858084339197],[-117.24802530249325,32.870845237280747],[-117.24803087820916,32.870832326985088],[-117.24803624267889,32.870819351666114],[-117.24804139380659,32.870806314947849],[-117.24845260054698,32.869731062481513],[-117.2484553199664,32.869724749901955],[-117.24846092875201,32.869711846532255],[-117.2484666051043,32.869698965159969],[-117.24847234797515,32.86968610759704],[-117.24847815945031,32.869673269317843],[-117.24848403958093,32.869660454830807],[-117.24848998085712,32.869647661491271],[-117.24849599504203,32.869634890105914],[-117.24850207144092,32.869622139859395],[-117.24850821650539,32.869609414306659],[-117.2485144259104,32.869596708973774],[-117.24852070509041,32.869584031932625],[-117.2485270496589,32.869571373299401],[-117.24853345863956,32.869558741197771],[-117.24853993414877,32.869546133807056],[-117.24854647400866,32.869533547537856],[-117.24855308041759,32.869520987782913],[-117.24855975121804,32.869508452756094],[-117.24856649175234,32.869495942414311],[-117.24857329346261,32.869483455924922],[-117.24858016065338,32.869470995958359],[-117.24858709437247,32.869458560702689],[-117.24859409250352,32.869446151978423],[-117.24860115291987,32.869433770704603],[-117.2486082787858,32.869421413248467],[-117.24861546696772,32.869409085947794],[-117.248622730246,32.869396785092142],[-117.24863004616273,32.869384509059572],[-117.24863822786847,32.869371315261603],[-117.24864793862963,32.869360284122919],[-117.24865805628045,32.869349515710532],[-117.24866857031043,32.869339025439047],[-117.24867947651727,32.869328819654548],[-117.24869076007579,32.869318910199581],[-117.24870240832836,32.869309311604312],[-117.24871441596343,32.869300026616756],[-117.24872675855009,32.869291068058921],[-117.2487394372591,32.869282444938612],[-117.2487524329608,32.86927416642795],[-117.24876573287492,32.869266236237102],[-117.24877932539191,32.869258667084331],[-117.24879319349847,32.869251466321082],[-117.24880732551361,32.869244640353905],[-117.24882170656106,32.869238196516989],[-117.24883632065509,32.869232138546529],[-117.24885115721389,32.869226475545403],[-117.24886619600871,32.86922121398937],[-117.24888143170776,32.869216354823202],[-117.24889683877089,32.869211907270873],[-117.24891240331868,32.869207872346209],[-117.24892416252126,32.869205696934543],[-117.24894015370816,32.869203099552195],[-117.2489562241485,32.869200894689733],[-117.24897236855162,32.869199086898512],[-117.24898856556921,32.869197678154705],[-117.2490048055752,32.869196667634348],[-117.24902107042679,32.869196057287674],[-117.24903735269628,32.869195851683394],[-117.24905363628547,32.869196044639537],[-117.24906990198311,32.869196638114836],[-117.2490861423,32.86919763126825],[-117.24910234229867,32.869199026023963],[-117.24911848694938,32.869200816191409],[-117.24913456241376,32.869203006391139],[-117.24915055685727,32.869205589505007],[-117.24916645212663,32.869208566581491],[-117.24917824845502,32.869210884262195],[-117.2491940029707,32.869214357533885],[-117.24920962531382,32.869218235856245],[-117.24922509829736,32.869222511252545],[-117.24924041334322,32.869227181087005],[-117.2492555501715,32.869232247327233],[-117.24927049692714,32.869237701051595],[-117.24928523853947,32.869243532462946],[-117.24929976646096,32.869249741630398],[-117.24931406140864,32.869256324201238],[-117.24932810509605,32.869263269502532],[-117.24934190388279,32.869270572974131],[-117.24935542564394,32.869278228563729],[-117.24936866385626,32.869286226405023],[-117.2493816110304,32.869294565656816],[-117.24939424241812,32.869303231189697],[-117.24940656434821,32.869312215738617],[-117.24941855434226,32.869321515878489],[-117.2494301994254,32.869331118188072],[-117.24944149630008,32.869341014578424],[-117.24945242464537,32.869351203410581],[-117.24946298529403,32.869361663937561],[-117.24947316109971,32.86937239178954],[-117.24948294338159,32.869383375314023],[-117.24949232671554,32.869394607341],[-117.24950129599972,32.869406075368261],[-117.24950985110088,32.869417767674221],[-117.24951797908496,32.86942967444439],[-117.24952567341815,32.869441784910634],[-117.24953292223475,32.869454089249864],[-117.2495397285761,32.869466573009568],[-117.24954607952847,32.869479228178477],[-117.2495519706335,32.869492038561326],[-117.24955739430948,32.869504995201957],[-117.24971272640944,32.869990229473572],[-117.24971497230773,32.869996136695583],[-117.24972005840391,32.870009189842868],[-117.24972531284632,32.870022200147318],[-117.24973073337513,32.870035156806161],[-117.24973631895274,32.870048062532959],[-117.24974206748321,32.870060920951801],[-117.24974798102159,32.870073724831947],[-117.24975405955772,32.870086473271634],[-117.24976029775958,32.870099167215848],[-117.24976669772313,32.870111803040565],[-117.24977326050674,32.870124379835481],[-117.2497799817956,32.870136894028448],[-117.24978686167172,32.870149352832769],[-117.24979390106017,32.870161743616464],[-117.24980109893356,32.870174069994782],[-117.24980845206603,32.870186330190357],[-117.24981596474174,32.870198525070222],[-117.24982362943031,32.870210650186529],[-117.24983144929615,32.870222701906613],[-117.24983942118519,32.870234684764775],[-117.24984754611464,32.870246594243987],[-117.24985582299567,32.870258428549526],[-117.25024670229773,32.870835208526579],[-117.25025009475313,32.870839699727824],[-117.25025898678766,32.870851212512868],[-117.25026808262712,32.870862605518113],[-117.25027739305865,32.870873887673646],[-117.25028689653874,32.870885043824146],[-117.25029660379315,32.870896077489711],[-117.25030651155494,32.870906983286247],[-117.25031661765648,32.870917758525998],[-117.25032691357052,32.870928405081472],[-117.25033740242058,32.870938915713332],[-117.25034808313811,32.870949290430168],[-117.25035894713443,32.870959525694502],[-117.25036999652599,32.870969619685575],[-117.25038122916564,32.870979571519086],[-117.25039263859129,32.870989376738493],[-117.25040422263521,32.870999032656044],[-117.2504159844824,32.871008537442428],[-117.25042791343779,32.871017890282445],[-117.25043467059211,32.871022079200117],[-117.2504479525107,32.871030035995773],[-117.25046142297052,32.871037752299678],[-117.25047508626578,32.871045229880544],[-117.25048893582171,32.871052454363522],[-117.25050296101493,32.871059431245072],[-117.25051716715707,32.871066157776887],[-117.25053153169735,32.871072624222286],[-117.25054605366981,32.87107883960654],[-117.25056073611563,32.871084789476903],[-117.25057556087079,32.871090473980558],[-117.25059052367156,32.871095894053639],[-117.25060562337764,32.87110104339304],[-117.25062084609868,32.871105922111283],[-117.25063618644108,32.871110525743241],[-117.2506516422883,32.871114856109472],[-117.25066720074666,32.871118907002206],[-117.25068286077843,32.871122681134977],[-117.25069860946958,32.871126170496588],[-117.2507144457924,32.871129378702378],[-117.25073035689449,32.87113230315115],[-117.25074633634429,32.871134942091409],[-117.2507623809466,32.871137296450868],[-117.25077847779744,32.871139359119937],[-117.25079462696861,32.871141136410273],[-117.25081081448764,32.871142621221118],[-117.25082703828937,32.871143819881347],[-117.25084328439118,32.871144724388479],[-117.25085955392295,32.871145340143897],[-117.25087583293282,32.871145661850072],[-117.25089211827684,32.871145694942982],[-117.25090839710239,32.871145436821486],[-117.25092466937855,32.871144884780527],[-117.25094092126638,32.87114404344112],[-117.25095714845078,32.871142909231118],[-117.25097334559949,32.871141483095492],[-117.25098950320898,32.871139775030542],[-117.2509973101446,32.87113892815951],[-117.25101341949225,32.871136922905123],[-117.25102946283648,32.871134563795856],[-117.25104542735542,32.871131850935647],[-117.25106129922035,32.871128789847049],[-117.25107707953032,32.871125383226428],[-117.25109273942627,32.871121630405916],[-117.25110828430168,32.871117535850651],[-117.2511237013552,32.871113101467856],[-117.2511389681695,32.871108329242709],[-117.25113876228255,32.871122070867266],[-117.25113846233953,32.871135810548665],[-117.25113807154574,32.871149548260995],[-117.25113758669583,32.871163284030203],[-117.25113700995735,32.871177020544032],[-117.2511363455119,32.871190749652712],[-117.25113557952056,32.871204475977265],[-117.2511347237262,32.871218198520744],[-117.2511337749029,32.871231915505746],[-117.2511327363073,32.871245631414673],[-117.25113160251489,32.871259339077483],[-117.25113037680291,32.871273044779812],[-117.25112906118514,32.871286737684386],[-117.25112764937376,32.871300428663169],[-117.25112614451265,32.871314112280139],[-117.25112455087563,32.871327788500686],[-117.25112286311007,32.871341456466425],[-117.25112108443153,32.871355117053064],[-117.25111920734027,32.871368768517833],[-117.251117244627,32.871382408051865],[-117.251115188874,32.871396041125706],[-117.25111304110862,32.871409664124094],[-117.25111079915288,32.871423273457694],[-117.25110846843114,32.871436876296443],[-117.25110604351894,32.871450465470353],[-117.25110352759091,32.871464038248483],[-117.25110091969134,32.871477604557718],[-117.2510982208066,32.871491157176195],[-117.251095426673,32.871504697040073],[-117.25109254580758,32.871518221375133],[-117.25108957610404,32.871531732903712],[-117.2510865079051,32.871545228097069],[-117.2510833519364,32.871558710475249],[-117.25108010496184,32.871572177359191],[-117.25107914902456,32.871576066234198],[-117.25068828141487,32.871573738269454],[-117.2506719985101,32.871573644712072],[-117.25017035296118,32.871570835303459],[-117.24963621115131,32.87156784132064],[-117.24915413886306,32.871565135436967],[-117.24867789452965,32.871562515827328],[-117.24867537369073,32.871556201415153],[-117.24866947298953,32.871543393773749],[-117.24866523637147,32.871535132827205],[-117.24865278218167,32.871526284534276],[-117.24863959115446,32.871518231226403],[-117.24862573539927,32.871511018309697],[-117.24861128694376,32.871504683976951],[-117.24859632740078,32.871499263638363],[-117.24858093618502,32.871494787311271],[-117.24856519473539,32.871491275077624],[-117.24854919306925,32.871488749655228],[-117.24853301146474,32.871487223019614]],[[-117.25244358044726,32.86630270658469],[-117.25244562625974,32.86628907356539],[-117.25244759074924,32.866275430384924],[-117.2524494707413,32.866261779774284],[-117.25245126947206,32.866248124412465],[-117.25245298366438,32.866234458013842],[-117.25245461550651,32.866220785069316],[-117.25245616284109,32.866207103793059],[-117.25245762891448,32.866193417765622],[-117.25245901052152,32.866179727013005],[-117.25246030976825,32.866166028812927],[-117.25246152451784,32.866152323182746],[-117.25246265803725,32.866138615506408],[-117.25246370708021,32.866124902203254],[-117.25246467166725,32.866111185076626],[-117.25246555391467,32.866097462305873],[-117.25246635167552,32.866083733006626],[-117.25246707149373,32.86607000884861],[-117.25246770037383,32.866056274607431],[-117.25246824698642,32.866042541033821],[-117.25246871241021,32.866028809020762],[-117.2524690932962,32.866015065970863],[-117.25246938980878,32.866001326310872],[-117.252469604054,32.865987587318408],[-117.25246973383342,32.865973843600848],[-117.25246978244482,32.865960103247119],[-117.25246974662129,32.865946360873245],[-117.25246962639376,32.865932619184299],[-117.25246942069383,32.86591887818885],[-117.25246913382598,32.865905140557295],[-117.25246876252342,32.865891400905625],[-117.25246831005303,32.865877664617834],[-117.25246777207958,32.865863926318546],[-117.25246714979482,32.865850196819132],[-117.25246644951672,32.865836467952604],[-117.25246565845531,32.865822742527904],[-117.25246478512703,32.865809017770758],[-117.25246383066198,32.865795299082521],[-117.25246279186521,32.865781587390764],[-117.25246166868546,32.865767878187157],[-117.25246046434847,32.865754173249165],[-117.25245917459094,32.865740473512986],[-117.25245780370716,32.865726780747316],[-117.25245634848157,32.865713094076455],[-117.25245481210924,32.865699412572852],[-117.25245319033699,32.86568573807434],[-117.25245148745923,32.86567207234971],[-117.25244892611151,32.865657334196491],[-117.25244653056109,32.865643737214697],[-117.25244410839379,32.865630148564598],[-117.25244165101108,32.865616563807187],[-117.25243917121324,32.865602981035124],[-117.25243665835738,32.865589403941726],[-117.25243411349132,32.865575830714981],[-117.25243153987165,32.865562265837333],[-117.2524289352281,32.865548697604268],[-117.25242629967363,32.865535135934252],[-117.25242363426636,32.865521579916894],[-117.25242093897555,32.865508026847252],[-117.25241820849001,32.865494479473512],[-117.25241545880488,32.865480934960871],[-117.25241267285668,32.865467396152809],[-117.25240985488816,32.86545386030982],[-117.25240701028238,32.865440330995085],[-117.25240413364607,32.865426803743695],[-117.25240122502028,32.865413282162329],[-117.25239828978815,32.865399769814225],[-117.25239532139541,32.865386254128161],[-117.25239232425959,32.865372747692696],[-117.25238929830869,32.865359244196235],[-117.25236468713051,32.865200028070802],[-117.25236341797218,32.865186727641614],[-117.25236224994285,32.865173018801073],[-117.25236122078485,32.865159307030318],[-117.25236033148433,32.865145585107314],[-117.2523595821131,32.865131859343705],[-117.25235896943509,32.865118127060548],[-117.25235850095993,32.865104390902161],[-117.25235816817103,32.865090653642909],[-117.25235797955399,32.865076909803363],[-117.25235792665399,32.865063167567953],[-117.25235801801814,32.86504942686733],[-117.25235824613674,32.865035685057123],[-117.25235861320819,32.865021947530046],[-117.25235912133833,32.865008211563655],[-117.25235976949989,32.864994480773468],[-117.25236055767222,32.864980753356001],[-117.25236148593739,32.864967036524597],[-117.25236255100803,32.864953323091953],[-117.25236375614061,32.864939617540436],[-117.25236510459155,32.864925924352306],[-117.25236658988888,32.864912238169602],[-117.25236821317274,32.864898565295299],[-117.25236997549096,32.864884903917392],[-117.25237187793242,32.864871255830501],[-117.25237391838078,32.864857622855396],[-117.25237610108906,32.864844003153934],[-117.25237841755113,32.864830400402241],[-117.25238087527644,32.864816817244574],[-117.25238346889218,32.864803251019261],[-117.25238620055563,32.86478970351223],[-117.25238907242402,32.864776176509565],[-117.25239208022374,32.864762670045927],[-117.25239522613256,32.864749187710579],[-117.25239850801371,32.864735729520916],[-117.25240192796284,32.864722291852864],[-117.25240548179866,32.864708882856071],[-117.2524091748118,32.864695497978857],[-117.25241300277999,32.864682141764312],[-117.25241696781934,32.86466881239167],[-117.25242106570765,32.864655514403935],[-117.25242530173546,32.864642243249399],[-117.25242967171128,32.864629006176074],[-117.25243417454621,32.864615801389306],[-117.25243881237682,32.86460262887168],[-117.25244358308701,32.864589490443926],[-117.2524484920288,32.864576386964259],[-117.25245352743964,32.864563317626455],[-117.2524587011128,32.864550285941746],[-117.25246400453204,32.864537294684531],[-117.25246943980314,32.864524341132352],[-117.25247500801507,32.864511427079933],[-117.25248070704124,32.864498553446211],[-117.25248653691246,32.86448572293623],[-117.25249249761831,32.864472934648212],[-117.25249858596393,32.864460189509906],[-117.2525048051853,32.86444749020027],[-117.252511154183,32.864434834022859],[-117.2525176319504,32.864422226396435],[-117.25252423744985,32.864409670034625],[-117.25253096947934,32.864397153224381],[-117.25253782286119,32.864384690435692],[-117.25254481359053,32.864372278833521],[-117.25255192562079,32.86435991674454],[-117.25255916219824,32.86434760774943],[-117.25256652543916,32.864335350027368],[-117.25256868847787,32.864332198893671],[-117.25257693248753,32.864320346122973],[-117.25258529901008,32.864308555479958],[-117.25259378594983,32.864296830588565],[-117.25260239755976,32.864285169610717],[-117.25261112952516,32.864273568974575],[-117.25261998727017,32.864262035849876],[-117.25262895583735,32.864250570358216],[-117.25263805228998,32.864239169655633],[-117.25264726707425,32.864227839230239],[-117.25265659910116,32.864216577287301],[-117.25266604945971,32.864205385621517],[-117.25267561173943,32.864194264284848],[-117.25268529423826,32.86418169105643],[-117.25284811093289,32.864181894354367],[-117.25335248120541,32.863573120874911],[-117.253362523889,32.863563663819008],[-117.25337602485143,32.863556048001939],[-117.25339139138225,32.863551619144665],[-117.25340758950298,32.863550685025537],[-117.25381173045785,32.863577635754481],[-117.25421264554285,32.863607359918696],[-117.25425148421589,32.863527369199922],[-117.25488634865158,32.863552437956528],[-117.25475940057369,32.864144635165502],[-117.25478218944542,32.864144191019349],[-117.25480679830953,32.864143778957313],[-117.2545986033344,32.86521480494352],[-117.25459695424759,32.865223286685904],[-117.25459585622242,32.865228936059779],[-117.2545669882162,32.865357865828663],[-117.25456396359442,32.865371368877433],[-117.25456093894081,32.865384869221167],[-117.25455791860105,32.865398373136713],[-117.25455489397646,32.865411876185263],[-117.25455186615604,32.865425380161447],[-117.25454884790913,32.865438880452757],[-117.25454582328179,32.865452383501051],[-117.25454279545863,32.865465887477008],[-117.25453977833909,32.86547939316938],[-117.25453675048315,32.865492894440173],[-117.2545337322625,32.865506397436057],[-117.25453070764078,32.86551990138571],[-117.25452767980265,32.86553340445959],[-117.2545246615792,32.865546907455276],[-117.25452163374949,32.865560411430664],[-117.25451861018225,32.865573914469614],[-117.25451558555586,32.865587418418862],[-117.25451256412349,32.865600921440254],[-117.25450953942324,32.865614419077637],[-117.254506514825,32.865627925731602],[-117.25450349335897,32.865641426047837],[-117.25450046982725,32.865654932692955],[-117.25449744515417,32.865668433035019],[-117.25449442372654,32.865681936957628],[-117.25449139908253,32.865695440004551],[-117.25448837443751,32.865708943051445],[-117.25448534980188,32.865722446999875],[-117.25448232942864,32.865735950011782],[-117.25447930479116,32.865749453960085],[-117.25447628014247,32.865762957006609],[-117.2544732555031,32.865776460954777],[-117.2544702340269,32.865789961270103],[-117.25446720934453,32.865803461611385],[-117.25446418473328,32.865816968264284],[-117.25446116435354,32.865830471275693],[-117.25445813970958,32.865843975223441],[-117.25445511505437,32.865857478269461],[-117.25445209036735,32.865870978610367],[-117.25444906892582,32.865884482531783],[-117.25444604426782,32.865897985577611],[-117.25444302068765,32.865911489516257],[-117.25443999917125,32.865924987125808],[-117.25443697454136,32.865938492876346],[-117.25443394992082,32.865951999528463],[-117.25443092525821,32.865965502573822],[-117.25442790377927,32.865979003789768],[-117.25442488021407,32.865992509531289],[-117.25442185552812,32.866006010773077],[-117.254418834067,32.866019513792089],[-117.25441580936887,32.866033014132128],[-117.25441278474185,32.866046520783676],[-117.2544097600727,32.866060023828531],[-117.25440673965565,32.866073525035198],[-117.2544037149847,32.866087028079903],[-117.25440069031281,32.866100531124495],[-117.25439766565022,32.866114035070709],[-117.25439464418172,32.866127538089096],[-117.25439161951734,32.86614104203511],[-117.25438859481083,32.866154542374446],[-117.25438557444909,32.866168048990581],[-117.25438254974071,32.866181549329724],[-117.25437952506232,32.866195052373769],[-117.25437650359851,32.866208556293351],[-117.25700946525153,32.866966018613567],[-117.25703874736075,32.866910228525803],[-117.25741099497253,32.867018295619815],[-117.25737055613727,32.867144878479294],[-117.25697995157384,32.867032108566477],[-117.2543613844513,32.866276070575715],[-117.2543583597664,32.866289573619298],[-117.25435533512172,32.866303080269383],[-117.25435231360932,32.866316580581682],[-117.25434928995921,32.866330080911261],[-117.25434626531177,32.866343587561126],[-117.25434324382744,32.866357090578234],[-117.2543402191164,32.866370591817976],[-117.25433719442498,32.866384094860976],[-117.25433416974295,32.866397598805513],[-117.25433114932333,32.866411101813611],[-117.25432812462914,32.86642460485637],[-117.25432509991342,32.866438106095664],[-117.25432207524831,32.866451611843281],[-117.254319053736,32.866465113056378],[-117.25431602906897,32.866478618803811],[-117.25431300430839,32.866492116436199],[-117.25430998392345,32.866505623050386],[-117.25430695922276,32.866519126092633],[-117.25430393453144,32.866532630036403],[-117.25430091300328,32.866546130347444],[-117.25429788837185,32.866559639701066],[-117.25429486360569,32.866573137332935],[-117.25429183999971,32.866586643071066],[-117.2542888184781,32.866600144283382],[-117.25428579377093,32.866613647325131],[-117.25428276907313,32.866627151268354],[-117.25427974436407,32.866640654309855],[-117.25427672282849,32.866654154620228],[-117.25427369919633,32.866667658554576],[-117.2542706745154,32.866681164300864],[-117.25426765298728,32.86669466551264],[-117.25426462827365,32.866708168553764],[-117.25426160356929,32.866721672496446],[-117.25425857885378,32.866735175537428],[-117.25425555844183,32.866748681248581],[-117.25425253367298,32.866762179781063],[-117.25424950895474,32.866775682821803],[-117.25424648107139,32.866789189495158],[-117.25424346273086,32.866802689778666],[-117.25424043480447,32.866816192845235],[-117.25423741650324,32.866829696735195],[-117.25423438964344,32.866843199792903],[-117.25423136492984,32.866856703734818],[-117.25422834661553,32.866870206722936],[-117.25422531866397,32.866883707985757],[-117.25422230034781,32.866897210973683],[-117.25421927241499,32.866910714039697],[-117.25421624876516,32.866924217972546],[-117.2542132272101,32.866937718281321],[-117.25421020252087,32.866951224927689],[-117.25420717778957,32.86696472796735],[-117.25420415305732,32.866978231006925],[-117.25420113150884,32.866991732217052],[-117.25419810784318,32.867005235247767],[-117.25419508311846,32.867018739188779],[-117.25419205838249,32.867032242228028],[-117.25418903686119,32.867045746142828],[-117.25418601209249,32.867059246476963],[-117.25418298735377,32.867072749516005],[-117.25417996689804,32.867086253421874],[-117.25417694215743,32.867099756460718],[-117.25417391742626,32.867113260401197],[-117.2541708926838,32.867126763439913],[-117.25416787114568,32.867140266452516],[-117.2541648463808,32.867153767687739],[-117.25416182163556,32.867167270726213],[-117.25415880117336,32.867180774631599],[-117.25415577642627,32.86719427766991],[-117.25415275168854,32.867207781609842],[-117.25414972693962,32.867221284648011],[-117.25414670539499,32.867234787660045],[-117.25414368062367,32.867248288894743],[-117.25414065697122,32.867261794629009],[-117.25413763543409,32.867275298542488],[-117.25413591805507,32.867282953026461],[-117.25413461068051,32.867288801580273],[-117.25413158592602,32.867302304617937],[-117.25412856114998,32.867315805852321],[-117.25412553959887,32.867329308863795],[-117.25412251592029,32.867342812794256],[-117.2541194911621,32.86735631583165],[-117.25411646641322,32.867369819770651],[-117.25411344485839,32.867383322781812],[-117.25411042009738,32.867396825819036],[-117.25410739531488,32.867410327052752],[-117.25410437375726,32.8674238300637],[-117.25410135010308,32.867437336698629],[-117.2540983253075,32.867450837030539],[-117.25409530371624,32.867464337336237],[-117.25409227895994,32.867477841274614],[-117.25408925419244,32.867491344311247],[-117.25408622946517,32.867504850954425],[-117.25408320896949,32.867518353956207],[-117.2540801841786,32.867531855189256],[-117.25407715940739,32.867545358225556],[-117.25407413463527,32.86755886126182],[-117.2540711130469,32.867572362468636],[-117.2540680882729,32.867585865504701],[-117.25406506460752,32.867599372138663],[-117.25406203983168,32.867612875174594],[-117.25405901826015,32.867626378184404],[-117.25405599346186,32.86763987941687],[-117.25405296868321,32.867653382452566],[-117.2540499471192,32.867666886363807],[-117.25404692340716,32.867680389390664],[-117.25404389863603,32.867693893327761],[-117.25404087702809,32.867707393632138],[-117.25403785227564,32.867720899372465],[-117.25403482747082,32.86773440060432],[-117.25403180268569,32.867747903639476],[-117.25402878111521,32.867761407550148],[-117.25402575739668,32.8677749105765],[-117.25402273260872,32.867788413611393],[-117.25401970779929,32.867801914842907],[-117.25401668621478,32.867815417851652],[-117.25401366143436,32.867828921788025],[-117.2540106366427,32.867842424822641],[-117.2540076129597,32.867855931455139],[-117.25400459134065,32.867869431758542],[-117.25400156654625,32.86788293479291],[-117.25399854176119,32.86789643872887],[-117.25399552017021,32.867909941737075],[-117.25399249535241,32.867923442967886],[-117.25398947159181,32.867936943288257],[-117.25398645002892,32.867950449001192],[-117.2539834252392,32.867963952936826],[-117.25398040043827,32.867977455970646],[-117.2539773756158,32.867990957201066],[-117.25397435408009,32.868004465618689],[-117.25397132921469,32.868017963242316],[-117.25396830551962,32.868031469873792],[-117.25396528388846,32.868044970176236],[-117.25396225912314,32.868058476816245],[-117.25395923428484,32.868071977144517],[-117.25395620948677,32.868085481079397],[-117.25395318788283,32.868098984086522],[-117.25395016414105,32.868112487110871],[-117.25394713927849,32.868125985635544],[-117.25394411132285,32.868139494104504],[-117.25394109289988,32.868152995281903],[-117.25393806488066,32.868166498340713],[-117.25393504647644,32.868180001321271],[-117.25393202277021,32.868193507951858],[-117.2539289946865,32.868207005600425],[-117.2539259763206,32.868220512187456],[-117.25392294829678,32.868234015245882],[-117.25391992986734,32.868247516422727],[-117.25391690187246,32.868261022185976],[-117.25391387808867,32.868274522504407],[-117.25391085327669,32.868288026438172],[-117.25390783165881,32.868301529444075],[-117.25390480684494,32.868315033377641],[-117.25390178201994,32.868328536409457],[-117.25389876039925,32.868342039415118],[-117.25389573555178,32.868355540643492],[-117.25389271179233,32.868369043666391],[-117.25388968697388,32.868382547599573],[-117.25388666534947,32.868396050604936],[-117.25388364052912,32.868409554537934],[-117.25388061569755,32.868423057569295],[-117.25387759403955,32.868436557869416],[-117.25387457031573,32.868450064498504],[-117.25387154548139,32.868463567529538],[-117.2538685206564,32.868477071462181],[-117.25386549899467,32.868490571762081],[-117.25386247415753,32.868504074792881],[-117.25385944932981,32.868517578725239],[-117.25378385479812,32.868855155153085],[-117.25378083101468,32.868868659074728],[-117.2537778093569,32.868882162077369],[-117.25377478450315,32.868895666007575],[-117.2537717596073,32.868909166331079],[-117.25376873794674,32.868922669333458],[-117.25376571309019,32.868936173263464],[-117.25376268822244,32.868949676291727],[-117.25375966443247,32.868963180212859],[-117.2537566427682,32.868976683214925],[-117.25375361789769,32.868990186242911],[-117.25375059300565,32.869003687467576],[-117.25374757133859,32.869017190469386],[-117.25374454647556,32.869030694398838],[-117.25374152266973,32.869044197417871],[-117.25373849776368,32.869057697740466],[-117.25373547613404,32.869071204348707],[-117.25373245125701,32.869084707376153],[-117.25372942638933,32.869098211305193],[-117.25372640147962,32.869111711627504],[-117.25372338088386,32.869125215521727],[-117.25372035600311,32.869138718548889],[-117.25371733109057,32.869152218871022],[-117.25371430945442,32.869165725478609],[-117.2537112845709,32.869179228505544],[-117.25370825969671,32.869192732434058],[-117.25370523584891,32.869206232747175],[-117.25370221416799,32.869219735747834],[-117.25369918932184,32.869233242381121],[-117.25369616440284,32.86924674270265],[-117.25369314269847,32.869260243899802],[-117.25369011780842,32.869273746926154],[-117.25368709295861,32.869287253559115],[-117.2536840691352,32.869300756576671],[-117.25368104741686,32.869314256871782],[-117.25367802253341,32.869327760799571],[-117.25367499763874,32.869341263825554],[-117.25367197275341,32.869354767753137],[-117.25366895106224,32.869368270752943],[-117.25366592723321,32.869381773770016],[-117.2536629023451,32.869395277697414],[-117.25365988062028,32.869408777991971],[-117.25365685576118,32.869422284624179],[-117.25365383082919,32.869435784944621],[-117.25365080911187,32.86944928614065],[-117.25364778530813,32.86946279186229],[-117.25364476040417,32.869476294887498],[-117.25364173227335,32.869489796135348],[-117.25363871380911,32.869503301813324],[-117.25363568567646,32.869516803061082],[-117.25363266079961,32.869530308790999],[-117.25362964333935,32.869543809050036],[-117.25362661523477,32.869557313002474],[-117.253623596735,32.869570815975102],[-117.25362056862856,32.869584319927455],[-117.25361754371622,32.869597822951974],[-117.25361452519313,32.86961132412101],[-117.25361149710444,32.869624829876379],[-117.25360847325783,32.869638332891995],[-117.2536054515266,32.869651834086888],[-117.25360242660966,32.869665337111009],[-117.25359940170206,32.869678841036716],[-117.25359637998861,32.869692344034689],[-117.25359335506887,32.869705847058583],[-117.25359033119608,32.869719348270415],[-117.25358730630532,32.86973285399916],[-117.25358428456759,32.86974635519347],[-117.25358125964419,32.869759858217066],[-117.25357823473009,32.869773362142269],[-117.25357520980478,32.869786865165693],[-117.25357218915235,32.869800368154337],[-117.25356916420461,32.869813869374283],[-117.25356613927653,32.869827372397495],[-117.25356311756315,32.869840876296273],[-117.25356009263321,32.869854379319335],[-117.25355706770233,32.869867882342291],[-117.25355404278083,32.869881386266805],[-117.25355102212193,32.86989488925493],[-117.25354799719851,32.869908393179351],[-117.2535449722331,32.869921893497029],[-117.25354195051324,32.869935397395217],[-117.25353892560761,32.869948903122719],[-117.25353590063942,32.869962403440169],[-117.25353287677987,32.869975907355553],[-117.25352985504598,32.869989410351778],[-117.25352683008529,32.87000291157063],[-117.25352380514421,32.870016414592726],[-117.25352078023302,32.870029920319794],[-117.25351775850572,32.870043424217421],[-117.25351473459945,32.870056924525613],[-117.25351170966492,32.870070428449075],[-117.25350868792458,32.870083931444753],[-117.25350566298823,32.870097435368116],[-117.25350263800979,32.8701109356847],[-117.25349961309215,32.870124441411193],[-117.2534965924268,32.870137945299525],[-117.25349356747643,32.870151448320897],[-117.25349054253539,32.870164952243819],[-117.25348752075769,32.870178452534006],[-117.25348449580456,32.870191955555072],[-117.25348147089161,32.87020546218281],[-117.2534784459058,32.870218962498761],[-117.25347542523396,32.870232466386604],[-117.25347240027708,32.870245969407378],[-117.25346937532956,32.870259473329781],[-117.25346635354536,32.870272973619372],[-117.25346332858571,32.870286476639947],[-117.25346030363542,32.870299980562145],[-117.25345727974239,32.870313483573845],[-117.25345425799563,32.870326987469809],[-117.25345123303227,32.870340490490044],[-117.25344820806797,32.870353993510257],[-117.25344518308218,32.87036749472702],[-117.2534421613214,32.870380997721043],[-117.25343913746387,32.87039450433894],[-117.25343611246511,32.870408004653825],[-117.25343309070155,32.870421507647549],[-117.25343006574195,32.870435011568965],[-117.25342704077114,32.870448514588617],[-117.25342401580973,32.870462018509834],[-117.2534209951109,32.870475521494583],[-117.25341797011674,32.870489022710679],[-117.25341494514225,32.870502525729997],[-117.25341192016681,32.870516028749243],[-117.25340889840611,32.870529532644035],[-117.25340587342887,32.870543035663133],[-117.25340284843008,32.87055653687883],[-117.25339982772479,32.870570039863033],[-117.25339680274473,32.87058354288191],[-117.25339377777398,32.870597046802324],[-117.25339075599744,32.870610549794989],[-117.25338773099402,32.870624051010324],[-117.25338470604109,32.870637556733861],[-117.25338168213513,32.870651060645315],[-117.25337866035488,32.870664563637646],[-117.25337563533748,32.870678063950997],[-117.25337261036023,32.8706915678709],[-117.25336958534096,32.870705068184051],[-117.25336656356728,32.870718572077756],[-117.25336353967634,32.870732077792098],[-117.25336051468513,32.870745580810038],[-117.25335749290868,32.870759084703508],[-117.25335446788475,32.870772585016283],[-117.25335144290102,32.87078608893566],[-117.25334841793693,32.87079959465823],[-117.25334539719439,32.870813095837768],[-117.25334237219758,32.870826598855203],[-117.25333934396369,32.870840099193643],[-117.25333631900617,32.870853605817608],[-117.25333330041737,32.870867108782775],[-117.25333027219089,32.870880610022631],[-117.25332725356945,32.870894110282599],[-117.25332422649186,32.870907618726974],[-117.25332120787877,32.870921119888493],[-117.25331817966918,32.870934622931379],[-117.25331515467433,32.870948126849804],[-117.2533121361099,32.870961632519446],[-117.25330910784608,32.870975131053733],[-117.25330608393753,32.870988636766555],[-117.25330306210321,32.871002137051988],[-117.25330003710371,32.871015640970064],[-117.25329701209301,32.87102914398637],[-117.25329398709167,32.871042647904211],[-117.25329096525365,32.871056148189339],[-117.25328794133951,32.871069653901692],[-117.25328491633537,32.871083157819371],[-117.25328189132003,32.871096660835313],[-117.25327886948858,32.871110162021715],[-117.25327584447137,32.871123665037501],[-117.25327281946352,32.871137168954839],[-117.25326979868748,32.87115066923073],[-117.25326677369834,32.871164174951225],[-117.25326374865686,32.871177676163335],[-117.2532607236659,32.871191181883688],[-117.25325770182798,32.871204683069628],[-117.25325467680425,32.871218186084839],[-117.25325165177964,32.871231689099965],[-117.2532486310382,32.871245192981966],[-117.25324560598089,32.871258693291963],[-117.25324258099459,32.871272199913541],[-117.25323955914079,32.871285700197305],[-117.25323653415266,32.871299206818726],[-117.25323350909163,32.871312707128368],[-117.253230485129,32.871326210134264],[-117.25322746328177,32.871339711319457],[-117.25322443827963,32.871353217038866],[-117.253221413256,32.871366720954882],[-117.25321838819032,32.871380221264147],[-117.25321536639079,32.871393726957322],[-117.25321234240201,32.871407228159455],[-117.25320931736439,32.871420731173494],[-117.25320629233612,32.871434235089112],[-117.25320327047122,32.871447735371952],[-117.25320024543082,32.871461238385756],[-117.25319722039974,32.871474742301174],[-117.25319419856288,32.871488245288816],[-117.25319117459844,32.871501749195346],[-117.25318814955436,32.871515252208837],[-117.253185127725,32.871528756097945],[-117.25318210267901,32.87154225911128],[-117.25317907763211,32.871555762124558],[-117.25317769645993,32.871561990902485],[-117.25317608254261,32.871569268501439],[-117.25317346763163,32.871581067484748],[-117.25237215361457,32.871574429936324],[-117.25159042213903,32.871569174043174],[-117.25132982286975,32.871565789293058],[-117.25125818664991,32.871563425639692],[-117.25126121199182,32.871549922673474],[-117.25126413349594,32.871536403415405],[-117.25126695968956,32.871522865992929],[-117.25126968749042,32.87150932125207],[-117.25127231465896,32.871495760193362],[-117.2512748412056,32.871482183718548],[-117.25127727254444,32.871468598096065],[-117.25127960217243,32.871454995262766],[-117.25128183128123,32.871441386030057],[-117.251283966138,32.871427757722635],[-117.25128599942765,32.871414124827815],[-117.25128792571562,32.871400479273881],[-117.25128976747055,32.871386823583975],[-117.25129149694307,32.871373160688258],[-117.25129313011912,32.871359486850196],[-117.25129466490306,32.871345805693736],[-117.25129609808937,32.871332117244876],[-117.25129743395198,32.87131842146897],[-117.25129866824793,32.871304721105723],[-117.25129980198409,32.871291010736414],[-117.25130083845829,32.871277298450075],[-117.25130177332491,32.871263577969707],[-117.25130260770371,32.871249853794914],[-117.25130334374195,32.871236126810189],[-117.25130397607683,32.871222395255359],[-117.25130451005074,32.871208659087209],[-117.2513049456945,32.871194921010641],[-117.25130527877529,32.871181184667094],[-117.25130551241659,32.871167442817132],[-117.25130564669016,32.871153701772563],[-117.25130567835987,32.871139958854201],[-117.25130561065174,32.87112621583951],[-117.2513054446548,32.871112474523095],[-117.25130517718419,32.871098736734361],[-117.25130480924688,32.871084997054609],[-117.25130488015901,32.871081838553344],[-117.25130704203325,32.87106823798058],[-117.25131212433972,32.871055204385215],[-117.25131995041443,32.871043176547133],[-117.25133026851377,32.871032568605564],[-117.25146251021179,32.870918804235394],[-117.25146896104982,32.870913257587247],[-117.25147532684521,32.870906529434507],[-117.25148517201491,32.87089558805885],[-117.25149463615377,32.870884404495179],[-117.25150370767288,32.870872993265408],[-117.25151237594925,32.870861359866389],[-117.25152063362685,32.870849515178669],[-117.25152847339088,32.870837473689726],[-117.25153589315573,32.870825239925296],[-117.25154287919574,32.870812828424604],[-117.25154943481905,32.870800248178554],[-117.25155554306386,32.870787511047354],[-117.25156121048472,32.870774629602415],[-117.25156642324318,32.870761608464818],[-117.25157117835977,32.870748467497208],[-117.25157547375935,32.870735212127002],[-117.25157930533248,32.870721856815472],[-117.25158266997661,32.870708410605374],[-117.25158556360283,32.870694889761332],[-117.25158798521474,32.870681300603813],[-117.25158993070292,32.870667657594041],[-117.25163200198523,32.870304948492496],[-117.25164035091767,32.870232979810368],[-117.25176254797051,32.869237017595701],[-117.25176400214026,32.869224618471655],[-117.25176566087656,32.869210947123818],[-117.25176737203803,32.869197281663148],[-117.25176914095657,32.869183621144593],[-117.25177096869038,32.869169964657893],[-117.25177284888007,32.869156316763267],[-117.25177478465905,32.869142671123164],[-117.25177677929435,32.869129033121517],[-117.25177882848118,32.869115400087985],[-117.25178093329838,32.869101772915627],[-117.25178309482456,32.869088152497362],[-117.25178531091257,32.869074537948876],[-117.25178758157267,32.869060930171869],[-117.25178990896218,32.869047330952313],[-117.2517922909032,32.869033736700864],[-117.2517947327687,32.869020150079187],[-117.25179722598025,32.869006568451596],[-117.25179977702049,32.868992998077864],[-117.25180238153334,32.86897943177911],[-117.25180504491236,32.868965874020553],[-117.25180775968872,32.868952325764361],[-117.25181053330046,32.868938783343268],[-117.25181336259351,32.868925251291621],[-117.25181624430088,32.868911724225406],[-117.25181918383672,32.86889820841288],[-117.25182217690663,32.86888470208546],[-117.25182522774337,32.868871201601763],[-117.2518283310559,32.868857711513449],[-117.25183149004963,32.868844231794554],[-117.25183470789904,32.868830759714058],[-117.25183797715586,32.86881729803757],[-117.25184130207316,32.868803844927143],[-117.25184468266136,32.868790401284464],[-117.25184811253015,32.868776968964788],[-117.25185160769601,32.868763546936485],[-117.25210349858118,32.867717059861448],[-117.25220312569154,32.86729864698416],[-117.25234282803849,32.866711902109863],[-117.25239616012077,32.866532792225463],[-117.25239960587437,32.866519362464857],[-117.25240297024276,32.866505917133011],[-117.25240625321557,32.866492455328206],[-117.25240945379636,32.866478983370868],[-117.25241257299204,32.866465495842228],[-117.25241561083332,32.866451995447306],[-117.25241856407399,32.866438478605581],[-117.25242143922726,32.866424954281534],[-117.25242422872185,32.866411414421066],[-117.2524269400983,32.866397864373262],[-117.25242956049465,32.866384300635694],[-117.25243210597813,32.866370726684828],[-117.25243456694341,32.866357143500402],[-117.25243693911688,32.866343551117168],[-117.25243923632621,32.866329944012435],[-117.25244144903803,32.866316329477492],[-117.25244358044726,32.86630270658469]],[[-117.25071616315323,32.878607016542539],[-117.24944146333185,32.878483377936618],[-117.24945136409919,32.879381347125317],[-117.24878816401734,32.880110396721953],[-117.24878230359499,32.880108060769842],[-117.24876746696539,32.880102395073564],[-117.24875252576254,32.880096931310774],[-117.24873747893828,32.880091671293478],[-117.24872233723973,32.880086620345196],[-117.24870709631057,32.880081771287202],[-117.24869176692857,32.880077132147974],[-117.24867634805589,32.880072705641197],[-117.24866085137501,32.880068485360169],[-117.24864527161461,32.880064477659644],[-117.24862961948092,32.880060684256655],[-117.24861389815896,32.88005710332186],[-117.24859810661093,32.880053737568922],[-117.2485822534159,32.88005058963369],[-117.24856634388595,32.880047656767957],[-117.24855037804151,32.880044940775043],[-117.24853436657843,32.880042442470277],[-117.24851830525297,32.880040164593126],[-117.24850220362087,32.880038101655884],[-117.24848606493883,32.880036258140962],[-117.24846989356301,32.880034641227169],[-117.24845369148709,32.880033238273803],[-117.24844573369057,32.880032634380399],[-117.24741629405418,32.880021708686712],[-117.24700244690311,32.88002221531216],[-117.24691065971038,32.880022329170096],[-117.24691588503448,32.879963624637952],[-117.24692149439845,32.879900616566353],[-117.24692245755556,32.879889795924214],[-117.24692366261877,32.879876274395777],[-117.24692485881036,32.879862818766583],[-117.24692690939182,32.879839789589766],[-117.24695377065929,32.879787748453602],[-117.24699111317342,32.879729272625923],[-117.24704378167743,32.879657615795786],[-117.24708253255658,32.879599137592606],[-117.24713648813332,32.879516780101802],[-117.24716965957433,32.879461902491478],[-117.24720275092317,32.879401093813691],[-117.24723718327776,32.879334334483303],[-117.24726905553564,32.879290149448572],[-117.24733423315382,32.879204146600074],[-117.2474121366006,32.879122789601993],[-117.24747899897019,32.879038365563801],[-117.24752493594551,32.878992885628755],[-117.24758206986286,32.878942559453627],[-117.24763933730343,32.878904108207699],[-117.24770636621942,32.878856078189926],[-117.24775785521484,32.87880461531897],[-117.24779393651777,32.878759209454934],[-117.24782710790858,32.87870551926548],[-117.24784912367299,32.878660226970752],[-117.24787774889313,32.878578080014819],[-117.24791309929842,32.878452233182699],[-117.24794065266306,32.878399775035128],[-117.24798351853195,32.878331753458347],[-117.24802084636498,32.878272097937902],[-117.24807639716491,32.87820634997761],[-117.24811128520376,32.878179950803066],[-117.24815043763448,32.878157079980433],[-117.24818115653623,32.87813545946841],[-117.24820055732515,32.878107998678566],[-117.24819744537943,32.878081905558872],[-117.24818026874118,32.878057115467996],[-117.24816323852167,32.878044193914882],[-117.2481364214128,32.878037284026441],[-117.2481082639746,32.878037511482013],[-117.24808159400085,32.87804366493345],[-117.24802279778459,32.878071445718383],[-117.24792918040606,32.878132750688707],[-117.24783693019167,32.878189293230577],[-117.24776429679669,32.878238550774235],[-117.24770843776567,32.878278177411886],[-117.24765237618712,32.878298815726843],[-117.24761450971619,32.878310992085112],[-117.2475723126432,32.87831370797791],[-117.2475370609571,32.878308053659005],[-117.24748762284105,32.878291838049044],[-117.24744938055539,32.87827077351195],[-117.24742938736847,32.87824600515308],[-117.24740924659527,32.878206992151831],[-117.24738917265054,32.878175097916184],[-117.2473817841576,32.878144287982906],[-117.24738131422578,32.878102740986009],[-117.24738392798396,32.878084910345123],[-117.24739773812193,32.878061057621188],[-117.24741577287213,32.878038357495143],[-117.24743949202566,32.878019167977399],[-117.24748978657161,32.877986706592438],[-117.24770104991281,32.877873413073964],[-117.24784381003747,32.877802216002586],[-117.24792835642978,32.877776051572724],[-117.2480153502669,32.877751608593726],[-117.24811368903157,32.877735379920423],[-117.2482274604191,32.877714282389384],[-117.24833572163149,32.877703905081582],[-117.24843140525296,32.877701944341233],[-117.24862422063111,32.877700387944842],[-117.24884030576206,32.877715207370493],[-117.24902910046994,32.877731492390332],[-117.2491150899789,32.877742667730047],[-117.24916008952472,32.877739927744045],[-117.24922325571617,32.877723983502833],[-117.24931019690334,32.877695975420174],[-117.24939307415787,32.877681060179526],[-117.24953802101956,32.877678700115631],[-117.24966700929858,32.877687207927146],[-117.24976851299131,32.877701821006447],[-117.24986160966291,32.877718878142517],[-117.249929323082,32.877732576014331],[-117.25000272277333,32.877750972833383],[-117.25005631761617,32.87776122299077],[-117.25011692446276,32.877767858968156],[-117.25016756981391,32.877766260520659],[-117.25021818642648,32.877761100375565],[-117.25024478873334,32.877749015302278],[-117.25027405818865,32.877723848597263],[-117.25028918130391,32.877691669884257],[-117.2502945156475,32.877665510237996],[-117.25029825480019,32.877622740660023],[-117.25031887486749,32.877579835319942],[-117.25033977839422,32.87756186194995],[-117.25038016278253,32.877523541590655],[-117.25048081639764,32.87746218498436],[-117.25052188046146,32.877426882639611],[-117.25056207682084,32.877371947208339],[-117.25060231251631,32.877320568845867],[-117.2506590925999,32.877239381719242],[-117.25076203680898,32.877131704207557],[-117.25081773230204,32.877079012050501],[-117.25127091765891,32.877075343169992],[-117.25149111446781,32.877073222242117],[-117.25176391050597,32.87822472520628],[-117.25185453802004,32.879290554300283],[-117.25187297765346,32.879507408062494],[-117.25191299503064,32.879818298023686],[-117.25192221709199,32.879889939370827],[-117.25193730010369,32.880007120228626],[-117.25196545337742,32.880191044483162],[-117.25198013850789,32.88026962106629],[-117.25209726560102,32.880896349180489],[-117.25249321744492,32.882198692827323],[-117.25271366790025,32.882677898123184],[-117.2526210356173,32.882750111605077],[-117.25240992687736,32.882914689297905],[-117.25219706733336,32.883080627134582],[-117.25199773476314,32.882755167476056],[-117.25175705183379,32.882362187009264],[-117.25146188270637,32.88188023564593],[-117.25128762626852,32.881595544420328],[-117.25093912792538,32.881026671526151],[-117.25092992994823,32.880504524115786],[-117.2509292120538,32.88050238647309],[-117.25073101209338,32.879912451549011],[-117.25072497868364,32.87938203289599],[-117.25071673563524,32.878657346648026],[-117.25071616315323,32.878607016542539]]]}},{"attributes":{"OBJECTID":39,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":10312.895445806536,"SHAPE.STArea()":871868.70671325317,"GlobalID":"{0BA0E52D-B926-4A1E-B732-05F7B24B546C}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"zayu","last_edited_date":1779858098000,"Clery":"No","Region":"Blackhorse Farms"},"geometry":{"rings":[[[-117.24399327186228,32.885992582972165],[-117.24399276369087,32.885701113973845],[-117.24402533748147,32.885701074682224],[-117.24402495420067,32.88548120170887],[-117.24399237943301,32.885481241910689],[-117.24406381818774,32.885150006865835],[-117.24406434491314,32.885141574886426],[-117.24406525221259,32.885127855598832],[-117.24406621403276,32.885114137676162],[-117.24406723894307,32.885100422852922],[-117.24406832159012,32.88508671027045],[-117.24406946306293,32.885073001723491],[-117.24406564686306,32.885023558889195],[-117.2440907418096,32.884938152590259],[-117.24409774945323,32.884693477073938],[-117.24404777353587,32.884594931140356],[-117.24405087194877,32.88429256794921],[-117.24405194931984,32.884283307341789],[-117.24405803462179,32.884270631203044],[-117.24406880304073,32.884260410725069],[-117.24408300899699,32.884253830003672],[-117.24408181403867,32.884069390548561],[-117.24406709272145,32.884063841486835],[-117.24405721802192,32.884053086415271],[-117.24405452930596,32.884039672892435],[-117.24405773240542,32.883506436864366],[-117.24406178197935,32.88283304064182],[-117.24406186356404,32.882819263971804],[-117.2440657296473,32.882176073284413],[-117.24406769555327,32.881848970693476],[-117.24406976049799,32.881505381534289],[-117.2440714936032,32.881216790889006],[-117.24407134497378,32.881214040849564],[-117.24407234974852,32.881200345123332],[-117.24407621951343,32.88118701319862],[-117.24408282979688,32.88117447350534],[-117.24409196920503,32.881163122709637],[-117.24410335002609,32.881153318414611],[-117.24411099614491,32.881151112541673],[-117.24412690869339,32.881148255828869],[-117.24414315889339,32.88114756961177],[-117.24415932594547,32.881149077114252],[-117.24417500547499,32.881152741912985],[-117.24418461455554,32.881155907288452],[-117.2442002293338,32.881159799845577],[-117.2442162344656,32.881162298763478],[-117.24423246196737,32.88116338645694],[-117.24424873528642,32.881163043606179],[-117.24426487811458,32.881161272531621],[-117.2442807154263,32.881158094480156],[-117.24429607771235,32.88115354598407],[-117.24431079344855,32.881147674412937],[-117.2443247073233,32.881140543237422],[-117.24434349217891,32.881140589557816],[-117.24435893116818,32.881144813549533],[-117.24437230582882,32.881152569168123],[-117.24438251775162,32.881163212387598],[-117.2443887224095,32.881175868996557],[-117.24439040777611,32.88118948807017],[-117.24441969031565,32.88118650388553],[-117.24442009887582,32.88151082713609],[-117.24442063170869,32.881846144405664],[-117.2444211024156,32.882175965112737],[-117.24440629320165,32.882816507090077],[-117.24440578925432,32.882838484956707],[-117.24440371726148,32.883231542304756],[-117.24440029546332,32.883504334376681],[-117.24447847033115,32.883503988399241],[-117.24455664196195,32.883503639693153],[-117.24455838753137,32.883370473437935],[-117.24455910049336,32.883357439235049],[-117.24456311284388,32.883344144923448],[-117.24457029980975,32.8833318431343],[-117.24458035105266,32.883321064789598],[-117.24459282823351,32.883312267898091],[-117.24460719290892,32.883305847250199],[-117.24462282187714,32.883302073877395],[-117.24463903941,32.883301110122659],[-117.24527101989331,32.883304267085329],[-117.24527323299188,32.883500453547924],[-117.24534489327259,32.883500135146214],[-117.2454165535426,32.883499815801244],[-117.24541352684027,32.883231657407741],[-117.2454148422467,32.883011662503918],[-117.24541605280024,32.882808942342294],[-117.24541605585769,32.882808362493201],[-117.24541779523071,32.882516935752221],[-117.24542080140364,32.88201397289464],[-117.24542382225285,32.881508248757754],[-117.24542590839428,32.881159162299227],[-117.24542376971392,32.881145540578011],[-117.24542093312466,32.881132008341638],[-117.24541740642321,32.881118593481489],[-117.24541319093346,32.881105318530523],[-117.24540829663017,32.881092214969549],[-117.24540273333484,32.881079300754323],[-117.2453965120398,32.881066602848705],[-117.24538964475477,32.881054143699565],[-117.24538214138295,32.881041948475982],[-117.24537402247252,32.881030038654238],[-117.24536529254287,32.881018435839849],[-117.24535597859455,32.881007165064133],[-117.24534609366498,32.88099624515862],[-117.24533565402777,32.880985697634088],[-117.2453246855538,32.880975542120517],[-117.24531320449618,32.880965798325292],[-117.24530123242056,32.880956483207768],[-117.24528879305001,32.880947615513513],[-117.24527591005676,32.880939209479614],[-117.24514244224133,32.880864603381497],[-117.24508669928395,32.880832069939011],[-117.24485389456379,32.880696518028138],[-117.24484013967455,32.880689157783763],[-117.24482629536489,32.880681922699182],[-117.24481236156342,32.880674806462594],[-117.24479834152679,32.880667813556592],[-117.24478423742275,32.880660946668854],[-117.24477004708355,32.880654203111632],[-117.24475577375563,32.880647586465713],[-117.24474141955572,32.880641094910544],[-117.24472698664134,32.880634730232202],[-117.24471247287529,32.880628492447855],[-117.24469788579879,32.880622386907355],[-117.24468322528948,32.880616402790544],[-117.24466848399966,32.880610551879357],[-117.24437256013452,32.880475012092077],[-117.2443528201636,32.880470061638228],[-117.24433009435914,32.880464359704582],[-117.24431703392408,32.880461608964133],[-117.24429814859137,32.880459373101871],[-117.2442818718259,32.880459399474105],[-117.2442657242207,32.880461114681971],[-117.24424994810892,32.880464496035358],[-117.24423478649472,32.880469485670694],[-117.24422046621113,32.880476013230101],[-117.2442072073742,32.880483981357521],[-117.24419520833118,32.880493257703783],[-117.24418465570561,32.880503712719438],[-117.24417570367686,32.880515182849528],[-117.24416849347894,32.880527493822356],[-117.24416313526577,32.880540463500431],[-117.2441597079477,32.880553887454013],[-117.24415825951752,32.880567567814083],[-117.24415882497206,32.880581291486529],[-117.24416137529484,32.880594854909489],[-117.24416588996725,32.88060804994408],[-117.24417229296508,32.880620674308261],[-117.24418048919266,32.880632540301413],[-117.24419035155759,32.880643465890827],[-117.24420173281695,32.880653282731949],[-117.24421445820931,32.880661846147362],[-117.24422833490895,32.880669020622314],[-117.24424315123227,32.880674704158579],[-117.24425868598017,32.880678803852135],[-117.2442746980069,32.880681258520639],[-117.24429094758159,32.88068203763001],[-117.24429997778654,32.880681739528818],[-117.24431946412963,32.880676632123979],[-117.24433245505433,32.880673229890768],[-117.24436818939412,32.880664696738592],[-117.24438410118381,32.88066178138434],[-117.24440020105719,32.880659716666962],[-117.24441642294582,32.880658519349467],[-117.24443269840987,32.880658185473969],[-117.24444629640799,32.880658571098053],[-117.24459689733838,32.880726072221947],[-117.24468530377669,32.880766588539508],[-117.2447704532436,32.880807131015104],[-117.24492784957974,32.880899313803504],[-117.24490213500533,32.880929754682811],[-117.2448903261367,32.880939214423876],[-117.24487776644939,32.88094795971174],[-117.24486451849067,32.880955945856869],[-117.24485064165304,32.880963132703961],[-117.24483620833571,32.880969496224445],[-117.24482128753836,32.88097499528395],[-117.24480594843415,32.880979604076366],[-117.24479026672,32.880983306662401],[-117.24477432123746,32.880986081667011],[-117.24475818121083,32.880987907792594],[-117.24474319069114,32.880988753478739],[-117.2444989112161,32.880990719777827],[-117.24435879552014,32.880986350344799],[-117.24434433230401,32.880992057575078],[-117.24432886387302,32.880988724746359],[-117.24432293680272,32.880983890374054],[-117.24431324219096,32.88097287236841],[-117.24430128641212,32.880963571451687],[-117.2442874877778,32.880956311592058],[-117.24427232367559,32.880951348651088],[-117.24425633467052,32.880948855021444],[-117.24424007107565,32.880948920056674],[-117.24422410668103,32.880951535532873],[-117.24420900160774,32.880956618491211],[-117.24419528064136,32.880963985261609],[-117.2441834281945,32.880973378555659],[-117.24416887822753,32.880981150566022],[-117.24415338729118,32.880985282571949],[-117.24413717479939,32.880986182201752],[-117.24412117424238,32.880983801366064],[-117.24410461957648,32.880977401383774],[-117.24409334553089,32.880967523253787],[-117.24408488070368,32.880955816319933],[-117.24407962678876,32.880942836435409],[-117.24407784087484,32.880929204640516],[-117.24407797307791,32.880925393688798],[-117.24407807857469,32.880911652895698],[-117.24407818724671,32.880897909371782],[-117.24407829594924,32.880884168552875],[-117.24407839396585,32.880870427819922],[-117.24407849943196,32.880856684321763],[-117.2440786017229,32.880842943554434],[-117.24407870398321,32.880829200082076],[-117.24407880627402,32.880815459314697],[-117.24407890749625,32.880801718555944],[-117.24407900655068,32.880787975109385],[-117.24407910563569,32.880774234367806],[-117.24407920472063,32.880760493626219],[-117.24407929950065,32.880746750213994],[-117.24407939858557,32.880733009472401],[-117.24407949443408,32.880719266051599],[-117.24407959031313,32.880705525335799],[-117.24407968188731,32.880691781949331],[-117.2440797777663,32.880678041233523],[-117.24407987043955,32.880664300543472],[-117.2440799620136,32.88065055715704],[-117.24408005468678,32.880636816466989],[-117.24408014308558,32.880623075811343],[-117.24408023252238,32.880609332442042],[-117.24408032195913,32.880595589072783],[-117.24408041035787,32.880581848417094],[-117.24408049661938,32.880568107778636],[-117.24408058178173,32.880554364443725],[-117.24408066804321,32.880540623805196],[-117.24408075641125,32.880526880444528],[-117.2440808394669,32.880513139831798],[-117.244080922492,32.880499396514054],[-117.244081004479,32.880485655909958],[-117.24408108002393,32.880471912652403],[-117.24408116628528,32.88045817201386],[-117.24408124824167,32.880444428704727],[-117.24408132488566,32.880430688143548],[-117.24408140363627,32.880416944860201],[-117.244081483486,32.880403204273236],[-117.24408155900024,32.880389458310717],[-117.2440816356747,32.880375720454502],[-117.24408171125,32.880361979901878],[-117.24408178361955,32.880348239375081],[-117.24408186020227,32.880334493403957],[-117.2440819325718,32.880320752877125],[-117.24408200597925,32.880307009636695],[-117.24408207514298,32.880293269135684],[-117.24408214748185,32.880279525903838],[-117.24408221664557,32.880265785402827],[-117.24408228684719,32.880252042188182],[-117.24408235280505,32.880238301712922],[-117.2440824219381,32.880224558506896],[-117.24408248896458,32.880210818023002],[-117.24408255489182,32.880197074842748],[-117.24408262084964,32.88018333436748],[-117.24408268357111,32.880169591212997],[-117.24408274739172,32.880155850754889],[-117.24408281331888,32.880142107574628],[-117.24408287286516,32.880128367150888],[-117.24408293238079,32.880114624022184],[-117.24408299510218,32.880100880867644],[-117.24408305571697,32.88008714043535],[-117.24408146771948,32.880081565074413],[-117.24409970211801,32.880081245239751],[-117.24431269286036,32.880077511575941],[-117.24437131305005,32.880076484369859],[-117.24453877574588,32.880168202487688],[-117.24498055535886,32.88041015331526],[-117.24533141161318,32.880602308230245],[-117.2457512014773,32.880832213865915],[-117.24574725848069,32.881508399432249],[-117.24574709829052,32.881546838667006],[-117.24574509693672,32.882019630861123],[-117.24574430415723,32.882077339252199],[-117.24574230686532,32.882519900280059],[-117.24574147546421,32.882704026042745],[-117.24574101408444,32.882805744315846],[-117.2457410130294,32.882806500891633],[-117.24574007190166,32.883014641106598],[-117.24573748804568,32.883498387912645],[-117.24573415368981,32.884218546815212],[-117.24540758423427,32.88472141218093],[-117.24540985907221,32.885210633097856],[-117.24541008358861,32.885240865119115],[-117.24536180235781,32.88608286327932],[-117.24529197657253,32.886081052297605],[-117.24522241935583,32.88607558432625],[-117.24515339816469,32.886066482460784],[-117.24507237307002,32.88605579726201],[-117.24499071867764,32.886049379643097],[-117.24490874838607,32.886047253230196],[-117.24405852778776,32.886047472298486],[-117.24404721222203,32.886046650754977],[-117.24403623823859,32.88604418437864],[-117.2440259379858,32.886040147146225],[-117.24401662600492,32.886034662772623],[-117.24400858311924,32.886027897626036],[-117.24400205425572,32.886020057138772],[-117.24399723768711,32.886011379581277],[-117.24399428065573,32.886002127079927],[-117.24399327186228,32.885992582972165]],[[-117.24464064869058,32.881133335716392],[-117.24465686583368,32.881132372860918],[-117.24474480658627,32.88113166493644],[-117.24475691458706,32.881131644110553],[-117.24477318541054,32.88113108118413],[-117.24478940974252,32.881129903637174],[-117.24480555560655,32.881128118941156],[-117.24482159733574,32.881125725499295],[-117.24483748582553,32.881122728215686],[-117.24485320089478,32.881119138073899],[-117.24486871690722,32.88111495618211],[-117.24488399230984,32.881110193695946],[-117.24489900371577,32.881104861624799],[-117.24491370951104,32.881098965714322],[-117.24492809599728,32.88109252320811],[-117.24494212481731,32.881085544334397],[-117.24495576621366,32.88107804376083],[-117.24496900217306,32.881070035158906],[-117.24498180192042,32.881061537713279],[-117.24499413035532,32.881052566134613],[-117.24500597804405,32.881043136730575],[-117.24501731317355,32.881033271399367],[-117.24503103637947,32.881023178532743],[-117.24504491670314,32.881016016886278],[-117.24505996135454,32.881010791835756],[-117.24507579568005,32.881007638053148],[-117.24509201873761,32.881006633612252],[-117.24510906759852,32.881008059945628],[-117.24512416853189,32.881013196428853],[-117.24513884167489,32.881019155143314],[-117.24515302892605,32.881025901388966],[-117.24516666799137,32.881033407713417],[-117.2451796997518,32.881041643933578],[-117.24519207145907,32.881050576208004],[-117.24520373033405,32.881060167990228],[-117.24521463100649,32.881070376362025],[-117.24522471744045,32.8810811602944],[-117.2452339623906,32.881092473116134],[-117.24524231400355,32.88110426564878],[-117.24524974611253,32.881116492114216],[-117.24525622071489,32.881129099615421],[-117.24526171261047,32.881142033348866],[-117.24526620089377,32.881155240279931],[-117.2452696614434,32.881168666498034],[-117.24526902427662,32.881391302576816],[-117.24526806558991,32.881726650819957],[-117.24526637219924,32.882317580408191],[-117.24526411146773,32.882644680014572],[-117.24526349238015,32.882809591397098],[-117.24526349159923,32.882810089168693],[-117.24526316113258,32.88289754432315],[-117.24526211154294,32.883092702020527],[-117.24526128010855,32.883106401771506],[-117.24525710714356,32.883119658625183],[-117.24524977318694,32.883131899418515],[-117.24523959070761,32.883142593209435],[-117.24522700761612,32.883151278301426],[-117.24521256681071,32.883157576095492],[-117.24519689148156,32.883161214654393],[-117.24518146033637,32.883162064841194],[-117.24464068076639,32.883158170649679],[-117.24462444446193,32.883157471731437],[-117.24460873305021,32.88315395062159],[-117.24459422584928,32.883147762363826],[-117.24458155210651,32.883139170614918],[-117.24457125900094,32.883128553312694],[-117.24456379525728,32.883116371246764],[-117.24455948306633,32.883103142133336],[-117.24455847555647,32.883090121777862],[-117.24456025312546,32.882900420131335],[-117.24456105707745,32.882815365235402],[-117.24456105894795,32.88281524709123],[-117.2445634123392,32.882564743109974],[-117.24456578251385,32.882312227190603],[-117.24456885697286,32.881985127378016],[-117.24457198313074,32.881652487704272],[-117.24457621594701,32.8812017352897],[-117.24457692888879,32.881188701086039],[-117.24458094114792,32.881175407674888],[-117.2445881279239,32.881163104982406],[-117.24459817888628,32.881152323930699],[-117.24461065578836,32.881143529741912],[-117.24462502010836,32.881137109091625],[-117.24464064869058,32.881133335716392]]]}},{"attributes":{"OBJECTID":40,"Campus":"La Jolla Campus","FeatureID":null,"SHAPE.STLength()":35303.008141931612,"SHAPE.STArea()":29337376.783213306,"GlobalID":"{DB905930-7244-4E98-8F34-045D2DAF5F64}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887901000,"Clery":"Yes","Region":"West Campus"},"geometry":{"rings":[[[-117.22918882246046,32.878004093925085],[-117.22932578731968,32.876988509104201],[-117.22939593739207,32.876039529269406],[-117.23015488080837,32.875988276726268],[-117.23099479211277,32.876248808821018],[-117.23174093978841,32.87642558651951],[-117.23224516311528,32.876545044661064],[-117.23276705440233,32.876713287262191],[-117.23331081916889,32.876888578406188],[-117.2332986270392,32.876746104587241],[-117.23329649926529,32.87672123327922],[-117.23338527435209,32.876379098868377],[-117.23337793639324,32.875722585617382],[-117.23337303678389,32.875550874101933],[-117.23337517519599,32.875475544000132],[-117.23337686277624,32.875416096365065],[-117.23337697035795,32.875414726655542],[-117.23337708538912,32.875413354181461],[-117.23337720045049,32.875411984412388],[-117.23337731551189,32.8754106146433],[-117.23337743374856,32.875409242143725],[-117.23337755201553,32.875407872349129],[-117.23337767666334,32.875406499798522],[-117.23337779816605,32.875405132683426],[-117.23337792604971,32.875403762812304],[-117.23337805391319,32.875402391137889],[-117.23337818179679,32.875401021266718],[-117.23337831716006,32.875399651336075],[-117.23337844827947,32.875398284144453],[-117.23337858577979,32.875396914196784],[-117.23337872007451,32.87539554427466],[-117.23337886184891,32.875394174292964],[-117.23337900579058,32.875392806999301],[-117.23337915290757,32.875391436975129],[-117.23337929468194,32.875390066993383],[-117.23337944183926,32.875388700575904],[-117.23337959219199,32.875387333231167],[-117.23337974358309,32.875385963172953],[-117.23337989714143,32.875384595802736],[-117.23338005176825,32.875383228424035],[-117.23338020850194,32.875381858323287],[-117.23338036953989,32.875380490893555],[-117.23338053378342,32.875379123438236],[-117.23338069376298,32.875377756918716],[-117.2333808580065,32.875376389463391],[-117.2333810254556,32.875375021982613],[-117.2333811950417,32.875373654484846],[-117.23338136572659,32.87537228968354],[-117.23338153958677,32.875370922151717],[-117.23338171348729,32.875369558226552],[-117.23338189055303,32.875368190669263],[-117.2333820697861,32.875366825799937],[-117.23338225005742,32.875365458217118],[-117.23338243356449,32.875364093313792],[-117.2333826170716,32.875362728410423],[-117.23338280379438,32.875361364383224],[-117.23338299050704,32.875359999454389],[-117.23338318360055,32.875358631769529],[-117.23338337357927,32.875357272225116],[-117.23338356987833,32.875355904514741],[-117.23338376301214,32.875354540436497],[-117.23338396364584,32.875353178102117],[-117.23338416638627,32.875351813045683],[-117.23338436592114,32.875350448014771],[-117.23338457189735,32.875349085637829],[-117.23338477788371,32.875347724162566],[-117.23338498489822,32.875346359072125],[-117.23338519407997,32.875344996669682],[-117.23338540646732,32.875343634241666],[-117.23338562313884,32.87534227268138],[-117.23338583552618,32.875340910253421],[-117.23338605539314,32.875339547765947],[-117.23338627419153,32.875338185286935],[-117.23338649730439,32.875336826380618],[-117.23338671930838,32.875335463876127],[-117.23338694561667,32.875334104042587],[-117.23338717082623,32.875332741512587],[-117.2333874035557,32.875331382529708],[-117.2333876320313,32.875330025384173],[-117.23338786792604,32.875328662769114],[-117.23338810382076,32.875327300154026],[-117.233388339786,32.875325943850648],[-117.233388577848,32.875324583923557],[-117.23338882018409,32.875323223962496],[-117.23338906253024,32.875321864903071],[-117.23338930810209,32.875320507621446],[-117.23338955684927,32.875319147609353],[-117.23338980136269,32.875317791237926],[-117.23339005331542,32.875316431200311],[-117.23339030526812,32.875315071162674],[-117.23339056048684,32.875313716509545],[-117.23339081889095,32.875312360027543],[-117.23339107728505,32.875311002643883],[-117.23339133571942,32.875309648866903],[-117.23339160052456,32.875308291432241],[-117.23339186319268,32.87530693401456],[-117.23339213124372,32.875305580161026],[-117.2333923992544,32.875304222700834],[-117.23339267050089,32.875302867920091],[-117.23339294496306,32.875301514015547],[-117.23339321727801,32.875300159226342],[-117.23339349173008,32.87529880442014],[-117.23339376939775,32.875297450490045],[-117.23339404812383,32.875296095649837],[-117.23339433223285,32.87529474437374],[-117.23339461306573,32.875293386811435],[-117.23339490146896,32.875292037304725],[-117.2333951887835,32.875290686003076],[-117.23339547712622,32.8752893310863],[-117.23339576764633,32.875287979759186],[-117.23339606243044,32.875286627496365],[-117.23339635618632,32.8752852788487],[-117.23339665420616,32.875283929265422],[-117.23339695537112,32.875282574246562],[-117.23339725553811,32.875281225547866],[-117.23339755673325,32.875279873234085],[-117.23339786437988,32.875278524475895],[-117.23339817522194,32.875277174790462],[-117.23339847859444,32.875275826066272],[-117.23339878943645,32.875274476380952],[-117.23339910349414,32.875273127571738],[-117.23339941757202,32.875271780565804],[-117.23339973483522,32.875270431731046],[-117.2334000521186,32.875269084699639],[-117.23340037154908,32.875267738552928],[-117.23340069521332,32.875266388765461],[-117.23340101894811,32.875265045289694],[-117.23340133940675,32.875263695527771],[-117.23340167382672,32.875262351966931],[-117.23340200393228,32.87526100483349],[-117.23340233404794,32.875259658601728],[-117.23340266739937,32.875258315049393],[-117.23340300394621,32.875256970569929],[-117.23340334050316,32.875255626992079],[-117.23340368025563,32.875254282487077],[-117.23340402429217,32.875252938849705],[-117.23340436725019,32.875251594319167],[-117.23340471021822,32.875250250690335],[-117.23340506069614,32.875248909706926],[-117.23340540688987,32.875247567855915],[-117.23340575947454,32.875246224150501],[-117.23340611314795,32.875244882239961],[-117.23340646576284,32.875243541239534],[-117.23340682268204,32.875242202910115],[-117.23340718166773,32.875240858252027],[-117.23340754179247,32.875239519897107],[-117.23340790405426,32.875238181525148],[-117.23340827058001,32.875236842217539],[-117.23340863711586,32.875235503811595],[-117.23340900578876,32.875234165388612],[-117.23340937552005,32.875232826055438],[-117.23340974846694,32.875231487598434],[-117.23341011720026,32.875230154585488],[-117.233410496518,32.875228812470795],[-117.23341087590622,32.87522747666776],[-117.23341125532471,32.875226143569783],[-117.23341163787816,32.875224804134554],[-117.23341201940346,32.875223468314509],[-117.23341240523298,32.875222135165473],[-117.23341279423785,32.875220799285906],[-117.2334131832629,32.875219465209653],[-117.23341357229796,32.87521813203513],[-117.23341396774416,32.875216798809547],[-117.23341435998476,32.87521546560945],[-117.23341475862641,32.875214131456637],[-117.23341515727813,32.875212798205531],[-117.23341556023418,32.875211467625427],[-117.23341596212171,32.875210137053827],[-117.23341636397895,32.875208803777127],[-117.2334167722674,32.875207472252839],[-117.23341718059625,32.875206144335166],[-117.23341758996331,32.875204813703995],[-117.23341800146741,32.875203483055863],[-117.2334184162073,32.875202155087131],[-117.23341883204591,32.875200829814965],[-117.23341924996113,32.87519949911578],[-117.23341967110201,32.875198170194388],[-117.23342009332148,32.875196842166126],[-117.2334205145027,32.875195516851448],[-117.2334209399277,32.8751941887977],[-117.23342136751997,32.875192863431984],[-117.23342179618078,32.875191538057706],[-117.23342222697856,32.875190212666418],[-117.23342266205043,32.875188887241116],[-117.23342309715252,32.875187564520871],[-117.23342353118609,32.87518624180904],[-117.23342397265897,32.87518491543107],[-117.23342441096658,32.875183592685325],[-117.23342485782236,32.875182269871438],[-117.23342529936575,32.875180949805149],[-117.23342574408444,32.875179627008293],[-117.23342619203888,32.875178306890938],[-117.23342664316866,32.875176984043094],[-117.23342709326018,32.875175663908728],[-117.23342754765594,32.875174346445348],[-117.23342800522705,32.875173026251424],[-117.23342846279813,32.87517170605755],[-117.23342892039945,32.875170388568648],[-117.23342938120631,32.875169071054238],[-117.23342984522874,32.87516775441599],[-117.23343030924117,32.875166436876043],[-117.2334307764591,32.87516511931058],[-117.2334312479813,32.875163804416104],[-117.23343171843496,32.875162489530155],[-117.23343218888871,32.875161174644184],[-117.2334326625479,32.875159859732726],[-117.23343313941264,32.875158544795731],[-117.23343362055151,32.875157229824715],[-117.23343409744645,32.875155917592743],[-117.23343458076259,32.87515460621136],[-117.23343506513717,32.875153293919801],[-117.23343555164881,32.875151981611289],[-117.23343603816035,32.875150669302741],[-117.23343652897627,32.875149359665173],[-117.23343701872363,32.875148050036131],[-117.23343751275512,32.875146741274705],[-117.233438005708,32.875145431620126],[-117.23343850290469,32.875144119226519],[-117.23343900232918,32.875142814930882],[-117.23343950276163,32.87514150521676],[-117.23344000643999,32.875140199083802],[-117.23344050903968,32.875138892057663],[-117.23344101591344,32.875137584997539],[-117.23344152602299,32.875136280616886],[-117.23344203507409,32.875134977146367],[-117.23344254515339,32.875133670060677],[-117.233443061674,32.875132365628978],[-117.23344357502936,32.875131064829453],[-117.23344409154997,32.87512976039779],[-117.23344461344341,32.875128458628531],[-117.23344513320984,32.875127157777989],[-117.2334456561415,32.875125853295252],[-117.23344618233916,32.875124554196979],[-117.23344670851667,32.875123253295385],[-117.23344723791985,32.875121954171647],[-117.23344776732307,32.875120655047837],[-117.23344829994188,32.875119356800269],[-117.23344883255058,32.875118057650951],[-117.23344936837488,32.875116759377818],[-117.23344991169898,32.875115462848449],[-117.23345044754348,32.875114166378665],[-117.23345098980914,32.875112870759494],[-117.23345153206462,32.875111574238609],[-117.23345207756604,32.875110281298944],[-117.23345262409558,32.875108984744067],[-117.23345317280254,32.875107691778872],[-117.23345372470487,32.875106397886448],[-117.23345427771609,32.875105107592262],[-117.23345483282399,32.875103813674343],[-117.23345538904073,32.875102523354563],[-117.2334559473844,32.875101232116165],[-117.23345650573813,32.875099941779375],[-117.23345706835578,32.875098650506914],[-117.23345762994531,32.875097362849665],[-117.23345819580884,32.875096075158325],[-117.23345876486788,32.875094786539826],[-117.23345933286841,32.875093498831518],[-117.23345990513293,32.87509221018751],[-117.23346047636923,32.87509092515868],[-117.23346104867402,32.875089640121331],[-117.23346163058542,32.87508835410577],[-117.23346220609572,32.875087069042898],[-117.23346278696877,32.875085785740815],[-117.23346336889021,32.875084500626961],[-117.23346395404741,32.875083218192536],[-117.23346453919449,32.875081934856418],[-117.23346512758744,32.875080655101506],[-117.2334657159501,32.875079372641551],[-117.23346630648005,32.8750780928696],[-117.23346690127396,32.875076812161964],[-117.23346749607791,32.875075532355993],[-117.23346809091211,32.875074255255008],[-117.23346869215743,32.875072978102992],[-117.23346929446113,32.875071700040834],[-117.23346989250085,32.875070422914327],[-117.23347050015717,32.875069145711315],[-117.23347110463823,32.875067871238734],[-117.23347171232476,32.875066596740659],[-117.23347232000123,32.875065321340962],[-117.23347293092351,32.875064049522436],[-117.23347354608968,32.875062774964803],[-117.23347416021747,32.875061503120691],[-117.23347477755084,32.875060231251126],[-117.23347539595274,32.875058959372979],[-117.23347601652182,32.875057690182871],[-117.23347663708084,32.875056420091042],[-117.23347726192401,32.875055150866928],[-117.23347788887394,32.87505387892071],[-117.23347852015839,32.875052612350537],[-117.23347914396322,32.875051345839907],[-117.23347977524766,32.875050079269684],[-117.23348040866912,32.8750488126825],[-117.23348104318931,32.87504754879177],[-117.23348167981624,32.875046282179056],[-117.2334823239531,32.875045018211743],[-117.23348296170899,32.875043757000547],[-117.23348360157168,32.875042493067276],[-117.23348424570845,32.875041229100013],[-117.23348489308097,32.875039967812214],[-117.23348553938497,32.875038706532933],[-117.23348618678772,32.875037447950142],[-117.23348684058136,32.875036187512954],[-117.23348749118958,32.87503492890464],[-117.23348814820892,32.87503367024528],[-117.23348880525846,32.875032414290921],[-117.23348946120925,32.875031155640052],[-117.2334901214643,32.875029899660227],[-117.23349078174959,32.875028646385346],[-117.23349144838548,32.875027387649403],[-117.23349211188636,32.875026135250664],[-117.23349277858271,32.87502488192473],[-117.23349344955309,32.875023628564811],[-117.23349411942469,32.875022372508383],[-117.23349479260263,32.875021125443062],[-117.23349546574026,32.875019874771112],[-117.23349614208335,32.875018624073626],[-117.23349682163207,32.875017373350602],[-117.23349750122107,32.8750161262343],[-117.23349818186844,32.875014878207779],[-117.23349886465282,32.875013630164254],[-117.23349955385838,32.875012382971356],[-117.23350023774151,32.875011137624362],[-117.23350092696717,32.875009892234743],[-117.23350161620296,32.875008647746874],[-117.23350230973288,32.875007405028271],[-117.23350300216407,32.875006159613172],[-117.23350369890966,32.875004917770731],[-117.23350439781238,32.875003677714595],[-117.23350509455787,32.87500243587214],[-117.23350579666609,32.875001195790475],[-117.23350649984282,32.874999955700318],[-117.23350720516667,32.874998716494815],[-117.23350791157917,32.874997479084158],[-117.23350862117702,32.87499623984457],[-117.23350932975671,32.874995005121882],[-117.23351003938475,32.874993768587345],[-117.23351106781466,32.874991990269891],[-117.23351423069383,32.874985566290071],[-117.23368040504698,32.874648058268733],[-117.23378103210963,32.874443680281331],[-117.23371715802205,32.874443747891114],[-117.23371400648493,32.874448124818336],[-117.23370524520087,32.874457892871845],[-117.23369617705933,32.874466212455374],[-117.23369516493673,32.874465434189247],[-117.23368905147505,32.87446964262498],[-117.23368202603835,32.874473619357786],[-117.23367536384376,32.874476632836746],[-117.23366394332668,32.874479566970635],[-117.23365801942082,32.874480658356525],[-117.23367700104141,32.87444385749621],[-117.2336510080268,32.874443930975623],[-117.23346725424497,32.874444450509614],[-117.23345522532622,32.874443432596991],[-117.23342626069541,32.874442183372338],[-117.23337556140683,32.874441864596371],[-117.23331056846959,32.874441643324054],[-117.23323076386461,32.874442211688752],[-117.23314276830925,32.874442485380811],[-117.23300203221616,32.874444047005142],[-117.23296458573469,32.874444011274647],[-117.23295564968345,32.874443404251871],[-117.23294931651233,32.874441723279702],[-117.23293270560835,32.874432400600355],[-117.23292992368266,32.874430839262303],[-117.23292977644799,32.874432390538232],[-117.23286412520552,32.874432164348946],[-117.23286236194143,32.874432158536912],[-117.23285622042516,32.874432137055052],[-117.23285613906612,32.874425236625768],[-117.23285282822472,32.874420713644618],[-117.23285276936686,32.874420610411839],[-117.23284968255787,32.8744151929181],[-117.23284690714902,32.874408666502596],[-117.23284480236811,32.874402577510587],[-117.23284389512722,32.874398560226624],[-117.23284282807992,32.874391525162004],[-117.23284228091195,32.87438348592346],[-117.23284215455911,32.874368157214732],[-117.23284166645735,32.874333072284095],[-117.23284145346221,32.874332945930242],[-117.23284054035582,32.874332325577122],[-117.23283967692554,32.874331656134494],[-117.23283886747554,32.874330940273346],[-117.23283811525168,32.874330181574798],[-117.23283742349972,32.874329383620058],[-117.23283679544544,32.874328548186995],[-117.23283623328618,32.874327680668507],[-117.23283573917912,32.874326782851107],[-117.2328353164003,32.874325861020807],[-117.23283496496995,32.874324916981045],[-117.23283468815394,32.874323956116235],[-117.23283448598244,32.874322981131485],[-117.23283436065302,32.874321997419784],[-117.23283431003952,32.874320910314438],[-117.23283398959472,32.874225739687482],[-117.2328324938206,32.874155835465857],[-117.23283238268793,32.874151052577439],[-117.23283221551409,32.874150245039367],[-117.2328320901849,32.874149261327645],[-117.23283204128381,32.874148327505814],[-117.23283149150102,32.874112694802982],[-117.2328314906155,32.874112519870948],[-117.23283142044366,32.874072086956005],[-117.23283130870632,32.874071841667629],[-117.23283095727702,32.874070897627867],[-117.23283068046184,32.874069936763064],[-117.23283047829101,32.87406896177832],[-117.23283035296198,32.874067978066577],[-117.23283030309399,32.874066957684647],[-117.23283005749988,32.874038562695794],[-117.23283008528958,32.874037606621989],[-117.23283018862084,32.874036621091363],[-117.23283036897519,32.874035643063735],[-117.23283062427599,32.8740346779662],[-117.23283095455355,32.874033728503704],[-117.2328310910025,32.874033411806536],[-117.23283094670396,32.874018676590545],[-117.23283062941582,32.87401782335575],[-117.2328303526008,32.874016862490883],[-117.23283015043006,32.874015887506161],[-117.23283002510114,32.874014903794397],[-117.23282997448783,32.874013816689057],[-117.23282981810357,32.87396738783643],[-117.23282903812456,32.873912104271277],[-117.23282850940389,32.873871756161073],[-117.23282000021523,32.873295203866782],[-117.23282002789396,32.873294237874603],[-117.23282012060919,32.873293354325881],[-117.23254658969455,32.873295529843951],[-117.23254662152135,32.873295222094825],[-117.23254664692047,32.873294625837516],[-117.23254665233694,32.873294345350793],[-117.23254668556217,32.873294258518825],[-117.23256919130101,32.873294078641329],[-117.23257903353867,32.873293932739088],[-117.2325467104509,32.873294190689791],[-117.23253011028396,32.873294322699145],[-117.23252873726551,32.873294333617707],[-117.23252643892879,32.873294351894522],[-117.23228402162526,32.873296284816348],[-117.23237273622414,32.873294572230634],[-117.2322880867095,32.873295054976801],[-117.23147299007154,32.873299699267733],[-117.23105462127803,32.873302077811303],[-117.23098485256064,32.873305686896046],[-117.23095656523499,32.873306013383591],[-117.23087051313676,32.873306539658884],[-117.23079295507786,32.873305993900495],[-117.23079043528492,32.873306468383866],[-117.230790225384,32.873306523253177],[-117.23079002860659,32.873306605070766],[-117.23078985135358,32.873306712884116],[-117.23078969464329,32.873306842176255],[-117.23078869788564,32.873307822172649],[-117.23078831101712,32.873308202174243],[-117.230787761369,32.873308742175581],[-117.23078000179108,32.873315692222675],[-117.23077995103593,32.873315740418199],[-117.23077989085526,32.87331580582174],[-117.23077945516435,32.873316311553722],[-117.23075862884795,32.873340517466666],[-117.23111933325654,32.872085172055606],[-117.23177190794402,32.871925444946299],[-117.23184950633153,32.871923488311587],[-117.23198471894048,32.871891839062293],[-117.23203633742395,32.871891448629626],[-117.23200995155841,32.871879904067725],[-117.23199686863458,32.871874222437725],[-117.23199262106495,32.871873170493096],[-117.23198649716589,32.871872605075431],[-117.23198105861819,32.871872458031753],[-117.23192623109938,32.871879636152293],[-117.23190957623991,32.871881450274799],[-117.23190679871345,32.871880082755226],[-117.23190607594431,32.871877651976632],[-117.23190817488221,32.871873462006668],[-117.23190956563063,32.87187130749934],[-117.2319200726549,32.871871283511496],[-117.23194377911234,32.871867944397174],[-117.23196235372369,32.871863981476956],[-117.23196347267528,32.871859590990987],[-117.23198501857395,32.871859420649088],[-117.23198886151042,32.871859451424477],[-117.23199667775805,32.871859513742088],[-117.23205137969798,32.871859946438491],[-117.23209307809901,32.871860086606773],[-117.23210089501264,32.871860112842647],[-117.23212016319145,32.871860177001956],[-117.23219355453783,32.87186070905193],[-117.2321972958884,32.871860733414422],[-117.23220511200542,32.871860783997157],[-117.23227034680491,32.871861209511444],[-117.23230151294307,32.871861409897626],[-117.2323093290501,32.871861459572131],[-117.23236323928111,32.871861805545002],[-117.23240573032407,32.871861923975729],[-117.23241354718762,32.871861945683442],[-117.2324355765395,32.871862007676818],[-117.23250994998787,32.871862163816502],[-117.23251776679106,32.871862180107591],[-117.23251789288169,32.871862180006651],[-117.23260556159933,32.871863298931935],[-117.23261416063033,32.871863318013389],[-117.23262197638525,32.871863336109755],[-117.23268976738731,32.871863489485222],[-117.23271837977265,32.871863510791577],[-117.23272619645515,32.871863516249476],[-117.23278077754578,32.87186355642217],[-117.23282259974218,32.871863681833311],[-117.2328304166261,32.871863705317978],[-117.23287405226391,32.871863837026403],[-117.23292681786498,32.871864165708381],[-117.2329346339626,32.871864214441622],[-117.2329626357716,32.871864389337411],[-117.2330310349696,32.871864845182934],[-117.23303885110761,32.871864897516275],[-117.2330628594855,32.871865057271982],[-117.23313525357909,32.871865276576912],[-117.23314307046327,32.871865300041854],[-117.2331762764736,32.871865401014666],[-117.23317835295359,32.871863127415764],[-117.23318465108407,32.871863314457315],[-117.23321334828846,32.871859833486781],[-117.23328243422493,32.871860066406938],[-117.23334910457245,32.871860148985405],[-117.23344574888513,32.871862757705173],[-117.23351984163961,32.871861700816687],[-117.23362228401163,32.8718610566278],[-117.23364816489965,32.871861440325524],[-117.23365215018879,32.871866844333844],[-117.23364817930782,32.871871522655063],[-117.23365311395062,32.871874673752657],[-117.23365810090421,32.871868453468551],[-117.23367139405418,32.871877540955346],[-117.23372042245579,32.871876303860333],[-117.23377470890391,32.871874934704259],[-117.2337915955071,32.87187511856181],[-117.23392203847369,32.871876545211819],[-117.23403566111621,32.871877790079559],[-117.23406425597753,32.871866020858484],[-117.23547349668365,32.87194417973673],[-117.23568137960063,32.871991211343776],[-117.23679528221976,32.872128269532197],[-117.23681128904764,32.872130800040814],[-117.23682726629615,32.872133456126583],[-117.23684321081043,32.872136242323549],[-117.23685912468719,32.872139155007943],[-117.23687500473103,32.872142195107052],[-117.23689085302848,32.872145358095374],[-117.23690666645501,32.872148651212008],[-117.23692243645279,32.872152073623568],[-117.23693816824286,32.872155614467331],[-117.23695386301516,32.872159284554762],[-117.23696951323986,32.872163079437364],[-117.23698511996513,32.872166997303232],[-117.23700068431023,32.872171042652198],[-117.23701620193046,32.872175209206752],[-117.23703167288647,32.872179502376902],[-117.23704709177532,32.872183916795365],[-117.23706246397987,32.872188456026151],[-117.23707778197026,32.872193115620668],[-117.23709304897224,32.872197897356699],[-117.2371082628691,32.872202803054591],[-117.23712341825778,32.872207827347118],[-117.23721519277969,32.872259316126296],[-117.23721924296262,32.872260863627325],[-117.23723396862972,32.872266729965908],[-117.23724852132749,32.872272894360037],[-117.23726289249809,32.872279355976431],[-117.23727707462172,32.872286111268203],[-117.23729105801134,32.872293154000666],[-117.23730483302036,32.872300481545665],[-117.23731839213902,32.872308091258027],[-117.23733173100247,32.872315975057042],[-117.23734483781698,32.872324129429984],[-117.23735769974047,32.872332552676049],[-117.23737032308277,32.872341235727447],[-117.23738269283452,32.872350174195361],[-117.23739479827049,32.872359364558768],[-117.23740663607381,32.872368796924818],[-117.23741819987417,32.872378474951624],[-117.23742947989328,32.872388384289415],[-117.23744047187733,32.872398526775676],[-117.23745117029176,32.872408885321619],[-117.23746156449209,32.872419463619394],[-117.23747165221987,32.872430250865982],[-117.23748142592487,32.872441240809778],[-117.23749088021395,32.872452428985021],[-117.23750001074234,32.872463809114393],[-117.23750880990902,32.872475370437705],[-117.23751727341985,32.872487111185897],[-117.23752539688938,32.872499021474837],[-117.23753317703117,32.872511094116796],[-117.23754060308937,32.872523322885613],[-117.23776867865153,32.872517270502037],[-117.23783690653903,32.872515457163928],[-117.2379021910865,32.872514935180554],[-117.23809744637165,32.872513373808687],[-117.23822223704079,32.872314481664141],[-117.23822995479537,32.872303296868402],[-117.2382382541733,32.872291474392703],[-117.23824666529929,32.872279706930996],[-117.23825518175217,32.872267993632867],[-117.23826380892504,32.872256338963879],[-117.23827254039682,32.872244742073612],[-117.23828138470529,32.87223320199211],[-117.23829033225422,32.872221720599512],[-117.23829938944446,32.872210296942846],[-117.23830854457329,32.872198935624475],[-117.23831781366786,32.872187636516145],[-117.23832718494455,32.872176397006903],[-117.23833665846405,32.872165222506645],[-117.23834623627214,32.872154104883265],[-117.23835591525453,32.87214305227743],[-117.23836569652023,32.8721320682872],[-117.2383755789298,32.872121146609516],[-117.23838556677742,32.872110289013342],[-117.23839564729194,32.872099500109677],[-117.23840583218619,32.872088776197792],[-117.23841611512006,32.87207812364062],[-117.23842650028648,32.87206753519051],[-117.23843697708169,32.872057018146428],[-117.23844755614996,32.872046568816032],[-117.23845823004221,32.872036189964227],[-117.23846899876872,32.872025882492608],[-117.23847986340795,32.872015647294333],[-117.23849082285099,32.872005480771222],[-117.23850187505202,32.871995391055322],[-117.23851302206695,32.871985370916228],[-117.23852426077134,32.871975427592837],[-117.23853559219314,32.871965557469998],[-117.2385470153045,32.871955764162763],[-117.23855852685935,32.871946044090215],[-117.23857013119242,32.871936402628116],[-117.23858181970527,32.871926835336446],[-117.23859360205462,32.871917345744954],[-117.23860546862429,32.871907933930508],[-117.23861742161195,32.871898605286027],[-117.23862946309383,32.871889354384372],[-117.23864158665899,32.871880181276779],[-117.23865377989458,32.871869600883031],[-117.23865557769942,32.871868500792033],[-117.2386660908052,32.871862075571705],[-117.23867846821116,32.87185314570479],[-117.238690927741,32.871844297238532],[-117.23870347050378,32.871835533771055],[-117.2387160911165,32.871826851738419],[-117.23872879493175,32.871818251999457],[-117.23874157769589,32.871809736391732],[-117.23875443516542,32.871801307654408],[-117.23876737370058,32.871792961227825],[-117.23878039015665,32.871784702547565],[-117.23879348238668,32.871776530729164],[-117.2388066482233,32.871768443084598],[-117.2388198855802,32.871760444139277],[-117.23883320300521,32.871752533824775],[-117.23884659192021,32.87174470950454],[-117.23886005128706,32.871736973892077],[-117.23887358327318,32.87172932967519],[-117.23891573527831,32.871712501120449],[-117.23895788726733,32.871695672551368],[-117.23896156533193,32.871694059640362],[-117.23897598768302,32.871687674340116],[-117.23899036006107,32.871681216396503],[-117.2390046856513,32.871674683980608],[-117.23901896549177,32.871668074378945],[-117.23903319431101,32.871661393945864],[-117.23904737525358,32.871654637245761],[-117.23906150514441,32.871647807009374],[-117.23907558611042,32.871640902317878],[-117.2390896138978,32.871633925008844],[-117.23910359168167,32.871626872351598],[-117.23911751631734,32.871619749781921],[-117.23913138882259,32.87161255278285],[-117.23914521137485,32.871605284944032],[-117.23915897753288,32.871597943611746],[-117.23917269055283,32.871590533268694],[-117.23918634824695,32.871583049423677],[-117.23919994850876,32.871575494798847],[-117.23921349668051,32.871567869351423],[-117.23922698955684,32.871560173107085],[-117.23924042181559,32.871552407912013],[-117.23925379771042,32.871544571928553],[-117.23926711830973,32.871536665148305],[-117.23928037935995,32.871528689408741],[-117.23928369801457,32.871526664561586],[-117.23982718905027,32.871524939302127],[-117.23983013749354,32.871117096313526],[-117.24052473726226,32.870613060995183],[-117.24058362953683,32.87057221844929],[-117.24058413564076,32.870571898779509],[-117.24064461259627,32.870533624303043],[-117.24064507123821,32.870533360020225],[-117.24070756758698,32.870497351646371],[-117.24071628910553,32.870492601635917],[-117.24071828256778,32.870491516177012],[-117.24079286982047,32.870453440484141],[-117.24086965310636,32.870418609660057],[-117.2408735656261,32.870416948821905],[-117.2408742260434,32.870416668491991],[-117.24095526305838,32.870384577277761],[-117.24103817110336,32.870356095129416],[-117.24112272665303,32.870331298681499],[-117.24120869861255,32.870310256514124],[-117.24129585362908,32.870293026405164],[-117.24138395500297,32.870279653535427],[-117.24147276274839,32.870270175898781],[-117.24156203458062,32.870264617080267],[-117.24165152921243,32.87026299434531],[-117.24179722500716,32.870273547589811],[-117.2418942688204,32.870286411989369],[-117.24199025410078,32.870304048750292],[-117.2420848500178,32.870326399212921],[-117.24217231236732,32.870350556282503],[-117.24225798112097,32.870378923532165],[-117.24227314186147,32.870397972949668],[-117.24228799530272,32.870403606812424],[-117.24231494484638,32.870400526411125],[-117.24241834330353,32.870445765344712],[-117.24251756044455,32.870497242715565],[-117.24261207065163,32.870554683214607],[-117.24270136934632,32.870617782508816],[-117.24277347570076,32.870674786098355],[-117.24284246976775,32.870734471208429],[-117.24290821019451,32.870796716342532],[-117.24298254607785,32.870880535232736],[-117.24305152625411,32.870967555050541],[-117.24311495561216,32.871057531195746],[-117.2431726571311,32.871150212610125],[-117.24322446971262,32.871245339089512],[-117.24327024823235,32.871342645792097],[-117.24330986348929,32.871441858729561],[-117.24334320655066,32.871542701045072],[-117.24335944128985,32.871642358940875],[-117.24336965250394,32.871742583770022],[-117.24337381375449,32.871843117846353],[-117.24337338370613,32.871904500638493],[-117.24337069422937,32.871965842982831],[-117.24337219405921,32.871979526684576],[-117.24337360312971,32.871993216526484],[-117.24337491394124,32.872006910765407],[-117.2433761297704,32.872020615687212],[-117.24337724950796,32.872034327693811],[-117.24337827307238,32.872048039571908],[-117.24337920378113,32.872061761214049],[-117.24338003618992,32.872075483646547],[-117.24338077356521,32.872089212253584],[-117.24338141801343,32.872102944313063],[-117.24338196632904,32.872116679850691],[-117.24338241527605,32.87213041618724],[-117.24338276912825,32.872144153288367],[-117.24338302791624,32.872157893859047],[-117.24338319267788,32.872171635185751],[-117.24338326020772,32.87218537729418],[-117.24338323264259,32.872199120167203],[-117.24338310781501,32.872212861116992],[-117.24338288899145,32.872226605527743],[-117.24338257498118,32.872240342588071],[-117.24338216267039,32.872254080438701],[-117.24338165733016,32.87226781272512],[-117.24338105690489,32.872281546677769],[-117.2433803581179,32.872295276010746],[-117.24337956206809,32.87230900342049],[-117.24337867509513,32.87232272254375],[-117.24337768980094,32.872336440654024],[-117.24337661040862,32.872350153208615],[-117.24337543262372,32.872363858438455],[-117.24337048469398,32.87567588338684],[-117.24347158009118,32.875654168028589],[-117.24347941975839,32.875804189344592],[-117.24347954126654,32.875808041539891],[-117.2434800190978,32.87582177764304],[-117.24348057813724,32.8758355130932],[-117.24348120870707,32.875849242557742],[-117.24348192692685,32.875862974022787],[-117.24348271774558,32.87587669949356],[-117.24348358545782,32.875890420739061],[-117.24348453222102,32.875904139545398],[-117.24348555695647,32.875917855019608],[-117.24348665963369,32.875931564456579],[-117.24348783706746,32.875945269685417],[-117.24348909568941,32.875958972457966],[-117.24349043224302,32.875972668291666],[-117.24349184139589,32.875986358131058],[-117.24349333170646,32.87600004280916],[-117.24349489888033,32.876013720556976],[-117.2434965450647,32.876027392258919],[-117.24349826598559,32.876041057949429],[-117.24350006587629,32.876054713987514],[-117.24350194265085,32.876068364898572],[-117.24350389846656,32.876082012468807],[-117.24350592781798,32.876095642314496],[-117.2435080362107,32.87610926881937],[-117.24351022252542,32.876122887483604],[-117.24351248674161,32.876136496503982],[-117.24351326914432,32.876142283948276],[-117.24351514273751,32.8761559366882],[-117.24351706543278,32.876169584524582],[-117.24351903718944,32.876183223850695],[-117.24352105060927,32.87619686193996],[-117.24352311309045,32.876210491518975],[-117.24352522149881,32.876224118925151],[-117.24352737898897,32.876237739624415],[-117.24352958129707,32.876251354552814],[-117.24353182952213,32.876264966406623],[-117.24353412574018,32.876278569758817],[-117.2435364689439,32.876292170027845],[-117.24353885696556,32.876305764525981],[-117.24354128976445,32.876319349646515],[-117.24354377276481,32.876332932559862],[-117.24354629736742,32.876346508826366],[-117.24354887638454,32.876360077441248],[-117.24355149593542,32.876373639417956],[-117.2435541635101,32.87638719559795],[-117.24355687910844,32.876400745981215],[-117.24355963845642,32.876414290602135],[-117.24356244579761,32.876427826721326],[-117.24356529581991,32.876441357086748],[-117.24356819703092,32.876454878022997],[-117.24356923650696,32.876461853708086],[-117.24357126381148,32.876475489881415],[-117.24357328787032,32.876489122473828],[-117.24357531089176,32.876502757779811],[-117.24357733178699,32.876516394004639],[-117.24357934522345,32.87653003209288],[-117.24358135867068,32.87654367108275],[-117.24358336991021,32.8765573037781],[-117.24358538015316,32.876570942793713],[-117.24358738394474,32.876584578254125],[-117.24358938564058,32.876598217338355],[-117.24359138625837,32.876611855529532],[-117.24359338371191,32.876625497353089],[-117.24359537788911,32.876639132890659],[-117.24359736890209,32.87665277206073],[-117.2435993566999,32.876666410354844],[-117.24360134130288,32.876680049576329],[-117.2436033258963,32.876693687896136],[-117.24360530411987,32.876707329874129],[-117.24360728233381,32.876720970950416],[-117.24360925411683,32.876734610274902],[-117.24361122912643,32.876748251376917],[-117.24361319666704,32.876761893440687],[-117.24361516206102,32.876775534619917],[-117.2436171306714,32.876789176675061],[-117.24361908218577,32.876802818867645],[-117.24362104440652,32.876816462777583],[-117.24362299912772,32.876830104944297],[-117.24362495170223,32.876843746226484],[-117.24362690004399,32.876857391149713],[-117.24362884620848,32.876871032483386],[-117.24363078814024,32.876884677458094],[-117.24363273430595,32.876898318791746],[-117.24363466985817,32.87691196652289],[-117.2436366021748,32.876925611574848],[-117.24363853451243,32.876939258430056],[-117.24364046359412,32.876952900802706],[-117.24364239060044,32.876966548602475],[-117.24364431649805,32.876980192804211],[-117.24364623920081,32.876993837933256],[-117.2436481555133,32.877007484917179],[-117.24365006863098,32.877021132828609],[-117.24365198171863,32.877034778034947],[-117.24365389055312,32.877048425078932],[-117.24365579726133,32.877062073041742],[-117.24365770395994,32.877075720102866],[-117.24365960425804,32.877089368117183],[-117.24366150458727,32.877103018836451],[-117.24366339739657,32.877116666009186],[-117.24366529128523,32.877130314074982],[-117.24366718093081,32.877143964880084],[-117.24372687174203,32.878391320173222],[-117.24372678505952,32.878402473698159],[-117.24372668378507,32.878416214457367],[-117.24372658144202,32.878429955225187],[-117.24372647592381,32.878443698723792],[-117.2437263767864,32.878457439465812],[-117.24372627444325,32.87847118023361],[-117.24372617640486,32.878484923672033],[-117.24372607726734,32.878498664414082],[-117.243725981366,32.878512407835267],[-117.24372588650266,32.878526148542903],[-117.24372578736502,32.878539889284916],[-117.24372569466931,32.878553632680365],[-117.24372559873729,32.878567373396571],[-117.24372550711003,32.87858111678338],[-117.2437254143837,32.87859485747385],[-117.24372532272579,32.878608598155651],[-117.24372523323565,32.878622341525272],[-117.24372514371484,32.878636082189907],[-117.24372505849885,32.87864982552518],[-117.24372496897801,32.8786635661898],[-117.24372488376196,32.878677309525024],[-117.24372479744673,32.878691050163859],[-117.24372471116203,32.878704793507694],[-117.24372462915156,32.878718536817168],[-117.24372454604197,32.87873227743016],[-117.24372446400089,32.878746018034626],[-117.24372438513493,32.878759755908291],[-117.24372430208639,32.878773501931292],[-117.24372422325092,32.878787242509929],[-117.24372414658312,32.878800985776401],[-117.24372406774759,32.878814726355024],[-117.24372399107975,32.878828469621489],[-117.24372391544986,32.878842210174319],[-117.24372384305622,32.878855953406386],[-117.24372376956342,32.878869693942036],[-117.2437236939641,32.878883437199875],[-117.2437236236769,32.87889717770976],[-117.24372355128317,32.878910920941763],[-117.24372348206458,32.878924661443023],[-117.24372341180789,32.878938404657845],[-117.24372334579493,32.878952145133326],[-117.2437232766068,32.878965888339572],[-117.24372321063451,32.878979632421746],[-117.24372314671791,32.878993369273289],[-117.24372308077614,32.879007116060393],[-117.24372301795857,32.879020855608424],[-117.24372295519188,32.87903459966477],[-117.2437228955902,32.879048340088623],[-117.24372283174473,32.87906208325186],[-117.24372277214295,32.879075823675741],[-117.24372271257172,32.879089566804616],[-117.2437226562062,32.879103309907691],[-117.24372259981006,32.87911705030578],[-117.24372254665022,32.879130793383055],[-117.24372248597976,32.879144533815506],[-117.24372243281989,32.879158276892788],[-117.24372237965993,32.879172019970085],[-117.24372232646945,32.879185760342317],[-117.24372227330953,32.879199503419613],[-117.24372222332465,32.879213243766095],[-117.24372217337034,32.879226986817564],[-117.24372212341608,32.879240729869061],[-117.24372207663689,32.879254470189736],[-117.24372202988827,32.879268213215411],[-117.24372198310908,32.879281953536101],[-117.24372193636037,32.879295696561719],[-117.2437218928174,32.879309439561631],[-117.24372184924391,32.879323179856534],[-117.24372180567035,32.87933692015141],[-117.24372176640156,32.879350663116909],[-117.24372172606427,32.879364406090978],[-117.24372168252125,32.879378149090869],[-117.24372164535906,32.879391889334158],[-117.24372160822743,32.879405632282477],[-117.24372157109578,32.879419375230796],[-117.24372153393352,32.879433115474029],[-117.24372150107615,32.879446858387965],[-117.24372146394445,32.879460601336262],[-117.24372143319363,32.879474341527946],[-117.24372139923707,32.879488081745464],[-117.24372136961588,32.879501827338558],[-117.24372133565932,32.879515567556069],[-117.24372130814474,32.87952931042696],[-117.24372127742443,32.87954305332363],[-117.24372125094781,32.879556793480987],[-117.24372122343317,32.879570536351842],[-117.24372119591854,32.87958427922274],[-117.2437211726476,32.879598019354255],[-117.24372114833869,32.879611762199367],[-117.24372112402972,32.879625505044515],[-117.24372110078934,32.879639247880995],[-117.24372107965559,32.879652987995328],[-117.24372105962091,32.879666730806029],[-117.24372103851762,32.879680473625328],[-117.2437210205896,32.879694213713869],[-117.24372100376057,32.879707956498784],[-117.24372098586304,32.879721699292304],[-117.24372096903403,32.879735442077212],[-117.24372095431168,32.879749182139946],[-117.24372094068836,32.879762924899062],[-117.24372092599657,32.879776667666732],[-117.24372091554842,32.879790407695104],[-117.2437209040623,32.879804150437025],[-117.24372089364473,32.879817893170326],[-117.24372088215861,32.87983163591224],[-117.24372087491625,32.879845375914783],[-117.24372086770438,32.879859118622349],[-117.24372085942395,32.879872861338441],[-117.24372085541788,32.8798866040202],[-117.2437208513506,32.879900341291908],[-117.24372084310073,32.879914086713057],[-117.24372084230032,32.879927829368995],[-117.24372083829422,32.879941572050733],[-117.24372083643543,32.879955315616911],[-117.24372083880004,32.879969054640426],[-117.24372083800984,32.879982798197993],[-117.24372083934658,32.879996540836729],[-117.24372084172137,32.880010280761887],[-117.2437208441267,32.880024023392018],[-117.24372084973776,32.880037765996391],[-117.24372085428026,32.880051508609306],[-117.24372086309708,32.880065251187858],[-117.24372086550242,32.880078993817975],[-117.2437208742887,32.880092733691569],[-117.2437208831055,32.880106476270086],[-117.24372089195286,32.880120221553646],[-117.24372090287625,32.88013396140996],[-117.24372091489883,32.880147703962741],[-117.24372092689087,32.880161443810486],[-117.24372093891344,32.880175186363239],[-117.24372095414171,32.880188928890199],[-117.24372096937003,32.880202671417159],[-117.24372098459834,32.880216413944112],[-117.24372100300185,32.880230153740285],[-117.24372101823019,32.880243896267224],[-117.24372103666428,32.880257638768335],[-117.24372105830409,32.880271381243709],[-117.2437210767382,32.880285123744883],[-117.243721098378,32.880298866220258],[-117.24372112319305,32.880312605964825],[-117.24372114483286,32.880326348440171],[-117.24372116970906,32.880340093594768],[-117.24372119452408,32.880353833339328],[-117.24372121936972,32.88036757578891],[-117.24372124742109,32.880381318212663],[-117.2437212754419,32.880395057931423],[-117.24372130456186,32.880408800346572],[-117.24372133261326,32.880422542770383],[-117.24372136387041,32.880436285168379],[-117.24372139509704,32.880450024861332],[-117.24372142959054,32.880463769938473],[-117.24372146084768,32.880477512336441],[-117.24372149634863,32.880491251995039],[-117.24372153081164,32.880504994367243],[-117.24372156848035,32.880518736713597],[-117.24372160294331,32.880532479085772],[-117.24372164168061,32.8805462214236],[-117.24372167934936,32.880559963769926],[-117.24372171702831,32.880573707017959],[-117.24372176217717,32.880587449304173],[-117.24372180302115,32.880601188919776],[-117.2437218438957,32.880614931240345],[-117.24372188904459,32.880628673526537],[-117.24372193312496,32.880642415821342],[-117.24372197720528,32.880656158116132],[-117.24372202556,32.880669900376532],[-117.24372207284614,32.880683642645508],[-117.24372211799511,32.880697384931665],[-117.243722168487,32.880711127174884],[-117.24372221894838,32.880724866713081],[-117.24372227050894,32.880738608947688],[-117.24372232100086,32.880752351190864],[-117.24372237256144,32.88076609342545],[-117.2437224262592,32.880779835642848],[-117.24372248102559,32.880793577851676],[-117.24372253472335,32.880807320069046],[-117.24372259269552,32.880821062252089],[-117.24372265066769,32.880834804435104],[-117.24372270754074,32.880848543921672],[-117.24372276551297,32.880862286104644],[-117.24372282562234,32.880876028270471],[-117.24372288680037,32.880889770427672],[-117.2437229469098,32.880903512593463],[-117.24372301129364,32.880917254724892],[-117.24372307567745,32.880930996856321],[-117.24372313899268,32.88094473899632],[-117.24372199285128,32.881131649144017],[-117.24370826644991,32.88282210804492],[-117.24368350626068,32.886010564526138],[-117.24368162452116,32.886128296614928],[-117.24367677093464,32.88625258847398],[-117.24367583015155,32.886265242160263],[-117.24367575214806,32.886266284307041],[-117.2436752040372,32.886280017835688],[-117.24367463562174,32.886293751527589],[-117.24367404475426,32.886307484498289],[-117.24367343786689,32.886321218499504],[-117.24367281064441,32.886334949959043],[-117.24367216846049,32.886348681538834],[-117.24367149951934,32.886362409726843],[-117.24367081352021,32.886376141658928],[-117.24367010504859,32.886389871066527],[-117.24366938057747,32.886403603307969],[-117.24366863676848,32.886417326687472],[-117.24366787376418,32.886431053828254],[-117.24366709044503,32.886444780230647],[-117.24366628786946,32.886458504984411],[-117.2436654649586,32.886472227196393],[-117.24366462393128,32.886485954062792],[-117.24366376254831,32.886499676584123],[-117.24366287764443,32.886513398392829],[-117.24366198096469,32.886527118492694],[-117.24366106076404,32.886540837879956],[-117.24366011813153,32.886554558349303],[-117.24365916584003,32.886568275289314],[-117.24365818684198,32.88658199334585],[-117.24365718859762,32.886595710655364],[-117.24365617109677,32.88660942631617],[-117.24365513325034,32.886623138533622],[-117.24365407937375,32.886636850879924],[-117.24365300306519,32.886650564308383],[-117.24365190747967,32.886664274284769],[-117.24365079158932,32.886677984424452],[-117.24364965967894,32.886691695594635],[-117.24364850525508,32.886705400633652],[-117.24364733055691,32.886719108540902],[-117.24364613979792,32.886732813872023],[-117.24364492977215,32.886746516652806],[-117.24364369731434,32.886760220515662],[-117.2436424445109,32.886773920935177],[-117.24364117567713,32.886787621483535],[-117.24363988437058,32.886801319507299],[-117.24363857596506,32.88681501766856],[-117.24363724508672,32.886828713305249],[-117.24363657626827,32.886835545821008],[-117.24363560795031,32.886849263791284],[-117.24363459257029,32.886862978533053],[-117.24363353227564,32.886876690930634],[-117.24363242387058,32.886890401911614],[-117.243631269472,32.886904109655383],[-117.24363006909006,32.886917815063597],[-117.24362882269421,32.886931515431357],[-117.24362752817758,32.886945213480715],[-117.24362618767763,32.886958909194561],[-117.24362480119416,32.886972602572897],[-117.24362336549075,32.886986290936498],[-117.24362188807852,32.886999976930156],[-117.24362036251492,32.887013657900503],[-117.24361878989916,32.88702733654393],[-117.24361716912176,32.887041009262312],[-117.24361550557698,32.887054680521047],[-117.24361379707649,32.887068345829022],[-117.2436120350813,32.887082006156525],[-117.24361023245594,32.887095665007273],[-117.24360837953157,32.887109317950134],[-117.24360648166159,32.88712296584383],[-117.24360454101391,32.887136611376263],[-117.24360255108492,32.88715024648387],[-117.24360051309596,32.887163884683169],[-117.24359843223758,32.88717751240609],[-117.24359630645392,32.887191136883217],[-117.24359413039141,32.887204757255866],[-117.24359190937304,32.887218371677598],[-117.24358964338856,32.887231979246877],[-117.24358733028029,32.887245578177556],[-117.24358496908135,32.88725917749484],[-117.24358256504343,32.887272769040713],[-117.24358010964768,32.887286355589055],[-117.24357761461886,32.887299934340184],[-117.24357507357554,32.887313508050774],[-117.24357248437019,32.887327075836318],[-117.24356984912991,32.887340636777971],[-117.24356716465888,32.887354191803041],[-117.2435644373487,32.887367739056835],[-117.24356166507215,32.88738127945809],[-117.24355884463347,32.887394813934229],[-117.24355598030732,32.887408342450954],[-117.24355307101474,32.887421864115154],[-117.24355011250148,32.887435380764501],[-117.24354710894035,32.887448883347986],[-117.24354406151198,32.8874623817753],[-117.24354096695947,32.887475871563993],[-117.24353782535401,32.887489359025643],[-117.24353464194735,32.887502836002234],[-117.2435314092893,32.88751630525902],[-117.24352813054514,32.887529763163492],[-117.24352480686494,32.887543216920413],[-117.24352144033513,32.887556662004236],[-117.24351802562261,32.887570099359685],[-117.24351456803997,32.887583526238622],[-117.24351106123643,32.887596948102725],[-117.24350751156281,32.887610359490417],[-117.24350391370633,32.887623763149584],[-117.24350027296964,32.88763715543066],[-117.24349658301182,32.887650542696903],[-117.24349282663297,32.887664010752538],[-117.24347694609425,32.887719018837089],[-117.24346049557676,32.887773905256807],[-117.24342588664719,32.887883304968774],[-117.24341688132905,32.887910574096409],[-117.24340773347471,32.88793780920097],[-117.24336482379692,32.888059938876566],[-117.24331906808067,32.888181331239018],[-117.24329782338931,32.888235034302205],[-117.24328699250924,32.888261828443945],[-117.24325366449871,32.888341966891481],[-117.24317106799225,32.888527470235552],[-117.24313361341959,32.888606300913466],[-117.24310796342165,32.888658620895214],[-117.24302776702892,32.888814415684394],[-117.24294274548907,32.888968378061108],[-117.24285295851681,32.889120402932782],[-117.24285256815978,32.889121043605144],[-117.24284940886761,32.889125024056298],[-117.24284547949968,32.889128482269811],[-117.24284089641073,32.88913131090446],[-117.24283580187905,32.889133426758043],[-117.24283034905292,32.889134762772393],[-117.24282470422044,32.889135279738078],[-117.24281903928789,32.889134962747725],[-117.24281352427863,32.889133819452844],[-117.24280832954166,32.889131886358385],[-117.24204772031749,32.890299126420039],[-117.24200526041763,32.890362273134606],[-117.24197790421385,32.890400540194769],[-117.24196790617783,32.890414525408417],[-117.24196081855168,32.89042444111486],[-117.24196031310555,32.890424449680815],[-117.24106581923854,32.89043909390967],[-117.24107289624705,32.89070656330167],[-117.2411566593003,32.890890475762561],[-117.2415293965127,32.890887970824522],[-117.24153033271251,32.890887964214691],[-117.24151738644274,32.89089860050732],[-117.24144890089897,32.890954867191752],[-117.24141265765225,32.890984645125521],[-117.24140356860482,32.890991386470148],[-117.24132413395786,32.891050300985178],[-117.24128929554234,32.891076139597615],[-117.24128453247666,32.891079324003925],[-117.24116056650691,32.891162211493757],[-117.24040467291711,32.891641661598847],[-117.24039551338694,32.891646522386402],[-117.24038552747044,32.891650037173825],[-117.24037498876294,32.891652109084774],[-117.24036418948478,32.89165268167244],[-117.24035342656794,32.891651737227434],[-117.24034299745178,32.891649303123806],[-117.24033319040383,32.891645446486244],[-117.2403242738224,32.891640273373731],[-117.24031649621611,32.891633926976539],[-117.24020105479079,32.891527984950955],[-117.24007961383282,32.891426930567953],[-117.23995246461504,32.891331003145147],[-117.23981991008056,32.891240434692953],[-117.2396822679268,32.891155439069173],[-117.2395398675113,32.891076221923313],[-117.2393930475927,32.891002969893883],[-117.23924215964834,32.890935860500875],[-117.23908917981883,32.890875648907517],[-117.23893292796002,32.890821751199582],[-117.23877376884428,32.890774292494172],[-117.23861207563867,32.890733384316398],[-117.23574983732121,32.890124455333051],[-117.23572091314792,32.890118219617435],[-117.23559020358077,32.89008797601722],[-117.23546057570327,32.890054581964428],[-117.23533213566266,32.890018066373905],[-117.23515928745412,32.889963621744833],[-117.23498887874287,32.889903953445206],[-117.23482113167302,32.889839139970583],[-117.23465626310373,32.889769265270147],[-117.23449448783515,32.889694420524179],[-117.23433601752949,32.88961470325134],[-117.23418105641605,32.889530215538919],[-117.23402980776375,32.889441069401819],[-117.23271795159623,32.888654434111594],[-117.23270500322309,32.888646099428975],[-117.23269202315448,32.888637797460014],[-117.23267901140055,32.888629529106289],[-117.23266597011867,32.888621296154227],[-117.23265290035756,32.888613096791858],[-117.23263980107858,32.8886049337328],[-117.2326266668679,32.888596800707774],[-117.23261350637569,32.888588706665509],[-117.23260031736382,32.888580642606279],[-117.23258709675719,32.888572620277287],[-117.23257384657227,32.888564628841472],[-117.23256056362315,32.888556670127727],[-117.23254725972578,32.888548749452511],[-117.2325339187794,32.888540860631608],[-117.23252055047267,32.888533009900165],[-117.23250715901987,32.888525191814317],[-117.23249373485324,32.888517410958684],[-117.23248027902123,32.888509665521617],[-117.2324668011118,32.888501952721484],[-117.23245329047845,32.888494276249958],[-117.2324397513958,32.888486636073054],[-117.23242618599122,32.888479031272134],[-117.23241259213735,32.888471462765779],[-117.23239896875546,32.888463929660837],[-117.23238532011024,32.888456431021652],[-117.23237164302574,32.888448969578768],[-117.23235793643337,32.888441545340513],[-117.23234420455742,32.888434153764706],[-117.23233044745838,32.888426800261271],[-117.23231666085134,32.888419483962544],[-117.23230284792227,32.888412203039692],[-117.23228900757223,32.888404954796187],[-117.23227513990199,32.888397748248671],[-117.23226124802684,32.888390575256722],[-117.23224732982959,32.888383437640577],[-117.23223338322326,32.888376339925593],[-117.23221941028471,32.888369276684706],[-117.23220541531889,32.888362250588997],[-117.23219139085511,32.888355262599632],[-117.23217734113791,32.888348309977523],[-117.23216326617722,32.888341393624351],[-117.23214916490447,32.888334513548621],[-117.23213503841848,32.888327672446863],[-117.23212088991525,32.888320869391833],[-117.23213121495324,32.888303315974376],[-117.2306293188316,32.887370493426502],[-117.23056048000741,32.887345195601362],[-117.23054712398488,32.88737437121226],[-117.23049333635416,32.887366123189871],[-117.23039375414626,32.887350851356565],[-117.23024642121415,32.886991962342201],[-117.22989294952365,32.886843596821464],[-117.22948425905656,32.886875054397137],[-117.22897870593479,32.886341531686746],[-117.22895582667941,32.886244099696327],[-117.22893985249576,32.886145693217742],[-117.22893167673385,32.886060517615881],[-117.22892867636538,32.885975099924785],[-117.22892992656639,32.88588287824188],[-117.22892456668427,32.885790761224769],[-117.22891261652185,32.88569908596935],[-117.22889411938195,32.885608188482614],[-117.22886914309521,32.885518400067475],[-117.22883778004993,32.88543005002785],[-117.22878683979044,32.885299230356019],[-117.22873593285665,32.885171392478391],[-117.22877031386859,32.885084632673461],[-117.22887564647202,32.885021168358612],[-117.22883713545335,32.885005296073835],[-117.22880181669494,32.884984807695709],[-117.22877046466604,32.884960150671454],[-117.22874376186506,32.884931863352087],[-117.22872229335576,32.884900564214064],[-117.22870652735129,32.884866935781396],[-117.22869680762405,32.884831714766328],[-117.22866813552528,32.884796154204551],[-117.22864976681171,32.884733669723708],[-117.2286486633724,32.88363217876644],[-117.22870324137756,32.883161049714467],[-117.22875155523921,32.883074364408763],[-117.22879340483405,32.882985318113334],[-117.22882862940406,32.882894252968768],[-117.22885709288168,32.882801520838463],[-117.22887868702539,32.882707476971397],[-117.22889332719474,32.882612484544403],[-117.2289009587016,32.882516909201001],[-117.22891607653712,32.882165096230054],[-117.22890101946106,32.882152402585099],[-117.22888860132832,32.88213781690694],[-117.22887914812237,32.882121726168855],[-117.22887291143512,32.882104554904956],[-117.2288700566219,32.882086757188183],[-117.22887065839706,32.882068804942683],[-117.22887470173207,32.882051172606388],[-117.22888207746125,32.882034326345476],[-117.22889259282751,32.882018711346063],[-117.22890596923473,32.882004741913043],[-117.22894836500734,32.881567998169999],[-117.22880845526691,32.881618924460462],[-117.22881127932999,32.881538578940287],[-117.22881357609208,32.88147327513655],[-117.22881335823935,32.881432082335543],[-117.22880918926154,32.880641936645681],[-117.22880770226347,32.880360166782928],[-117.22888576994509,32.879269722538346],[-117.22892505203319,32.878721040664239],[-117.22894020655552,32.878509355313909],[-117.22916621974773,32.878129808018983],[-117.22918882246046,32.878004093925085]],[[-117.23405461517498,32.870975362665746],[-117.23414111773215,32.870971366952126],[-117.23464583307391,32.870994532427552],[-117.23480097134301,32.871149564383089],[-117.23478093655176,32.871461353786408],[-117.23478028209469,32.871471525310746],[-117.23453884569506,32.871469854198622],[-117.23413805513849,32.871453807610976],[-117.23412188719728,32.871452331282619],[-117.23410625318847,32.871448530501574],[-117.23409163315111,32.871442523180612],[-117.2340784468563,32.871434484522702],[-117.23406709768487,32.871424652983904],[-117.23405792234892,32.871413325263269],[-117.2340511810028,32.87140083203419],[-117.23404708834025,32.871387547616131],[-117.23404603736024,32.871380330279848],[-117.23404524214884,32.871187983839498],[-117.23404444800941,32.870995637389925],[-117.23405461517498,32.870975362665746]],[[-117.2438949558168,32.890037070116037],[-117.24389211799583,32.889956742644209],[-117.24265880222104,32.88999558552149],[-117.24265890820602,32.889995411534429],[-117.24298556960338,32.889495489136763],[-117.24305844994089,32.889379662755601],[-117.24312695563066,32.889261950762538],[-117.24331444909858,32.888925979922668],[-117.24341043826939,32.888755971777243],[-117.24349986183816,32.88858343282925],[-117.24358262355403,32.88840854421688],[-117.24365863894452,32.888231488786026],[-117.24372782676615,32.888052451159467],[-117.24379011651492,32.887871620381418],[-117.24379397735488,32.887862766625162],[-117.24379957629981,32.887854600451078],[-117.24380674720879,32.887847363060168],[-117.24381527871029,32.887841265357771],[-117.24382492170372,32.887836489696539],[-117.24383538918593,32.887833174548476],[-117.24384637553837,32.88783141885834],[-117.24385755535657,32.887831273035957],[-117.24386859953057,32.887832743334947],[-117.24402462395139,32.887865290426923],[-117.24793795615015,32.888681530857973],[-117.24802888218132,32.888703724414995],[-117.24811746354831,32.88873186944874],[-117.24820315322286,32.888765792738639],[-117.24828542406971,32.88880528483471],[-117.24836376886691,32.888850101860683],[-117.24843770354191,32.888899968193044],[-117.24850677143614,32.888954575524487],[-117.24857054869938,32.889013587328819],[-117.24862863895632,32.889076639805552],[-117.2486806872307,32.889143344472352],[-117.2489634731439,32.889538740895745],[-117.24905802782826,32.889670948394475],[-117.24894408785461,32.890009183081581],[-117.24980936461186,32.891237825048293],[-117.24983141112483,32.891492389845141],[-117.24850657277642,32.890800022346525],[-117.24569964030216,32.890087447599441],[-117.24400917456607,32.890040259804614],[-117.2438949558168,32.890037070116037]],[[-117.24120953958146,32.892829932898948],[-117.2411789151104,32.892250427496322],[-117.24117805660765,32.892228589532444],[-117.24117765114342,32.892206738917515],[-117.24117769775022,32.892184884676752],[-117.2411781975981,32.892163035818193],[-117.24117915075787,32.892141198653597],[-117.24118055301514,32.892119378627193],[-117.24118240546883,32.892097578435326],[-117.24118471152805,32.892075816085715],[-117.24118746685657,32.892054086202549],[-117.24119067267506,32.892032402302263],[-117.24119432796543,32.892010768901642],[-117.24119842422833,32.891989190577696],[-117.24120296798752,32.891967677197179],[-117.24120795823491,32.89194623417864],[-117.24121339183517,32.891924867859423],[-117.24121926673179,32.891903585469919],[-117.2412249052587,32.891884660342278],[-117.241225579759,32.891882390642522],[-117.24123233316564,32.891861293278239],[-117.24123951740408,32.891840299765825],[-117.24124713999574,32.891819413651994],[-117.24125519035474,32.891798644038936],[-117.24126366960031,32.891777995426402],[-117.24127257566585,32.89175747414307],[-117.24128190439821,32.891737091043069],[-117.24129165469789,32.891716843430061],[-117.24130182351084,32.891696744854535],[-117.24131240443481,32.8916767962695],[-117.24132339870083,32.891657012092971],[-117.2413347945527,32.891637392419099],[-117.24134660270798,32.891617939867118],[-117.24135880728804,32.891598668090452],[-117.24137141146842,32.891579574358332],[-117.24138440576256,32.891560670469296],[-117.24139778921334,32.891541966350331],[-117.24141155959171,32.891523453903368],[-117.2414257138946,32.89150515118726],[-117.24144023823877,32.891487059215116],[-117.2414551391075,32.891469184247022],[-117.24147040479561,32.891451530885448],[-117.24148603431551,32.891434106352179],[-117.24150202555015,32.891416912467577],[-117.24152247434505,32.891395790870995],[-117.24187240742786,32.891041242306066],[-117.24208037040982,32.890830536001481],[-117.24290729931816,32.890732750500511],[-117.24290853544652,32.890745017872433],[-117.24295510290915,32.891819010130021],[-117.24298208312891,32.892441180035931],[-117.24276853457825,32.892447768776776],[-117.24223824298893,32.892820127599919],[-117.2422361536334,32.892818061336889],[-117.24223402928442,32.892816019702053],[-117.24223186673575,32.892814002721039],[-117.24222966819603,32.89281201668841],[-117.24222743684105,32.89281005887343],[-117.24222516731682,32.8928081284173],[-117.24222286499763,32.892806227982192],[-117.24222052775619,32.892804358486757],[-117.24221815769938,32.892802517208956],[-117.24221575594684,32.892800708648636],[-117.24221331926182,32.892798930126332],[-117.24221084980219,32.892797183428307],[-117.24220835077405,32.892795468528917],[-117.24220582323609,32.892793784517679],[-117.24220326401249,32.892792134125614],[-117.24220067524082,32.892790517335293],[-117.24219805797958,32.892788933236659],[-117.24219541119059,32.892787384543205],[-117.24219273909783,32.892785866712288],[-117.24219003748753,32.892784385188207],[-117.2421873106243,32.89278293903503],[-117.24218455848793,32.892781526449355],[-117.24218178007065,32.892780152849816],[-117.24217897637,32.892778811916124],[-117.24217615063284,32.892777507229205],[-117.24217330181079,32.892776240601044],[-117.24217043099301,32.892775013826238],[-117.24216753698852,32.892773816093566],[-117.24216462205702,32.892772658205679],[-117.24216168620855,32.892771541064377],[-117.24215872938214,32.892770459259587],[-117.24215575587304,32.892769414560313],[-117.24215276465327,32.892768410581887],[-117.24214975249616,32.89276744554661],[-117.24214672580402,32.892766518501354],[-117.24214367921283,32.892765627685748],[-117.24214062026472,32.892764778449731],[-117.24213754571279,32.892763967212289],[-117.24213445559774,32.892763197580145],[-117.24213135523273,32.892762466805316],[-117.24212823926386,32.892761774029189],[-117.24212511100933,32.892761129144262],[-117.24212197347184,32.892760514091421],[-117.24211882362819,32.892759945126549],[-117.24211566354477,32.892759415920615],[-117.24211249533857,32.8927589246533],[-117.24210931693329,32.892758476751681],[-117.24210613256309,32.892758068574807],[-117.24210294223818,32.892757701024301],[-117.24209974279293,32.892757377732615],[-117.2420965405687,32.892757092336595],[-117.24209333241001,32.892756849370251],[-117.24209011719734,32.892756644333922],[-117.24208690357202,32.892756485273871],[-117.24208368718797,32.892756365912867],[-117.24208046698661,32.892756287161056],[-117.24207724511555,32.892756249902995],[-117.24207402267412,32.892756256835121],[-117.24207080169796,32.892756298923537],[-117.24206758659425,32.892756387855663],[-117.24206436658412,32.892756515602258],[-117.2420611491691,32.892756683906605],[-117.24205793970289,32.892756893627478],[-117.24205473073505,32.892757147529899],[-117.24205152861677,32.892757440152486],[-117.24204833229976,32.892757773307054],[-117.24204514073556,32.892758148805584],[-117.24204195923737,32.892758563900081],[-117.24203878142328,32.89275902134716],[-117.24203561796024,32.892759519257595],[-117.24203246030862,32.892760058601716],[-117.24202931057528,32.892760636657378],[-117.24202617626182,32.892761255167855],[-117.24202304989717,32.892761915094837],[-117.24201993679452,32.892762613690479],[-117.24201683697414,32.892763352758088],[-117.2420137514947,32.892764131387409],[-117.24201067821868,32.892764949595652],[-117.24200762248967,32.892765807339842],[-117.24200458321869,32.89276670282527],[-117.24200155830896,32.892767639675824],[-117.24199855197429,32.89276861244705],[-117.24199555999066,32.892769625681709],[-117.24199259088759,32.892770677507812],[-117.24199190641767,32.892770924670621],[-117.24199122518446,32.892771174512632],[-117.24199054399196,32.892771427961385],[-117.24198986281976,32.892771683213411],[-117.24198918379516,32.892771939349942],[-117.24198850585967,32.892772197281232],[-117.24198782795465,32.892772457917523],[-117.24198715009035,32.892772722160466],[-117.2419864753915,32.892772982771021],[-117.24198580076384,32.892773249693249],[-117.24198512937292,32.892773519294714],[-117.24198445904054,32.892773787985888],[-117.24198378768008,32.892774060292382],[-117.24198311955635,32.892774335278119],[-117.24198245465915,32.892774612041428],[-117.24198178335966,32.892774889757831],[-117.24198111526641,32.892775167448569],[-117.24198045047089,32.892775453228538],[-117.24197978885098,32.892775736277756],[-117.2419791251445,32.892776023852477],[-117.24197846355516,32.892776309606681],[-117.24197780523298,32.892776600745222],[-117.24197714691083,32.892776891883678],[-117.24197648968783,32.892777185718529],[-117.24197583142671,32.892777482267029],[-117.24197517641237,32.892777782396429],[-117.2419745245941,32.892778081598415],[-117.24197387066887,32.89277838352259],[-117.24197321888109,32.892778685429569],[-117.24197256715429,32.892778992746543],[-117.24197191971264,32.892779300930897],[-117.24197127119201,32.892779608222106],[-117.24197062700736,32.892779920889048],[-117.24196998176413,32.892780234466208],[-117.24196933761002,32.892780549838122],[-117.24196869560342,32.892780866094526],[-117.241968054686,32.892781184145697],[-117.2419674159466,32.892781505786424],[-117.24196677509018,32.892781829247511],[-117.24196613958752,32.892782153567481],[-117.24196550517392,32.892782479682168],[-117.24196486973231,32.892782809412097],[-117.24196423535938,32.892783139133449],[-117.24196360421301,32.892783470632438],[-117.24196297524476,32.892783805720832],[-117.24196234734521,32.892784140800721],[-117.24196171947618,32.892784478585618],[-117.24196109377515,32.892784819058313],[-117.2419604691631,32.892785161325726],[-117.24195984459179,32.892785507199875],[-117.24195922316568,32.892785847638237],[-117.24195860393799,32.892786193469462],[-117.24195798584,32.892786544702133],[-117.24195736774207,32.892786895934755],[-117.2419567528503,32.892787247141634],[-117.24195613802975,32.892787604660185],[-117.24195552637465,32.892787958546343],[-117.24195491478058,32.892788317842516],[-117.24195430318653,32.892788677138661],[-117.24195369482919,32.892789039114028],[-117.24195308971866,32.892789404670367],[-117.24195248459796,32.892789769325049],[-117.24195187947727,32.892790133979751],[-117.24195127441759,32.892790504044385],[-117.24195067578047,32.89279087495926],[-117.24195007713317,32.892791244972415],[-117.24194947855705,32.89279162129727],[-117.2419488832075,32.892791999399741],[-117.24194828780702,32.892792372993817],[-117.24194769355668,32.892792753792698],[-117.24194710466014,32.892793135450333],[-117.2419465157534,32.892793516206282],[-117.24194592688737,32.892793900568904],[-117.24194533915106,32.892794290332958],[-117.2419447535115,32.892794676473187],[-117.24194417111886,32.892795066194353],[-117.2419435898254,32.892795458611872],[-117.24194301066947,32.892795851012316],[-117.2419424326432,32.892796248814079],[-117.24194185350757,32.892796643017881],[-117.2419412808555,32.892797043481778],[-117.24194070603542,32.892797441257855],[-117.24194013341383,32.892797844426809],[-117.24193956506718,32.892798247561366],[-117.2419389956823,32.892798653409592],[-117.2419384305723,32.892799059223442],[-117.24193786549283,32.892799467742307],[-117.24193729937511,32.892799878974763],[-117.24193674073854,32.89280029014715],[-117.24193617889574,32.892800701345251],[-117.24193562249835,32.892801121517138],[-117.24193506392274,32.892801538099498],[-117.2419345118205,32.89280196004043],[-117.24193395645111,32.892802376597075],[-117.24193340649656,32.892802799422483],[-117.2419328576005,32.892803221337651],[-117.24193230552881,32.89280364598357],[-117.24193176311637,32.892804074158967],[-117.24193122069371,32.892804501432586],[-117.24193067831179,32.892804932312991],[-117.24193013595014,32.892805364996633],[-117.24192959683539,32.892805801261275],[-117.24192906085564,32.892806231188452],[-117.24192852494706,32.89280666742733],[-117.24192799226505,32.892807105443808],[-117.24192745962365,32.892807547066951],[-117.24192693017829,32.892807987762687],[-117.24192640394929,32.892808429334337],[-117.24192587775079,32.892808873610967],[-117.24192534943516,32.892809319708135],[-117.24192483609193,32.892809766586886],[-117.24192430995446,32.892810216273524],[-117.24192379343555,32.892810665882955],[-117.24192327801588,32.892811118188853],[-117.24192276154771,32.892811572306584],[-117.24192224829604,32.892812027300302],[-117.24192173931922,32.892812482259664],[-117.24192122933468,32.892812942637661],[-117.24192072359457,32.892813400276346],[-117.24192021684672,32.892813863333537],[-117.24191971751902,32.892814320920728],[-117.24191921083217,32.89281478938792],[-117.24191871159594,32.892815255090113],[-117.24191821449718,32.892815720775111],[-117.24191771849763,32.892816189156576],[-117.24191722574494,32.892816661118943],[-117.24191673511957,32.892817132162506],[-117.24191624556292,32.892817603197415],[-117.24191575927351,32.892818079616653],[-117.24191527295355,32.892818553330862],[-117.24191478881167,32.892819030634627],[-117.24191314266868,32.8928206291206],[-117.24191147274911,32.892822204351887],[-117.24190976723594,32.892823751012948],[-117.24190803156428,32.892825277175795],[-117.24190626244666,32.892826775652907],[-117.24190446846347,32.892828249080615],[-117.24190264104446,32.892829695724195],[-117.24190078342636,32.892831118262954],[-117.24189889981287,32.892832510350864],[-117.24189698705884,32.892833877423683],[-117.2418950440549,32.89283521588338],[-117.24189308148829,32.892836525644086],[-117.24189108869211,32.892837808594912],[-117.24188906988027,32.892839059291624],[-117.24188702834029,32.89284028492176],[-117.24188495970571,32.89284147740463],[-117.24188286833282,32.892842643919252],[-117.24188075092394,32.892843776376402],[-117.24187861287355,32.892844879241508],[-117.24187645524022,32.892845951604301],[-117.24187427159117,32.892846991712887],[-117.24187207053743,32.892848004908721],[-117.24186984659281,32.892848978611255],[-117.24186760629179,32.892849923589154],[-117.24186534639773,32.892850837163024],[-117.24186306903785,32.892851718414086],[-117.24186077201371,32.892852561949546],[-117.24185845864334,32.892853377661972],[-117.24185612776648,32.892854157444987],[-117.24185378366832,32.892854902165759],[-117.24185142426218,32.892855616350019],[-117.24184905376198,32.892856294553262],[-117.24184666576554,32.892856937728752],[-117.24184426563677,32.892857547636865],[-117.24184185442414,32.892858122465732],[-117.2418394331862,32.892858661305027],[-117.24183699555127,32.892859167812958],[-117.24183455750965,32.892859638254201],[-117.24183209982408,32.892860072783115],[-117.24182964173185,32.892860471245314],[-117.24182717255579,32.892860834628237],[-117.24182469763947,32.892861162889005],[-117.24182221483538,32.892861455143077],[-117.24181972518173,32.892861708676932],[-117.24181723625111,32.892861931545482],[-117.24181473938185,32.892862113899021],[-117.24181223893024,32.892862262916559],[-117.24180973487594,32.892862376794803],[-117.24127752799747,32.892882395930329],[-117.24127454764403,32.892882450495861],[-117.24127291854803,32.892882432903718],[-117.241271292262,32.892882380120852],[-117.24126966666873,32.892882293967723],[-117.24126804599241,32.892882169901746],[-117.24126642497058,32.89288201517904],[-117.24126480995476,32.892881824338232],[-117.24126320739795,32.892881600934544],[-117.24126160550342,32.892881341455542],[-117.24126001609845,32.892881052118689],[-117.2412584316307,32.89288072667226],[-117.24125686069073,32.89288036865441],[-117.24125529899347,32.89287997719773],[-117.241253749745,32.892879552276405],[-117.24125221402436,32.892879094783744],[-117.24125068971433,32.892878606540052],[-117.24124918213829,32.892878085699166],[-117.24124769024779,32.892877534073008],[-117.24124621829748,32.892876949823972],[-117.24124476203275,32.89287633478969],[-117.24124332359102,32.892875688952927],[-117.24124190621922,32.892875015894766],[-117.24124050665007,32.892874310230809],[-117.24123913027816,32.892873576426666],[-117.24123777600421,32.892872811785743],[-117.2412364449376,32.892872019906235],[-117.24123513600966,32.892871200796698],[-117.2412338524468,32.892870356234774],[-117.24123259418812,32.89286948081044],[-117.24123135916733,32.892868580852458],[-117.2412301602091,32.892867656258083],[-117.24122898340985,32.892866706236973],[-117.24122783519213,32.89286573163939],[-117.24122671982069,32.892864731529372],[-117.24122562985501,32.892863709573646],[-117.24122456850134,32.892862665746492],[-117.24122354323056,32.892861599086139],[-117.24122254764058,32.892860510545837],[-117.24122158710541,32.892859402787607],[-117.24122065840878,32.892858274935527],[-117.24121976259904,32.892857125177727],[-117.24121889972706,32.89285595802253],[-117.24121807514655,32.892854774328725],[-117.24121728244528,32.892853574147729],[-117.24121652910421,32.892852357419613],[-117.24121580870091,32.892851123294051],[-117.24121512661962,32.892849875334875],[-117.24121448392906,32.89284861353358],[-117.24121387635434,32.892847337924351],[-117.24121330498448,32.892846050302055],[-117.2412127751733,32.892844751525431],[-117.24121228158737,32.892843442539025],[-117.24121183060851,32.892842120586394],[-117.24121141484704,32.892840793842566],[-117.24121104171306,32.892839455935849],[-117.2412107069823,32.892838111408864],[-117.24121041171347,32.892836759351418],[-117.24121015487839,32.892835403378669],[-117.24120994070117,32.892834038948031],[-117.24120976606716,32.892832674200271],[-117.24120961381551,32.892831303862494],[-117.24120953958146,32.892829932898948]],[[-117.2412500239148,32.893499684609822],[-117.24124974003743,32.893497067308402],[-117.24124945612957,32.893494447302039],[-117.24124917542791,32.893491827269898],[-117.24124889901142,32.893489208105152],[-117.24124861830981,32.893486588073038],[-117.24124834722691,32.893483967963775],[-117.24124807724321,32.893481350550928],[-117.24124780617049,32.893478731343322],[-117.24124753933215,32.893476108494752],[-117.24124727145551,32.893473488359788],[-117.24124700785383,32.893470868190491],[-117.24124674638969,32.893468248004034],[-117.24124648920053,32.893465627783357],[-117.24124623199111,32.893463005759294],[-117.2412459769394,32.893460385521408],[-117.24124572295651,32.893457765274981],[-117.24124547214937,32.893455142297803],[-117.24124522457896,32.893452521999961],[-117.24124497591949,32.893449899907331],[-117.24124473152479,32.893447276878746],[-117.2412444903669,32.893444656529439],[-117.24124425238475,32.893442033449404],[-117.24124401440254,32.893439410369382],[-117.2412437764204,32.893436787289389],[-117.24124354489135,32.893434167764575],[-117.24124331332165,32.893431544633074],[-117.24124308175202,32.893428921501666],[-117.24124285659481,32.893426298318765],[-117.24124263143761,32.893423675135836],[-117.24124240628042,32.893421051952991],[-117.24124218539821,32.893418428735771],[-117.24124196666365,32.893415806403105],[-117.24124175112517,32.893413183143068],[-117.24124153558671,32.893410559883002],[-117.24124132429274,32.893407933883651],[-117.24124111516674,32.893405310572184],[-117.24124090604072,32.893402687260689],[-117.24124070119991,32.89340006481661],[-117.24124049524971,32.8933974387744],[-117.24124029360489,32.893394815402893],[-117.24124009406717,32.893392189309267],[-117.24123989562865,32.893389565912052],[-117.24123970250336,32.893386939766962],[-117.24123950724058,32.893384313639054],[-117.241239317352,32.893381690173278],[-117.24123912854235,32.893379067600577],[-117.24123894289831,32.893376441395503],[-117.24123875618552,32.893373815198991],[-117.24123857377816,32.893371191673197],[-117.24123839454656,32.893368565416672],[-117.24123821531499,32.893365939160169],[-117.24123803928964,32.893363312877938],[-117.24123786540174,32.893360686578546],[-117.24123769262327,32.893358063877294],[-117.24123752297992,32.893355434838604],[-117.2412373566037,32.893352811184258],[-117.24123719019708,32.893350184824847],[-117.24123702699669,32.89334755843975],[-117.24123686379627,32.893344932054639],[-117.24123670700828,32.893342305618098],[-117.24123655128906,32.893339679172996],[-117.24123639450113,32.893337052736477],[-117.24123624088898,32.893334423569186],[-117.24123609052363,32.893331797982896],[-117.24123594335435,32.893329171469198],[-117.24123579725385,32.893326544946966],[-117.24123565329084,32.893323918407575],[-117.24123550929734,32.893321289163175],[-117.24123536960926,32.893318662589444],[-117.24122405183876,32.893104499809681],[-117.24122398820258,32.893101982639266],[-117.2412240080473,32.89310061362638],[-117.24122407482503,32.89309923612133],[-117.24122417589382,32.893097866456991],[-117.24122432078073,32.893096496441217],[-117.2412245074094,32.893095131501049],[-117.24122472934695,32.893093769884729],[-117.24122499732148,32.893092415113152],[-117.24122530169394,32.893091065460084],[-117.24122564461209,32.893089721810099],[-117.24122603357732,32.893088385906523],[-117.24122645900151,32.893087060531464],[-117.24122691978545,32.893085742988575],[-117.24122742237196,32.8930844359313],[-117.24122796569243,32.89308313936835],[-117.24122854334449,32.893081854252721],[-117.24122916179141,32.893080585041382],[-117.24122981562857,32.893079326367086],[-117.2412305080926,32.893078080909241],[-117.24123123708665,32.893076852291557],[-117.2412320015319,32.89307563962106],[-117.24123280249709,32.893074442889038],[-117.24123363678613,32.893073263022991],[-117.24123450654659,32.893072100907368],[-117.24123541180907,32.89307095924719],[-117.24123635040556,32.893069835354616],[-117.24123732235633,32.893068731033004],[-117.24123832661306,32.89306764809411],[-117.24123935997963,32.893066587465462],[-117.24124042675136,32.893065550916127],[-117.24124152363052,32.893064530356646],[-117.2412426486423,32.893063540231033],[-117.24124380382251,32.893062571505375],[-117.24124498921181,32.893061627786309],[-117.24124620055555,32.893060710911527],[-117.24124743783344,32.893059819077713],[-117.24124870213456,32.893058954079457],[-117.24124999235958,32.893058113220526],[-117.24125130641178,32.893057300124646],[-117.24125264645913,32.893056517479693],[-117.24125400604848,32.893055761730416],[-117.24125538838609,32.893055032851144],[-117.24125679140565,32.893054337170589],[-117.24125821718361,32.893053669261661],[-117.24125966042712,32.893053033675571],[-117.24126111893771,32.893052425019476],[-117.24126259814039,32.893051850463799],[-117.24126409372973,32.893051307337842],[-117.24126560677442,32.893050795633059],[-117.24126713190033,32.893050312687294],[-117.24126867136691,32.89304986930339],[-117.24127022393264,32.893049450161577],[-117.24127178974997,32.893049068786894],[-117.24127336553136,32.893048717991732],[-117.24127494920032,32.893048403203188],[-117.24127654499111,32.893048120780293],[-117.24127814543287,32.8930478716848],[-117.2412797558692,32.893047655873787],[-117.24128136990798,32.893047475202017],[-117.24128298969686,32.893047330554047],[-117.24128461088979,32.89304721565248],[-117.24128623893208,32.893047139471122],[-117.24181844356855,32.893027117618885],[-117.24182094803422,32.893027039807158],[-117.24182345292688,32.893026999865342],[-117.24182596144252,32.893026996866084],[-117.24182846393212,32.893027028181578],[-117.24183097004482,32.89302709643961],[-117.24183347337826,32.893027202593316],[-117.24183596960668,32.8930273421687],[-117.24183847053709,32.893027519579711],[-117.24184096222513,32.893027730429559],[-117.24184345007532,32.893027980085293],[-117.24184593622523,32.893028268529818],[-117.24184841198266,32.893028583208363],[-117.24185088287425,32.893028940308106],[-117.24185334668125,32.893029332632807],[-117.24185579803961,32.893029758422109],[-117.2418582433821,32.8930302194278],[-117.24186067954315,32.893030719282315],[-117.24186310646179,32.893031252575661],[-117.24186551985291,32.893031818440392],[-117.24186792082591,32.893032420474739],[-117.241870312587,32.893033058652875],[-117.24187268868315,32.89303372941967],[-117.24187504911424,32.893034432775032],[-117.24187740034367,32.893035173175903],[-117.24187973162294,32.893035945298017],[-117.24188204725762,32.89303675181214],[-117.24188434615857,32.893037590923434],[-117.2418866304633,32.893038462614726],[-117.24188889486877,32.893039370535675],[-117.24189114035224,32.893040306562639],[-117.24189336699506,32.893041277908928],[-117.24189557367758,32.893042280074852],[-117.24189775829291,32.893043315782577],[-117.24189992400656,32.893044381399598],[-117.24190206333741,32.893045476986075],[-117.24190418698298,32.893046603357796],[-117.24190628210822,32.893047759716133],[-117.24190835731392,32.89304895050072],[-117.24191040392813,32.893050164960194],[-117.24191242847517,32.893051412961519],[-117.2419144266496,32.89305269183383],[-117.24191639941839,32.893053992552026],[-117.24191834690362,32.893055325936061],[-117.24192026798569,32.893056687486165],[-117.24192215301554,32.89305807457459],[-117.241924015907,32.893059488893151],[-117.24192584704144,32.893060930518999],[-117.24192765174226,32.893062397605881],[-117.24192818795743,32.893062841470865],[-117.24192872411155,32.893063279925784],[-117.2419292602555,32.893063717479045],[-117.24192980282203,32.893064155882541],[-117.2419303453581,32.893064591580966],[-117.24193088785353,32.893065023672762],[-117.24193143674103,32.893065453909749],[-117.24193198565899,32.893065886851765],[-117.24193253450584,32.893066313482052],[-117.24193308656902,32.89306674098831],[-117.24193363859156,32.893067164887889],[-117.24193419062428,32.893067589689153],[-117.24193474902869,32.893068010832252],[-117.24193530744338,32.893068432876973],[-117.24193586902354,32.893068851289371],[-117.24193643164193,32.893069266988164],[-117.24193699640807,32.893069683571476],[-117.24193756113344,32.893070096548058],[-117.24193812582836,32.893070506819697],[-117.24193869800439,32.893070917031253],[-117.24193926591569,32.893071328178799],[-117.24193984123693,32.893071732954645],[-117.24194041548949,32.893072137739068],[-117.24194098974205,32.893072542523448],[-117.24194156823907,32.893072944568523],[-117.24194214563678,32.893073343917173],[-117.241942727279,32.893073740526553],[-117.24194331105872,32.89307413711871],[-117.2419438959071,32.893074533702347],[-117.2419444796258,32.893074924884523],[-117.24194506761944,32.893075316032387],[-117.24194565561304,32.893075707180238],[-117.24194624568318,32.893076092900927],[-117.24194684008924,32.893076483997362],[-117.24194743437332,32.893076864273731],[-117.241948027609,32.893077246362012],[-117.24194862509924,32.893077626612673],[-117.24194922579572,32.893078006837555],[-117.2419498296578,32.893078383430066],[-117.24195042601833,32.893078758279259],[-117.24195102986005,32.893079133068468],[-117.24195163686728,32.893079504225256],[-117.24195224385424,32.893079873578614],[-117.24195285083098,32.893080242030379],[-117.24195346099361,32.893080608653086],[-117.24195407111557,32.89308097166905],[-117.24195468445394,32.893081335561028],[-117.24195529775163,32.893081695846263],[-117.24195591419455,32.893082050695845],[-117.24195653070858,32.893082411857002],[-117.24195715035771,32.893082766680827],[-117.24195776994581,32.893083116094601],[-117.24195839280111,32.89308347089262],[-117.24195901560563,32.893083821182373],[-117.24195963836948,32.893084167865403],[-117.24196026433951,32.893084514522684],[-117.241960894554,32.893084858440687],[-117.24196152687544,32.893085199636545],[-117.24196215278454,32.893085540883845],[-117.24196278504499,32.893085876669652],[-117.24196341840465,32.893086215151904],[-117.24196405704703,32.89308654818123],[-117.24196468930757,32.893086883967037],[-117.24196532471322,32.893087214317127],[-117.24196596118763,32.893087544658627],[-117.24196660614076,32.89308786861978],[-117.24196724579095,32.893088196230558],[-117.24196789072377,32.893088518388403],[-117.24196853245037,32.893088840571984],[-117.24196917841127,32.893089159114588],[-117.24196983076425,32.893089475802363],[-117.24197047563608,32.893089792550199],[-117.24197112367342,32.893090105665664],[-117.24197177596538,32.893090416943487],[-117.24197242824722,32.89309072731956],[-117.24197307944,32.893091035900937],[-117.241973734867,32.89309134084133],[-117.241974392401,32.89309164305952],[-117.24197504780771,32.893091946196556],[-117.24197570958619,32.893092245675412],[-117.24197636708968,32.893092545188622],[-117.24197702561109,32.893092840184927],[-117.24197769053477,32.893093134228081],[-117.2419783543592,32.893093425574811],[-117.2419790192524,32.893093716912958],[-117.24197968411502,32.893094005546104],[-117.24198035216361,32.893094292350156],[-117.24198102017147,32.893094575547565],[-117.24198169031681,32.893094858727792],[-117.24198236146992,32.893095136489407],[-117.24198303585972,32.893095416930336],[-117.24198370697214,32.893095691085307],[-117.24198438130094,32.893095966116228],[-117.24198505559927,32.893096238442105],[-117.24198573307326,32.893096508037246],[-117.24198641054727,32.893096777632387],[-117.2419870879603,32.893097041817576],[-117.24198776856936,32.893097305075315],[-117.24198844918857,32.893097569234747],[-117.24198913615922,32.893097827932692],[-117.24198981350109,32.893098085806145],[-117.24199050044123,32.893098341799039],[-117.24199118413449,32.893098594211061],[-117.24199187104412,32.893098847498969],[-117.24199255791311,32.893099097180226],[-117.24199324476177,32.89309934505814],[-117.24199393477599,32.89309958930361],[-117.24199462479015,32.89309983354913],[-117.24199531799022,32.893100075965584],[-117.24199601221838,32.893100314766741],[-117.2419967085535,32.893100550845773],[-117.24199739847614,32.893100786976262],[-117.24199809479096,32.893101021251915],[-117.24199879106509,32.893101251920946],[-117.24199948840788,32.893101482581343],[-117.24200018459052,32.893101705135358],[-117.24200088404029,32.893101933073631],[-117.24200158663535,32.893102155576138],[-117.24200228709293,32.893102378095804],[-117.24200299283314,32.893102595162595],[-117.24200369216095,32.89310281228083],[-117.24200439572306,32.893103025758101],[-117.24200510140227,32.893103237414856],[-117.2420058070815,32.893103449071631],[-117.24200651062327,32.893103660745496],[-117.24200721940706,32.893103863359883],[-117.24200792820098,32.893104066875885],[-117.24200863806368,32.893104270383319],[-117.24200934678645,32.893104467587634],[-117.2420100597943,32.893104665659301],[-117.24201076848661,32.893104860158608],[-117.24201148146399,32.893105055525304],[-117.24201219650767,32.893105244563174],[-117.24201290942403,32.893105434519832],[-117.24201362443721,32.893105620852701],[-117.24201434051918,32.893105807176937],[-117.24201505548153,32.893105989001441],[-117.24201577470863,32.893106169889897],[-117.24201649283653,32.893106348082],[-117.24201721200261,32.893106523560547],[-117.24201793331636,32.893106699923536],[-117.24201864924581,32.893106872722782],[-117.24201937152665,32.893107040060528],[-117.24202009276922,32.893107210111879],[-117.24202081501956,32.893107374744567],[-117.24202153617061,32.893107536680915],[-117.24202460697921,32.893108204573394],[-117.24202768590044,32.893108833625554],[-117.2420307772195,32.893109424704626],[-117.24203387875824,32.893109974221183],[-117.24203698950885,32.893110487593781],[-117.24204010514556,32.893110960348444],[-117.2420432352769,32.893111391506196],[-117.242046367139,32.893111786580093],[-117.2420495081621,32.893112141001687],[-117.24205265512987,32.8931124538951],[-117.2420558091416,32.893112727956648],[-117.24205896486376,32.893112964130992],[-117.24206212439302,32.893113158794272],[-117.24206528876773,32.893113309232952],[-117.24206845383497,32.893113426301255],[-117.24207162058205,32.893113502777339],[-117.24207478793008,32.893113537768066],[-117.24207795801654,32.893113531256375],[-117.2420811276759,32.893113486874533],[-117.24208429579873,32.893113401024593],[-117.24208746134686,32.893113276420024],[-117.24209062323106,32.893113111266175],[-117.24209378360928,32.893112907349092],[-117.242096938176,32.893112661998174],[-117.24210008799996,32.893112375204851],[-117.24210323849603,32.893112053237893],[-117.24210637460023,32.893111687200701],[-117.24210950706085,32.893111282417479],[-117.24211262947573,32.893110839841434],[-117.24211574824704,32.893110358519408],[-117.2421188569319,32.893109835797809],[-117.24212195557098,32.893109275283358],[-117.24212503987916,32.893108676108739],[-117.24212811837576,32.893108035500255],[-117.24213118255166,32.893107357133239],[-117.2421342367021,32.893106642776758],[-117.24213727755976,32.893105887046396],[-117.24214030195927,32.893105093574739],[-117.24214331523407,32.893104261417122],[-117.2421463131396,32.893103393312892],[-117.24214929350808,32.893102486574222],[-117.24215225741827,32.893101542094151],[-117.24215520380147,32.893100559881312],[-117.24215813480534,32.893099540820174],[-117.24216104507602,32.893098484052054],[-117.24216393887825,32.893097388640861],[-117.24216680883261,32.893096263663395],[-117.24216966228805,32.893095097337884],[-117.24217249293373,32.893093898732509],[-117.24217530389468,32.893092660608154],[-117.24217809095686,32.893091388409168],[-117.24218085518899,32.893090082127003],[-117.24218359658099,32.893088740859994],[-117.24218631084764,32.893087363740719],[-117.24218900551082,32.8930859543159],[-117.24219166984253,32.893084509064536],[-117.24219431136453,32.893083031533358],[-117.24219692686047,32.89308152084638],[-117.2421995130936,32.893079974324401],[-117.24220207230316,32.893078400966814],[-117.24220460441792,32.893076794462047],[-117.24220710731055,32.893075155728908],[-117.24220957773416,32.893073481186505],[-117.2422120243404,32.89307177978278],[-117.2422144353324,32.893070048005498],[-117.24221681709217,32.893068283098238],[-117.24221916752288,32.893066488684752],[-117.24222148665498,32.89306466747005],[-117.24222377231037,32.893062815864681],[-117.24222602448909,32.893060933868568],[-117.2422282410943,32.893059025105607],[-117.24223042853836,32.893057089524291],[-117.24223257933008,32.893055126283009],[-117.24223469346933,32.893053135381791],[-117.24281226138083,32.893485874433047],[-117.24303689240173,32.893478940488713],[-117.24307338226278,32.894051983344127],[-117.24207103422404,32.894043902434483],[-117.24134697793662,32.894038064831143],[-117.24130066839065,32.893817577443421],[-117.24130012402136,32.893814987480567],[-117.24129958392712,32.893812397483444],[-117.24129904275399,32.893809806593218],[-117.24129850907228,32.893807216544623],[-117.24129797435231,32.893804629209626],[-117.24129744059951,32.893802032849386],[-117.24129691012416,32.893799442775091],[-117.24129638175579,32.893796849978614],[-117.24129585768277,32.893794258951196],[-117.24129533358943,32.893791666120507],[-117.24129481163368,32.8937890732726],[-117.24129429073648,32.893786479514439],[-117.24129377305576,32.893783886632249],[-117.2412932553344,32.893781290143394],[-117.24129274409667,32.893778699914741],[-117.241292232798,32.893776104276128],[-117.24129172472587,32.893773510415102],[-117.24129121556479,32.893770914759337],[-117.24129071070911,32.893768321774218],[-117.24129021008787,32.893765725148235],[-117.24128970840806,32.893763129432465],[-117.24128920992433,32.893760532789251],[-117.24128871465702,32.893757937022002],[-117.24128821937961,32.893755340353103],[-117.24128772731862,32.893752744560139],[-117.24128723522713,32.893750146062168],[-117.24128674743099,32.893747549333263],[-117.24128626175207,32.893744950783883],[-117.24128577929973,32.893742354012041],[-117.2412852968271,32.893739755436926],[-117.24128481861931,32.893737155925834],[-117.24128433935294,32.893734557325018],[-117.24128386435144,32.893731957788212],[-117.2412833914976,32.893729359135918],[-117.24128292291877,32.89372676044934],[-117.24128245002439,32.893724158190402],[-117.24128198465185,32.893721559478102],[-117.24128151820041,32.893718959872729],[-117.2412810560037,32.893716358429671],[-117.24128059593433,32.893713756067818],[-117.24128013697434,32.893711157304075],[-117.24127968118003,32.893708554907931],[-117.24127922539584,32.893705953413487],[-117.24127877173902,32.893703351000191],[-117.24127832236738,32.893700749454275],[-117.24127787619182,32.893698146981023],[-117.24127742999598,32.8936955427044],[-117.24127699023295,32.893692940179662],[-117.24127654402697,32.893690335001345],[-117.24127610427416,32.893687733378314],[-117.24127566448074,32.89368512814859],[-117.24127523110998,32.893682523769073],[-117.2412747977595,32.893679921192877],[-117.24127436759501,32.893677316787674],[-117.24127393424463,32.893674714211492],[-117.24127351046216,32.893672107049824],[-117.24127308670002,32.893669501691505],[-117.24127265970121,32.893666893653865],[-117.24127224343047,32.893664289137178],[-117.24127182608088,32.893661683727409],[-117.24127140871104,32.893659076514311],[-117.24127099563643,32.893656471070251],[-117.24127058467904,32.893653863805731],[-117.24127017371153,32.893651255639483],[-117.24126976707996,32.893648652848981],[-117.24126935929841,32.893646042853682],[-117.24126895581216,32.893643434627485],[-117.24126855447361,32.893640827285758],[-117.24126815416318,32.893638216328824],[-117.24126775281445,32.893635608085468],[-117.2412673621634,32.893633000658021],[-117.24126697150221,32.893630392328951],[-117.24126657974179,32.893627781303408],[-117.24126618909079,32.893625173875925],[-117.24126580481158,32.893622562790412],[-117.24126541950437,32.893619955320119],[-117.24126503843148,32.893617344208849],[-117.24126465735861,32.8936147330976],[-117.24126427950213,32.893612122862287],[-117.24126390163559,32.893609511725295],[-117.24126352697523,32.893606900562609],[-117.2412631555313,32.893604290275825],[-117.24126278728347,32.89360167906171],[-117.24126241903562,32.893599067847525],[-117.24126205400422,32.893596457509368],[-117.24126169213839,32.893593843538795],[-117.2412613303031,32.893591232273216],[-117.24126096844751,32.893588619204273],[-117.24126061302472,32.893586007887272],[-117.24126025757143,32.893583393865242],[-117.24125990643381,32.893580783415629],[-117.24125955418681,32.893578169367885],[-117.24125920193985,32.893575555320133],[-117.24125886039047,32.893572942088333],[-117.24125851455595,32.893570327989146],[-117.24125817192778,32.893567713864286],[-117.24125783357452,32.893565099705071],[-117.24125749416272,32.893562486456112],[-117.24125715898523,32.893559869566218],[-117.24125682597578,32.893557255364151],[-117.24125649404522,32.893554642055228],[-117.24125616421153,32.89355202512246],[-117.24125583868334,32.893549410860402],[-117.24125550991842,32.89354679391905],[-117.24125518974414,32.893544180515782],[-117.24125487059791,32.893541563497294],[-117.24125455145175,32.893538946478799],[-117.24125423551186,32.893536329434575],[-117.24125391854383,32.893533716005621],[-117.24125360581017,32.893531098935675],[-117.24125329625225,32.893528479135],[-117.24125298996154,32.893525864718654],[-117.24125268365059,32.893523248498923],[-117.24125238050517,32.893520628646854],[-117.24125207739027,32.8935180114998],[-117.24125177748159,32.893515394326982],[-117.24125148078936,32.893512778030093],[-117.24125118405651,32.89351015812656],[-117.24125089056031,32.893507540902291],[-117.24125060023992,32.893504920947365],[-117.24125030996021,32.893502304599053],[-117.2412500239148,32.893499684609822]]]}},{"attributes":{"OBJECTID":41,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":34883.821022613789,"SHAPE.STArea()":22141237.195486236,"GlobalID":"{185B3D3B-3BDE-4CEF-8D5D-8D96C33F3626}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"Yes","Region":"Elliott Field Station"},"geometry":{"rings":[[[-117.07524128575692,32.898376201522801],[-117.07523473732299,32.896636447515796],[-117.07833900644265,32.89658269852184],[-117.08159977030391,32.896541561063941],[-117.08410479980741,32.896510937359032],[-117.08416288393539,32.894996123568866],[-117.08417494436532,32.894674525408824],[-117.08630950457992,32.894704017315505],[-117.08638336610827,32.89287851480622],[-117.08808385329378,32.892871887378647],[-117.08829559931664,32.892871055393115],[-117.08831469563999,32.891114618930771],[-117.09143898718402,32.891131880757428],[-117.09123867170396,32.888920702448353],[-117.09550043517602,32.889004306647692],[-117.09532461628631,32.886979866930155],[-117.10485781891414,32.887144371881696],[-117.10489037096319,32.887144933006027],[-117.10522288908831,32.891166953787376],[-117.10523242024465,32.891166914879889],[-117.10761375294462,32.891161725220869],[-117.10974750162224,32.891157038300022],[-117.10975401686024,32.891157022730731],[-117.10975647106416,32.893188427688678],[-117.10976155289841,32.894198601355036],[-117.1097576908938,32.894199554307406],[-117.10945220280307,32.894275889494615],[-117.10943663076625,32.894279919445808],[-117.10942110157268,32.894284068126538],[-117.10940562057485,32.89428833640131],[-117.1093901824201,32.894292723405556],[-117.10937479353854,32.894297230898182],[-117.10935945494606,32.894301853461656],[-117.10934416773779,32.894306593793544],[-117.1093289287074,32.894311451916245],[-117.10931374744722,32.894316425057845],[-117.1092986154336,32.894321515982796],[-117.10928354332765,32.894326721911796],[-117.10926852471677,32.894332042889545],[-117.10925356601344,32.894337478871314],[-117.10923866721765,32.894343029857218],[-117.10922382726064,32.894348695854745],[-117.10920904826219,32.894354475045638],[-117.10919433127343,32.894360365619107],[-117.10917968060461,32.894366371152252],[-117.10916509620284,32.894372486234992],[-117.10915057168192,32.894378713616909],[-117.10913612090928,32.89438505049651],[-117.10912173859398,32.894391502320985],[-117.1091074257519,32.894398063672782],[-117.10909318555393,32.894404730923057],[-117.10907901486438,32.894411511307489],[-117.10906492110279,32.894418398462328],[-117.10905089891658,32.894425391523114],[-117.10903695258948,32.894432491361833],[-117.10902308643185,32.894439701555427],[-117.10900929609814,32.894447014920338],[-117.10899558803605,32.894454435018645],[-117.10898195579783,32.894461958288318],[-117.10896840904626,32.894469589170775],[-117.10895494129836,32.894477320497366],[-117.10894156007954,32.894485156724329],[-117.10892826427681,32.894493093350874],[-117.10891505391676,32.894501133082017],[-117.10890193323914,32.89450927228134],[-117.10888889690875,32.894517511887699],[-117.10887595027846,32.894525852765682],[-117.10886309652803,32.894534292188062],[-117.1088503313823,32.89454283018442],[-117.10883766124513,32.894551465808611],[-117.10882508289258,32.894560197279638],[-117.10881260059973,32.894569024567787],[-117.10880021328894,32.894577946778881],[-117.10878792203782,32.894586964807139],[-117.1087757289575,32.894596075932732],[-117.10876363085916,32.894605281981327],[-117.10875163838659,32.89461457837028],[-117.10873974411113,32.894623970561675],[-117.10872794898721,32.894633446826298],[-117.10871626271287,32.894643015212516],[-117.10870467672919,32.894652674878003],[-117.10869319422484,32.894662423997161],[-117.10868181621584,32.89467225715255],[-117.10867054594368,32.894682177928686],[-117.10865938446828,32.894692185416389],[-117.1086516538639,32.894699225793339],[-117.10849980710688,32.894829460979459],[-117.10807010957102,32.895197996190703],[-117.10805404769641,32.895200264665959],[-117.108038075536,32.895202964448721],[-117.10802221334339,32.895206089987951],[-117.108006480374,32.895209642953496],[-117.10799088831367,32.895213616050327],[-117.10797545313225,32.895218002855493],[-117.10796019085245,32.89522280235613],[-117.10794511857442,32.89522801443357],[-117.10793024899138,32.895233625473608],[-117.10791560239231,32.895239633532164],[-117.10790765728382,32.895243102665212],[-117.10765472539069,32.895364134679063],[-117.10747637453444,32.895449481854541],[-117.10649431652351,32.895887895001934],[-117.10528357955519,32.896428375399786],[-117.10374275488873,32.897116186111198],[-117.10267640468524,32.897408155067744],[-117.10226266736788,32.896600956488065],[-117.10181456114556,32.896436574242003],[-117.10118552351848,32.895553469678369],[-117.10042842715771,32.895149635664545],[-117.09799636396062,32.894957722407156],[-117.09713030513123,32.894135643608067],[-117.0962921912471,32.894229357420492],[-117.09083214464661,32.894839754112418],[-117.08956342848462,32.896734197419455],[-117.08882832879604,32.897829762565429],[-117.08651047811257,32.898483464497609],[-117.08511939515496,32.898875679815696],[-117.08405127750335,32.899125806765063],[-117.08400591961978,32.899139168187205],[-117.08279404567871,32.899493650876281],[-117.08248899881062,32.899136339839224],[-117.08165085773453,32.898154585287394],[-117.07953448856384,32.898292490498399],[-117.07922721818029,32.899158267498919],[-117.07915999599709,32.899347677231354],[-117.07971151763367,32.899772588082236],[-117.08029880301031,32.900225047744982],[-117.07720893471749,32.901130782452107],[-117.07884430205965,32.902840384793038],[-117.07722048535197,32.903398213874574],[-117.07527977917402,32.901784078974757],[-117.07427688796989,32.900457751391372],[-117.0738578364405,32.900003192472028],[-117.07372321957703,32.899857166389076],[-117.07367755406632,32.899807632720552],[-117.07358923488589,32.899711825776777],[-117.07348693708431,32.899600858154798],[-117.07345897618067,32.89957052792478],[-117.07328776961587,32.899384809100205],[-117.07311658645555,32.899199115134969],[-117.07309560705272,32.899176357089381],[-117.07289912384449,32.898963216574927],[-117.07271912864016,32.898767961027666],[-117.07255357279402,32.898588371456462],[-117.07240385878603,32.898425964322115],[-117.07240077906775,32.898422620440819],[-117.07524128575692,32.898376201522801]]]}},{"attributes":{"OBJECTID":42,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":7082.7351488126687,"SHAPE.STArea()":637194.96530804806,"GlobalID":"{C80AC6F4-5FA4-4D95-B372-15C275CE4AFD}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"zayu","last_edited_date":1779858104000,"Clery":"No","Region":"Governor Park"},"geometry":{"rings":[[[-117.18437760163967,32.856338971103426],[-117.18436588485575,32.856329426393216],[-117.18435440312982,32.856319681520333],[-117.18434317035921,32.856309737281322],[-117.18433218015328,32.856299595528135],[-117.18432144756392,32.856289265164449],[-117.18431097045453,32.856278746206499],[-117.18430075211603,32.856268046745129],[-117.1842908053968,32.856257169388456],[-117.18428113139365,32.856246116833482],[-117.18427172487046,32.856234899039123],[-117.18426259973411,32.856223517703661],[-117.18425375924691,32.856211978212961],[-117.18424520454401,32.856200286870795],[-117.18423504587018,32.856185645428475],[-117.18409795486765,32.855961817773341],[-117.18409737830821,32.854717488925736],[-117.1847145006892,32.855155374417777],[-117.18471502745807,32.855154072821747],[-117.18471556710369,32.855152776538652],[-117.18471612067535,32.85515148375724],[-117.18471668285059,32.855150196321119],[-117.18471726213754,32.855148910559073],[-117.18471785107731,32.855147628330911],[-117.184718449689,32.855146351440041],[-117.18471906438243,32.855145079837982],[-117.18471968229981,32.855143810015015],[-117.18472032375765,32.855142543620822],[-117.18472097171131,32.855141285293222],[-117.18472163246521,32.855140025065282],[-117.18472230617255,32.855138777363699],[-117.1847229894944,32.855137529589406],[-117.18472368570264,32.855136288029804],[-117.18472438940795,32.855135048216901],[-117.18472510923321,32.855133817299546],[-117.18472584189706,32.855132588088459],[-117.18472658103757,32.855131365140593],[-117.1847273362597,32.855130147481546],[-117.18472809901729,32.855128935175848],[-117.18472887678823,32.855127728167098],[-117.18472966527071,32.855126523782495],[-117.1847304634251,32.855125324735141],[-117.18473127128021,32.855124133730094],[-117.18473209199301,32.855122946234729],[-117.18473292667005,32.855121765847628],[-117.18473377102865,32.855120591699489],[-117.18473462395255,32.855119419290013],[-117.18473549085992,32.855118255792171],[-117.18473636423441,32.85511709765585],[-117.1847372547588,32.855115944800204],[-117.18473815071079,32.855114800019209],[-117.1847390605791,32.855113657838146],[-117.18473997588463,32.855112524633292],[-117.18474090835919,32.855111398512548],[-117.18474185369142,32.855110275901438],[-117.18474279910025,32.855109160503709],[-117.18474376166854,32.855108051288376],[-117.18474473286928,32.855106950123336],[-117.18474571801515,32.855105854263279],[-117.18474670962809,32.855104763764778],[-117.18474771414658,32.855103681284284],[-117.18474872514174,32.855102605066982],[-117.18474974903293,32.855101535966],[-117.18475078370261,32.855100475800931],[-117.18475182376157,32.855099420103777],[-117.18475287777521,32.855098370613256],[-117.18475394148956,32.855097329164991],[-117.18475501490457,32.855096295759033],[-117.18475609481543,32.855095270419589],[-117.18475718440789,32.855094251319059],[-117.18475828686748,32.855093236629948],[-117.18475940013447,32.855092233581658],[-117.18476051880025,32.855091235902961],[-117.18476164502057,32.855090245381128],[-117.18476278736085,32.85508926375465],[-117.18476393620659,32.85508829109645],[-117.18476509257809,32.855087322889993],[-117.18476626081566,32.855086365414671],[-117.18476743552985,32.855085414202478],[-117.18476861779867,32.855084470147105],[-117.18476981298257,32.855083535011417],[-117.1847710146623,32.8550826079423],[-117.18477222283794,32.855081688939684],[-117.18477344392862,32.855080778856795],[-117.18477467471047,32.855079875914477],[-117.18477590558805,32.855078981988896],[-117.18477715040117,32.855078092466535],[-117.1847784039137,32.855077217306309],[-117.1847796649617,32.855076347499462],[-117.18478092930063,32.855075485783374],[-117.18478220977875,32.85507463476614],[-117.18478349673356,32.855073790012021],[-117.18478478699848,32.855072955152067],[-117.18478609017855,32.855072129211798],[-117.18478739771794,32.855071311354237],[-117.1847887138897,32.85507050154704],[-117.18479003765432,32.855069702503314],[-117.18479136789573,32.855068909722718],[-117.18479271106176,32.855068126763541],[-117.18479405435228,32.855067355526053],[-117.18479540734353,32.855066592330857],[-117.18479676680191,32.855065834497154],[-117.18479813278488,32.855065087435079],[-117.18479950852597,32.855064353825185],[-117.18480088863598,32.855063629199734],[-117.18480227410647,32.855062906337153],[-117.18480367041303,32.855062197820494],[-117.18480507321546,32.855061497370357],[-117.18480647933764,32.855060807716008],[-117.18480789516049,32.855060126103922],[-117.18480931431269,32.855059456189338],[-117.18481074316556,32.855058794316939],[-117.18481217532864,32.855058142338763],[-117.18481361506545,32.855057499320637],[-117.18481506022982,32.855056864377126],[-117.18481651195707,32.855056243811894],[-117.18481796803411,32.855055630427607],[-117.18481943061656,32.855055026011563],[-117.18482089862658,32.855054429670112],[-117.18482237105337,32.85505384682137],[-117.18482385320962,32.855053274719964],[-117.18482533542328,32.855052708028516],[-117.18482682740475,32.855052155691084],[-117.1848283194628,32.855051610566974],[-117.18482982125988,32.855051077091858],[-117.18483132741623,32.855050551699385],[-117.18483283583365,32.855050038012514],[-117.1848343507661,32.85504953419553],[-117.18483587009617,32.855049042067861],[-117.18483739484421,32.855048557113122],[-117.18483892398994,32.855048083847741],[-117.18484045645539,32.855047621378205],[-117.18484199115316,32.855047167909163],[-117.18484353343426,32.855046724301985],[-117.18484507904471,32.855046292392174],[-117.18484662800364,32.855045873983194],[-117.18484818340099,32.855045458230684],[-117.18484973897075,32.855045058708313],[-117.18485130424115,32.85504466722815],[-117.18485286646005,32.85504429019899],[-117.18485443194115,32.85504391855558],[-117.18485600507267,32.855043563085651],[-117.18485758039819,32.855043213009587],[-117.18485915904347,32.855042873729282],[-117.18486073887198,32.855042545260972],[-117.18486232096156,32.855042228498164],[-117.18486390957572,32.855041922506913],[-117.18486550257794,32.855041627303329],[-117.18486709462681,32.855041342927947],[-117.18486868786849,32.855041070266125],[-117.1848702875965,32.855040804769217],[-117.18487188640941,32.855040553707056],[-117.18487348958168,32.855040310727595],[-117.1848750960737,32.855040078543944],[-117.18487670162197,32.855039858090073],[-117.1848783115487,32.855039647522219],[-117.18487992162868,32.855039451381145],[-117.1848815349997,32.855039263330816],[-117.18488314738869,32.855039083403561],[-117.18488476098962,32.855038916993337],[-117.1848863843296,32.85503876223202],[-117.1848880013652,32.855038617437614],[-117.18488962173021,32.855038484340632],[-117.18489124538623,32.855038359334486],[-117.18489286278583,32.855038248803503],[-117.18489448990535,32.855038148118211],[-117.1848961139158,32.855038056473752],[-117.18489774123643,32.855037974723494],[-117.1848993655055,32.85503790742419],[-117.18490099307519,32.855037849117359],[-117.18490262080775,32.85503780613886],[-117.1849042485786,32.855037766767076],[-117.18490587645478,32.85503773731368],[-117.18490750451299,32.855037724992002],[-117.18490913269575,32.855037724392048],[-117.18491076095512,32.855037731005417],[-117.18491238932945,32.855037748438846],[-117.18491401462347,32.855037777618271],[-117.18491564326602,32.855037820298442],[-117.18491727199476,32.855037871093678],[-117.18491889763364,32.855037932733175],[-117.18492052339704,32.855038006094432],[-117.18492214927539,32.855038090275727],[-117.1849237709956,32.85503818530939],[-117.18492539389902,32.855038291154983],[-117.18492701688866,32.855038405115621],[-117.18492863681713,32.855038532625571],[-117.18493025687016,32.85503867185728],[-117.18493187703815,32.855038821908977],[-117.18493349408752,32.855038980099941],[-117.18493511128057,32.855039151816015],[-117.18493672428674,32.855039331679414],[-117.18493833530964,32.85503952598571],[-117.18493994641872,32.855039728407064],[-117.18494248957047,32.855040071660206],[-117.18494410073707,32.855040279491519],[-117.18494571469661,32.855040448526665],[-117.18494733362388,32.855040582356168],[-117.18494895963643,32.85504067916051],[-117.18495058525623,32.855040738996252],[-117.18495221368808,32.855040761839206],[-117.18495384171761,32.855040746811895],[-117.18495546934483,32.855040693914333],[-117.18495709337441,32.855040604072528],[-117.18495871382555,32.855040479089674],[-117.1849603306695,32.855040316260897],[-117.18496194394461,32.855040119192772],[-117.18496354714532,32.855039878917196],[-117.18496514252325,32.855039606237966],[-117.18496672897172,32.855039297556552],[-117.18496830435421,32.855038952889089],[-117.18496986650534,32.855038569546714],[-117.18497141869717,32.85503815381697],[-117.18497295769596,32.855037703018958],[-117.18497447920953,32.855037215381813],[-117.18497598432525,32.855036692700693],[-117.18497747307188,32.855036137680671],[-117.18497894543985,32.855035549420016],[-117.18498039819561,32.855034925238087],[-117.18498182713306,32.855034271478814],[-117.18498323966304,32.855033581773931],[-117.1849846251412,32.855032859810954],[-117.18498598898546,32.85503211276292],[-117.18498732467128,32.855031329858207],[-117.18498863867532,32.855030517360085],[-117.18498992565624,32.855029675308842],[-117.18499118670141,32.855028805499821],[-117.18499241750901,32.855027905260378],[-117.18499361918566,32.855026978189059],[-117.18499479066308,32.85502602429397],[-117.18499592979505,32.855025042689682],[-117.1849970398153,32.855024036056825],[-117.18499848965418,32.855022634593091],[-117.18524456399795,32.854775523465705],[-117.18541317367534,32.85489449531287],[-117.18632857603461,32.855540383423786],[-117.18633868715159,32.855548420680059],[-117.18634818481648,32.85555955106031],[-117.18635478825803,32.855572086654092],[-117.18635821297303,32.85558549578576],[-117.18635832045797,32.855599212308128],[-117.18635510242511,32.855612658265727],[-117.18634869491085,32.8556252645282],[-117.18633936790053,32.855636499724575],[-117.1859608227399,32.856032349601634],[-117.18559540823195,32.856414471680893],[-117.18547399516378,32.856327438635276],[-117.18542871969342,32.856357025060319],[-117.18539314610052,32.856380272684795],[-117.18538018530208,32.856388591127136],[-117.18536702762732,32.856396681114013],[-117.18535366875531,32.856404538169329],[-117.18534011826242,32.856412158613608],[-117.18532638571541,32.856419537865555],[-117.1853124721539,32.856426673212049],[-117.18529838290989,32.856433563710858],[-117.18528413185213,32.856440207453474],[-117.18526971564165,32.856446591840722],[-117.18525514613525,32.856452726701939],[-117.18524042750076,32.856458602086356],[-117.18522556934339,32.856464217019372],[-117.18521057163446,32.856469568796072],[-117.18519544827157,32.85647465821274],[-117.18518020022731,32.856479476244665],[-117.18516483932011,32.856484029114512],[-117.18514936758135,32.856488306887663],[-117.18513379574196,32.856492313991573],[-117.18511812590037,32.856496046803358],[-117.18510236551566,32.856499503463006],[-117.1850865273596,32.856502679365079],[-117.18507061142282,32.856505573607947],[-117.18505462738707,32.856508192430368],[-117.18503858159532,32.856510529472246],[-117.18502248469233,32.856512581045862],[-117.18500633776578,32.85651434894654],[-117.18499015365448,32.856515834880653],[-117.18497393226285,32.856517029831309],[-117.18495768975907,32.85651794720237],[-117.18494142386319,32.856518573484905],[-117.18492514853979,32.856518915787127],[-117.18490886695557,32.856518970478227],[-117.18489258871583,32.856518736583602],[-117.18487631708304,32.856518219489146],[-117.18486006591665,32.856517416384698],[-117.18484383411001,32.856516323671634],[-117.18482763455958,32.856514948466383],[-117.18481147152912,32.856513289834915],[-117.18479535780962,32.856511344975253],[-117.18477928915678,32.856509116624707],[-117.18476328376047,32.85650660735093],[-117.18474734268925,32.85650381714585],[-117.18473147128469,32.856500745969079],[-117.18471568023946,32.856497394641465],[-117.18469998137209,32.856493769385892],[-117.1846843650297,32.856489866668369],[-117.18466885583111,32.856485690811382],[-117.18465345057156,32.856481241839333],[-117.18463815786465,32.856476525999128],[-117.18462298835512,32.856471539603412],[-117.18460794316887,32.8564662880542],[-117.18459302872537,32.856460772204606],[-117.18457825783466,32.856454991056118],[-117.18456363065009,32.856448959035447],[-117.18454915455413,32.856442667069508],[-117.18453483818895,32.856436124110211],[-117.18452068792614,32.856429326502564],[-117.1845067113683,32.856422285911783],[-117.18449290525315,32.856414996952147],[-117.1844792846519,32.856407470330495],[-117.18446585166286,32.856399702424241],[-117.18445261704561,32.856391700365883],[-117.18443957870191,32.856383467778365],[-117.18442674949935,32.856375009073147],[-117.18441412945693,32.856366326053674],[-117.18440172928649,32.856357421344114],[-117.18438955118209,32.85634830033851],[-117.18437760163967,32.856338971103426]],[[-117.18623726701965,32.85028864817442],[-117.18626827624055,32.850261683624062],[-117.18627626355702,32.850288355298915],[-117.18631244273671,32.850409140267629],[-117.18636257743449,32.850576521689234],[-117.18640942251662,32.850732915023492],[-117.18645781638493,32.850894487942611],[-117.18650214523488,32.851042484337754],[-117.18655276882069,32.85120976008249],[-117.18537718042857,32.85150815570541],[-117.1852237395094,32.851547074473984],[-117.185200963775,32.851472866520531],[-117.1851991000413,32.851459239942635],[-117.18520063219228,32.851445584047426],[-117.1852054810626,32.851432491880331],[-117.18521343708581,32.851420550259668],[-117.18522198011463,32.851408856682689],[-117.18522943756888,32.851396645607132],[-117.1852357631652,32.851383985014621],[-117.1852409267875,32.851370956290296],[-117.18524488754166,32.851357631883509],[-117.18524762594619,32.851344088590132],[-117.18524913432775,32.851330408527133],[-117.18524939537969,32.851316672080827],[-117.1852484067412,32.851302958622568],[-117.18524617781142,32.851289348336508],[-117.18524272014534,32.851275923193803],[-117.18523805379566,32.851262760592562],[-117.18523220630247,32.851249938775844],[-117.18522521372267,32.851237533217109],[-117.18521711207499,32.851225615782994],[-117.18520796193779,32.851214257252408],[-117.18519780247657,32.851203524057702],[-117.18519153454353,32.851198085298932],[-117.18537221480442,32.851040956216281],[-117.18623726701965,32.85028864817442]],[[-117.18334249234897,32.853294037553923],[-117.18332621372366,32.85329401266506],[-117.18330993465713,32.85329424838141],[-117.18329366470618,32.853294739220438],[-117.18327740708509,32.853295486059487],[-117.18326116822229,32.853296490653584],[-117.18324495554765,32.853297748437832],[-117.18322877442148,32.853299261175209],[-117.18321262912627,32.853301029735171],[-117.1832047431586,32.853301988350552],[-117.18310392205562,32.853313741343072],[-117.18308771879163,32.853315081094244],[-117.18307147705997,32.853316017152487],[-117.18305520754342,32.853316549436983],[-117.18303892734399,32.853316678720368],[-117.18302265246655,32.853316403078274],[-117.18300638933054,32.853315723363878],[-117.18299016139959,32.853314635792991],[-117.18297397518862,32.853313150235735],[-117.1829578488201,32.853311262948154],[-117.18294179727843,32.853308976522385],[-117.18292582913863,32.853306293598941],[-117.1829099646978,32.853303214024564],[-117.18289421254048,32.853299741341438],[-117.18287858659244,32.853295879051316],[-117.18286310396515,32.853291628828657],[-117.18284777654338,32.853287003208123],[-117.18283261707002,32.853281994879602],[-117.18281763630425,32.853276610975804],[-117.18280285032745,32.853270856785947],[-117.18278827202582,32.853264738524842],[-117.18277391430449,32.853258264211],[-117.18275978784628,32.85325143376366],[-117.18274590451675,32.853244257914291],[-117.18273227927168,32.853236736550095],[-117.1827189197323,32.853228883139757],[-117.182705839786,32.853220697578472],[-117.18269305029703,32.853212196917397],[-117.18268056300676,32.853203380166363],[-117.18266838869324,32.853194256261418],[-117.18265653705694,32.853184833245095],[-117.18264502103159,32.853175121840891],[-117.18263384708409,32.853165127410428],[-117.18262302494337,32.853154860701288],[-117.18261256752406,32.853144330633519],[-117.18260247917561,32.853133544388371],[-117.18259277281255,32.853122510885797],[-117.18258345071472,32.853111243634878],[-117.18257453433317,32.853099750589458],[-117.18256601518863,32.853088038125854],[-117.1825579105259,32.85307612054185],[-117.18255022473262,32.85306400862531],[-117.18254434015721,32.853054114025468],[-117.1823801595434,32.852797476174132],[-117.18285787454251,32.852592488293439],[-117.18286367857007,32.852030184373703],[-117.18363471434762,32.85203585901553],[-117.18363172446081,32.853339989647708],[-117.18361415718778,32.853333298021688],[-117.18359869526179,32.853328989121081],[-117.18358314297184,32.85332492347068],[-117.18356750464828,32.853321106448256],[-117.18355178454479,32.853317536218078],[-117.18353598158355,32.853314211886612],[-117.18352011400124,32.85331114052984],[-117.18350418284696,32.853308320336311],[-117.18348819019006,32.853305744978265],[-117.18347214789607,32.853303425186958],[-117.18345604630274,32.853301356526572],[-117.18343991115327,32.853299548721672],[-117.18342373379632,32.853297991918623],[-117.18340752600166,32.853296687831808],[-117.18339129210921,32.853295642740683],[-117.18337503739309,32.85329485029316],[-117.18335877045671,32.853294315834752],[-117.18334249234897,32.853294037553923]],[[-117.18280015989497,32.853841005797314],[-117.18244555654591,32.853258248147512],[-117.18245631403082,32.853268564054375],[-117.1824673173861,32.853278692345008],[-117.18247856229098,32.85328862854319],[-117.18249004340423,32.853298372689245],[-117.18250175315245,32.853307915822796],[-117.18251369898481,32.853317255182354],[-117.1825258637996,32.853326389995196],[-117.18253824430599,32.853335312170373],[-117.18255083731835,32.853344023535371],[-117.18256363631245,32.853352513318455],[-117.18257663918031,32.853360784240685],[-117.18258983728984,32.853368828251476],[-117.18260322850459,32.853376645366986],[-117.18261680316226,32.853384231151296],[-117.18263056121506,32.853391581095927],[-117.18264448555165,32.853398693526621],[-117.18265858685456,32.85340556836266],[-117.18267284797419,32.853412200322921],[-117.18268726667844,32.85341858040686],[-117.18270183131189,32.853424717719797],[-117.18271654389623,32.853430601425487],[-117.18273139694406,32.85343623067871],[-117.18274638191878,32.853441606445607],[-117.18276149341203,32.85344672245472],[-117.1827767218189,32.853451579680311],[-117.18279206597545,32.853456169113791],[-117.18280751745969,32.853460502541139],[-117.18282307077735,32.853464565576083],[-117.18283871847912,32.853468360980017],[-117.18285445413619,32.85347188699798],[-117.18287026919278,32.853475142792796],[-117.18288616255178,32.853478125667458],[-117.18290212354003,32.853480836604369],[-117.18291814463176,32.853483271151518],[-117.18293422477767,32.853485431120333],[-117.18295035331415,32.853487318394848],[-117.18296651947244,32.853488924940635],[-117.18298272329055,32.853490254364424],[-117.18299895727145,32.853491304919274],[-117.18301521181968,32.853492078481125],[-117.18303148262385,32.853492571475606],[-117.18304776330289,32.853492786656162],[-117.18306404100895,32.853492721414526],[-117.1830803189178,32.853492373021545],[-117.18309658005194,32.853491752426351],[-117.1831128264617,32.853490851497803],[-117.18312904637686,32.853489668521242],[-117.18323265679678,32.853477682526851],[-117.1832487780363,32.853475758144462],[-117.18326494777564,32.853474176056487],[-117.1832811649946,32.853472940779092],[-117.18329741041676,32.853472047949396],[-117.18331367661236,32.853471502132095],[-117.18332995612282,32.853471305187121],[-117.18334623606236,32.853471450899583],[-117.1833625100694,32.85347194382625],[-117.18337875463277,32.853472783243085],[-117.18339497402573,32.853473969117765],[-117.18341115540066,32.853475498842158],[-117.18342728379253,32.853477371627619],[-117.18344335174285,32.853479589334093],[-117.18345934746264,32.853482148443582],[-117.18347526234859,32.853485043610739],[-117.18349108680576,32.853488276711623],[-117.18350680693726,32.853491846949488],[-117.18352241735415,32.853495749856449],[-117.18353790949142,32.853499983693709],[-117.18355326302347,32.853504545909701],[-117.18356848007753,32.85350943558673],[-117.18358354345627,32.853514642935529],[-117.18359844787595,32.853520173406629],[-117.18361318255836,32.853526018064102],[-117.18362773890028,32.853532171562591],[-117.18363138005394,32.853533804153606],[-117.18362201189943,32.855187069815315],[-117.18280015989497,32.853841005797314]]]}},{"attributes":{"OBJECTID":44,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":2871.1406315256377,"SHAPE.STArea()":409582.61361639638,"GlobalID":"{B1C3664F-1D65-4408-A8A9-A0DCCA10276C}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"No","Region":"Mount Soledad"},"geometry":{"rings":[[[-117.24898972644348,32.842428255573651],[-117.24781591719858,32.839390964896843],[-117.24782538684273,32.839393716277357],[-117.24784072160406,32.839398328373633],[-117.24785599282895,32.839403083457775],[-117.24787120480008,32.839407982396985],[-117.24788634572764,32.839413021679547],[-117.24790142416659,32.839418202138077],[-117.24791643476642,32.839423522914124],[-117.24793137322416,32.839428981337193],[-117.24794623741388,32.839434578326291],[-117.24796103162846,32.839440315650151],[-117.24797574937763,32.839446186147356],[-117.24799038436539,32.83945219978802],[-117.24800494501382,32.839458345683092],[-117.24801942388724,32.839464627499751],[-117.24803381880865,32.83947104164853],[-117.24804813409135,32.83947759170163],[-117.24806235366297,32.839484273280263],[-117.24807648929293,32.839491088092799],[-117.24809053561023,32.839498033477454],[-117.24810449155699,32.839505110344547],[-117.24811835282,32.839512315121972],[-117.24813211941984,32.839519649613088],[-117.24814578812145,32.839527111138786],[-117.24815140365412,32.839529097397417],[-117.24816644350922,32.839534357489683],[-117.24818151457031,32.839539543384433],[-117.24819662433421,32.839544656824593],[-117.24821176954556,32.839549693327726],[-117.24822694605473,32.839554663748316],[-117.24824215694328,32.839559557240484],[-117.24825740326895,32.839564372893854],[-117.24827267875617,32.839569122481954],[-117.24828798752378,32.839573792445165],[-117.24830332965372,32.83957838999693],[-117.24831869978493,32.839582913376937],[-117.24833410112173,32.839587362559364],[-117.24834953470133,32.83959173483052],[-117.2483649963027,32.839596034733269],[-117.24838048694264,32.839600257750668],[-117.24839600558366,32.839604406596258],[-117.24841155007947,32.839608480385706],[-117.2484271257499,32.839612477272482],[-117.24844272621709,32.839616400013377],[-117.24845835253888,32.839620247698079],[-117.24847400683099,32.839624018505965],[-117.24848968591976,32.839627715167914],[-117.24850539084251,32.839631334970271],[-117.24852111838482,32.839634877037376],[-117.24853686964526,32.839638344065463],[-117.24855264354571,32.839641735161564],[-117.2485684432698,32.839645048496401],[-117.24858426455532,32.839648285006163],[-117.2486001042185,32.83965144652008],[-117.24861596864741,32.839654531183037],[-117.24863185250146,32.839657539038143],[-117.24864775467174,32.839660466487437],[-117.24866367844416,32.839663320718294],[-117.24867962159055,32.839666093632957],[-117.24869558209743,32.839668796068693],[-117.24871156305642,32.839671418081316],[-117.24872756126334,32.839673959696661],[-117.24874357573177,32.839676428136706],[-117.2487596053426,32.839678818901774],[-117.24876965516533,32.839681013647862],[-117.24878540333175,32.839684488785196],[-117.24880114026203,32.839688009098843],[-117.24881686374836,32.839691568294498],[-117.24883257481802,32.839695162756811],[-117.24884827673667,32.839698797869858],[-117.24886396311612,32.839702475488856],[-117.2488796296024,32.839706188434924],[-117.24889529015215,32.839709942907596],[-117.2489109351424,32.839713738082843],[-117.24892657093054,32.839717569400541],[-117.24894218799592,32.839721445053449],[-117.24895779155608,32.839725354178327],[-117.24897338276122,32.839729303979944],[-117.24898896159064,32.839733292654913],[-117.24900452486074,32.839737322032583],[-117.24902007252034,32.839741387604505],[-117.24903560676697,32.839745494763477],[-117.24905112863809,32.839749640795887],[-117.24906663171495,32.839753824851798],[-117.24908212562055,32.839758047755268],[-117.24909760290907,32.839762312271723],[-117.24911305603226,32.839766612149909],[-117.24912850535534,32.839770953537439],[-117.24914393479571,32.839775331153866],[-117.249159349745,32.839779749464377],[-117.24917474801582,32.83978420397785],[-117.24919013073777,32.839788700095717],[-117.24920549786982,32.839793234211342],[-117.24922084939161,32.839797804521289],[-117.24923618429646,32.839802416444279],[-117.24925150358078,32.839807063660039],[-117.24926680411204,32.839811752506087],[-117.24928209223728,32.839816477520628],[-117.24929736053119,32.839821243272446],[-117.2493126132149,32.83982604521875],[-117.24932784711486,32.839830886090347],[-117.24933350310346,32.839832668172797],[-117.2493486922245,32.839837610400174],[-117.24936378957698,32.839842749047918],[-117.24937879406215,32.839848081419717],[-117.24939369717636,32.839853611191394],[-117.24940849774923,32.839859329355036],[-117.24942319053257,32.839865244068825],[-117.24943777754989,32.839871345397228],[-117.24945224920906,32.839877635221349],[-117.24946660656792,32.839884112630983],[-117.24948084216018,32.839890778588291],[-117.24949495587323,32.839897623174977],[-117.24950894141131,32.839904656361313],[-117.24952279864128,32.839911866425638],[-117.24953652438974,32.839919256098995],[-117.24955011221734,32.839926822728188],[-117.24956355891993,32.839934566339309],[-117.24957686446692,32.839942484227265],[-117.24959002453461,32.839950571918479],[-117.24960303486105,32.839958830349218],[-117.24961589328959,32.839967257733413],[-117.24962859762262,32.839975848678485],[-117.24964114467635,32.839984605013704],[-117.24965353013754,32.839993523166982],[-117.24966575078139,32.840002601361086],[-117.24967780442053,32.840011835104917],[-117.24968968788149,32.840021227129519],[-117.24970140322868,32.840030771105951],[-117.2497129386927,32.840040465326062],[-117.2497242964097,32.840050309772579],[-117.24978383271524,32.840132283842188],[-117.2497905701477,32.840141906881378],[-117.24979880274964,32.840153760468418],[-117.2498069758888,32.840165645195754],[-117.24981509486472,32.840177557413519],[-117.24982314262878,32.840189500866707],[-117.24983114153929,32.840201469062158],[-117.24983907885084,32.840213468415236],[-117.24984695452238,32.840225495319324],[-117.24985477172744,32.840237547043522],[-117.24986253053771,32.840249629899439],[-117.24987022555128,32.840261738520361],[-117.24987786106104,32.84027387467502],[-117.24988543918255,32.840286036542786],[-117.24989295886824,32.840298225935761],[-117.24990041367884,32.840310440200696],[-117.24990781009447,32.840322685597471],[-117.2499151448086,32.840334953135354],[-117.249922417862,32.840347246421011],[-117.24992962924451,32.840359564552799],[-117.2499367832694,32.840371911102793],[-117.24994387132021,32.840384279828505],[-117.24995090200321,32.840396676070782],[-117.24995786672231,32.840409095390491],[-117.24996477401201,32.840421536816784],[-117.24997161967165,32.840434006695943],[-117.24997840045596,32.840446501447204],[-117.24998511631367,32.84045901656232],[-117.24999178011319,32.84047155644582],[-117.24999837583294,32.840484121227441],[-117.25000490662605,32.84049670637291],[-117.25001138002035,32.840509316329971],[-117.25001778424634,32.840521949390556],[-117.25002413317898,32.840534604540494],[-117.25003041506913,32.840547281874976],[-117.25003663419945,32.840559982261034],[-117.25004279266508,32.840572702074738],[-117.25004441189087,32.840575978547093],[-117.25005076183783,32.840588628277025],[-117.25005724055525,32.840601235483454],[-117.2500638469136,32.840613794765083],[-117.25007058199124,32.840626307014851],[-117.2500774436111,32.840638768643345],[-117.25008442855864,32.84065117877492],[-117.250091543263,32.840663539160886],[-117.25009878023725,32.84067584896016],[-117.25010614158688,32.840688105450425],[-117.25011362835964,32.840700306819684],[-117.25012124166456,32.840712456665884],[-117.25012897501111,32.840724547827556],[-117.25013683163435,32.840736582983816],[-117.25014481154467,32.840748563036193],[-117.25015291038764,32.840760480806011],[-117.25016112930309,32.84077234259626],[-117.25016946823993,32.840784143898581],[-117.25017792720837,32.840795885614519],[-117.25018650936148,32.8408075632099],[-117.25019520404909,32.840819179476121],[-117.25020401871716,32.840830731647593],[-117.25021295019222,32.840842222455322],[-117.25022200054889,32.840853646471906],[-117.25023116231056,32.840865003757955],[-117.25024044294371,32.840876293351108],[-117.25024983609099,32.840887519811687],[-117.25025934270784,32.840898673212557],[-117.25026895966164,32.84090975989146],[-117.25027869329953,32.840920774386326],[-117.25028853619618,32.840931721266138],[-117.25029848933757,32.840942593308782],[-117.25030855596913,32.840953394094981],[-117.25031872858334,32.840964120980345],[-117.25032901148342,32.840974776635086],[-117.25033940031497,32.840985353880605],[-117.2503498962178,32.840995859019785],[-117.25036049913051,32.841006286642589],[-117.25036393590622,32.841009608806857],[-117.2501440433021,32.841236527705526],[-117.24995669860192,32.841429947803441],[-117.24976803116677,32.841624730941874],[-117.2495822622144,32.841816520865294],[-117.24931161790293,32.842095934039385],[-117.24898972644348,32.842428255573651]]]}},{"attributes":{"OBJECTID":45,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":2002.1281650495357,"SHAPE.STArea()":245487.3619612176,"GlobalID":"{CF561A65-2F85-48C7-B012-99A71831CC64}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"Yes","Region":"Nimitz Marine Facility"},"geometry":{"rings":[[[-117.23692537729428,32.706813467638682],[-117.23692480773315,32.706788793169729],[-117.23693225221542,32.706788775072404],[-117.23898027355042,32.706783361931095],[-117.23898218523617,32.706953755278228],[-117.23898220018768,32.706955087941502],[-117.23898221517966,32.70695642421142],[-117.23898600863993,32.707294542876795],[-117.23884595390382,32.707858081528713],[-117.23846002558621,32.70786104289003],[-117.23796013100612,32.707864922415148],[-117.23787668850711,32.707865570121427],[-117.23770980033636,32.707866868095252],[-117.23762637131425,32.707867481257772],[-117.23755492653348,32.707868005609669],[-117.23737608209778,32.707869319522167],[-117.23710204514785,32.70787133293544],[-117.23703103912281,32.707871892246978],[-117.23701958429845,32.70785887071365],[-117.23700415888231,32.707854544948489],[-117.23698897445253,32.707849641937848],[-117.23697876582405,32.707845897525424],[-117.23697406526827,32.707844173130233],[-117.23695946019575,32.707838144607031],[-117.23694518926854,32.707831571457618],[-117.23693127394785,32.707824465233138],[-117.23691775494224,32.707816841839403],[-117.23691566861569,32.707810165765189],[-117.23691188087587,32.707796802420596],[-117.23690857954401,32.707783347713857],[-117.23690576899691,32.707769811529104],[-117.23690345152885,32.707756208276045],[-117.23690163158729,32.707742554150592],[-117.23690030720059,32.707728863596472],[-117.23689948369078,32.707715135669382],[-117.23689915817116,32.707701398346536],[-117.23689932963552,32.707687657046584],[-117.2369000078335,32.707673925217563],[-117.23690117375988,32.70766022014493],[-117.23690284459934,32.70764655251201],[-117.23690295137031,32.707640656031899],[-117.23690320708656,32.70762691405767],[-117.2369034628633,32.707613177493506],[-117.2369037249783,32.70759943546809],[-117.23690399029272,32.707585693417087],[-117.23690400355014,32.707585067498172],[-117.23690426310274,32.707571954011314],[-117.2369045348462,32.707558214614117],[-117.2369048097587,32.707544472486347],[-117.23690509536634,32.707530732978128],[-117.23690537990734,32.707516993478528],[-117.23690566551477,32.70750325397038],[-117.23690596285347,32.707489514368362],[-117.23690626125854,32.707475774757832],[-117.23690656606246,32.7074620350961],[-117.23690687087637,32.707448296336011],[-117.23690718101255,32.70743455663159],[-117.23690749541454,32.707420816893055],[-117.2369078130159,32.707407077128956],[-117.23690813701606,32.707393337313569],[-117.23690846421559,32.707379597472624],[-117.23690879568099,32.707365857597509],[-117.2369091293095,32.707352120410377],[-117.2369094693065,32.707338380467],[-117.23690981250287,32.707324640498072],[-117.23691015999539,32.707310903199989],[-117.23691050639103,32.707297163205432],[-117.2369108666811,32.70728342580491],[-117.23691122587429,32.707269685707963],[-117.23691158937376,32.707255949183491],[-117.23691195603213,32.70724220902683],[-117.23691232805311,32.707228471532467],[-117.23691270430957,32.707214731298997],[-117.23691308379573,32.70720099374487],[-117.23691346648116,32.70718725616522],[-117.23691385556536,32.707173518534276],[-117.23691424784892,32.707159780877781],[-117.2369146433015,32.707146040490677],[-117.23691504198371,32.707132302783002],[-117.23691544814125,32.70711856591722],[-117.23691585642155,32.707104828132707],[-117.23691626790115,32.707091090322592],[-117.236916686846,32.707077352452728],[-117.23691710472423,32.707063614591455],[-117.23691753009797,32.707049879375418],[-117.2369179607737,32.707036141411656],[-117.23691839251582,32.707022403439403],[-117.23691883066677,32.70700866631762],[-117.23691927203723,32.706994930973579],[-117.23691971551021,32.70698119290747],[-117.23691999692018,32.706972604215103],[-117.23692003613502,32.706971438843432],[-117.23692007217062,32.706970275300698],[-117.23692016327924,32.706967457512249],[-117.2369206174167,32.706953719360754],[-117.23692107478382,32.706939983888688],[-117.23692153531992,32.706926245686041],[-117.23692200336161,32.706912511030289],[-117.23692247669517,32.706898772725225],[-117.23692294685942,32.706885037150727],[-117.23692342342244,32.706871301525076],[-117.23692664328145,32.706868527230306],[-117.23692632136328,32.706854540095009],[-117.23692600611729,32.706840863107466],[-117.23692569285294,32.706827172577881],[-117.23692537729428,32.706813467638682]]]}},{"attributes":{"OBJECTID":46,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":2811.5468784860727,"SHAPE.STArea()":346355.69258069276,"GlobalID":"{AEFDBB63-D0DA-48B9-A304-524553B50640}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"Yes","Region":"Trade Street"},"geometry":{"rings":[[[-117.15034134804748,32.888836794368132],[-117.15028937790893,32.887307183393496],[-117.15077151382762,32.887310992039829],[-117.15115263468471,32.887312643603096],[-117.15145889219988,32.887314576822924],[-117.15163481846963,32.887315690168307],[-117.15164785105682,32.887314979188893],[-117.15170361243614,32.888942307242594],[-117.15253946204997,32.888952795702942],[-117.1525327382431,32.888967365549746],[-117.15252828019479,32.888980577057595],[-117.15252514486039,32.888994059346494],[-117.15252335580284,32.889007713053047],[-117.15252292705956,32.889021447900539],[-117.15252385972306,32.889035161984417],[-117.15252614858493,32.88904876426669],[-117.15252977873516,32.889062155664696],[-117.15253472146317,32.889075246213828],[-117.15254096332527,32.889087975595473],[-117.15226995916601,32.889213025118359],[-117.15226853403144,32.889391688501959],[-117.15040816494194,32.889365085833234],[-117.15035927395076,32.889364386113641],[-117.15034134804748,32.888836794368132]]]}},{"attributes":{"OBJECTID":47,"Campus":"Natural Reserves System","FeatureID":null,"SHAPE.STLength()":19915.467240340749,"SHAPE.STArea()":10126745.732693939,"GlobalID":"{DEBC39B8-B70D-4C68-AF45-B66E20741E56}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"Yes","Region":"Dawson Los Manos"},"geometry":{"rings":[[[-117.24842935223379,33.152298138812277],[-117.24819726990711,33.152110404210539],[-117.2480698832323,33.152114178510161],[-117.24805418765804,33.151883431424906],[-117.24908222331547,33.148909529962808],[-117.24789979047551,33.148956454089507],[-117.24735922068166,33.148810284177053],[-117.24687379381804,33.148679024039829],[-117.24625374822561,33.148511354574566],[-117.24659708941772,33.147585523117563],[-117.24561392867781,33.147327122882736],[-117.24459811441496,33.14706013002175],[-117.24459262864421,33.146674673976399],[-117.24459259912648,33.146672638099112],[-117.24459197347581,33.146628713370347],[-117.24458954274932,33.146457839954117],[-117.24458758346711,33.146320222290072],[-117.24458554978909,33.146177177687122],[-117.24458355950411,33.146037108454486],[-117.24458155353665,33.145896506421145],[-117.24457959948866,33.145759064545267],[-117.2445776389067,33.145621234974413],[-117.24457293240454,33.145290684587806],[-117.24456604085201,33.144806378186082],[-117.24462611300457,33.144780161535849],[-117.24477691293434,33.144714349247984],[-117.24492771264806,33.144648537677902],[-117.24507851213545,33.144582725923875],[-117.24522931138632,33.144516913084288],[-117.24538011042118,33.144451100962435],[-117.24553090922969,33.144385288656594],[-117.24568170780168,33.144319475265206],[-117.24583250615765,33.144253662591545],[-117.24601105740651,33.144175737341889],[-117.24622423353357,33.14408269999624],[-117.24645657710373,33.143981295182549],[-117.24660471740211,33.14391664181835],[-117.24663666421688,33.143902698406436],[-117.24663885692,33.143947001896471],[-117.24673084474716,33.14580581671089],[-117.24693265766959,33.145805777904272],[-117.25043553219022,33.145804954313341],[-117.25044404109899,33.145804959571905],[-117.25045254984316,33.145804950403374],[-117.25181653897488,33.145804631750096],[-117.2518250562831,33.145804621516454],[-117.25183355554559,33.145804626757567],[-117.25315965752786,33.145804262318947],[-117.25316815786216,33.145804267459823],[-117.25317667518055,33.14580425803495],[-117.25323788011845,33.14580423513241],[-117.25324638896537,33.145804234788628],[-117.25425652421075,33.1458039694365],[-117.25698143297024,33.145803186193831],[-117.25793421337728,33.145802898768054],[-117.2617247971412,33.145801682965995],[-117.26180176887851,33.145801656978421],[-117.26180296092089,33.145805937702058],[-117.2618302534277,33.149066666674365],[-117.26183432082806,33.149257555045864],[-117.26138825007931,33.14959029464665],[-117.25953698761167,33.149421238444468],[-117.25937027453728,33.149414350756935],[-117.25866471126049,33.149714183579654],[-117.25864967441701,33.149719552238629],[-117.25863453331841,33.149724710738276],[-117.25861929334486,33.14972966083829],[-117.25860396197874,33.149734400674333],[-117.25858853599416,33.149738929370784],[-117.25857302711958,33.149743241421838],[-117.25855743324236,33.14974733954984],[-117.25854176509168,33.149751224569222],[-117.25852601937946,33.149754890194529],[-117.25851020578371,33.149758339052191],[-117.25849432748895,33.14976156841103],[-117.25847838875164,33.149764575531293],[-117.25846239393198,33.149767366689531],[-117.25844634509086,33.149769934655154],[-117.25843025082399,33.149772281161582],[-117.25841411112114,33.149774405307213],[-117.25839793023879,33.149776304352194],[-117.25838171785487,33.14977798092297],[-117.25836547289769,33.149779435028236],[-117.25834920283936,33.149780663901971],[-117.25833290979256,33.149781664821866],[-117.25831660132265,33.149782443136694],[-117.25830027848087,33.149782997034421],[-117.25828395199642,33.149783327329466],[-117.25826761322186,33.149783427780193],[-117.25825127830791,33.149783304567215],[-117.25823494724426,33.149782956788926],[-117.25821862641041,33.149782379884755],[-117.25820231588943,33.149781581067884],[-117.25818602635856,33.149780556644558],[-117.25816975677721,33.149779309328487],[-117.25815351780194,33.149777833622551],[-117.25813730523863,33.149776137676504],[-117.25812113295949,33.149774215967085],[-117.2581049967083,33.149772071234167],[-117.25808890395707,33.149769700711808],[-117.25807285805629,33.149767116095241],[-117.2580568706618,33.149764305567238],[-117.25804093753806,33.149761273670862],[-117.2580250630245,33.149758024879588],[-117.25800925780877,33.14975455640127],[-117.25799351978864,33.149750871860007],[-117.25797894768199,33.149747247268522],[-117.25752068187445,33.149674014728689],[-117.2575044324699,33.149672561566035],[-117.25748815159918,33.149671448610903],[-117.25747184248807,33.149670676738658],[-117.25745551374224,33.149670248584705],[-117.25743917924409,33.149670159527375],[-117.25742284868147,33.149670413094952],[-117.25740652846471,33.149671007431841],[-117.25739022824028,33.149671942459605],[-117.25737396515792,33.149673218038913],[-117.25735774457662,33.149674834126138],[-117.25734157077339,33.149676789784969],[-117.25732546621555,33.149679081225749],[-117.25730943098593,33.149681715661693],[-117.25729348203733,33.149684675822236],[-117.25727762377089,33.149687971590531],[-117.25726186792519,33.149691598362722],[-117.25724622302312,33.149695551560832],[-117.25723070090687,33.149699835597318],[-117.25721531214988,33.14970443776209],[-117.25720005788597,33.14970936345626],[-117.2571849573464,33.149714607113374],[-117.25717001799266,33.14972016506578],[-117.25715524833738,33.149726031834049],[-117.25714064835975,33.149732205614846],[-117.25712624806148,33.149738685262776],[-117.25711203448679,33.149745462767605],[-117.25709803012415,33.149752536143104],[-117.25708423918834,33.149759899043026],[-117.257070669141,33.149767547799875],[-117.25705732851534,33.149775478737411],[-117.25704422583465,33.149783687277811],[-117.25703137067312,33.149792167031237],[-117.25702544214784,33.149796225211134],[-117.2566852758015,33.150049100708529],[-117.25667434315402,33.150059309665075],[-117.25666366352502,33.150069708635016],[-117.2566532378932,33.150080289494873],[-117.25664307910041,33.150091050336997],[-117.25663318710517,33.150101987554748],[-117.25662356391676,33.150113089409437],[-117.2566142181619,33.150124360339674],[-117.25660515187062,33.150135790409941],[-117.25659636499107,33.15014737511212],[-117.25658786713925,33.150159111662902],[-117.25657966253017,33.150170993716031],[-117.25657174572187,33.150183014101849],[-117.25656413171008,33.150195171796966],[-117.25655681719668,33.150207459614265],[-117.25654980425294,33.150219871224877],[-117.25654309924812,33.150232401166704],[-117.25653670322316,33.15024504672617],[-117.25653061822877,33.150257799771033],[-117.25652485276763,33.150270653920188],[-117.2565194003982,33.150283608324237],[-117.25651427068473,33.150296655691697],[-117.25650946140077,33.150309788826803],[-117.25650497676152,33.150323001383185],[-117.2565008156332,33.150336287959782],[-117.25649698335452,33.150349646709699],[-117.25649348092506,33.150363071312718],[-117.25649030929279,33.150376550940472],[-117.25648747164234,33.150390082861833],[-117.2564866610747,33.150394272588393],[-117.25635871453177,33.151203370706824],[-117.25635572648127,33.151216878596159],[-117.25635227339525,33.151230310908538],[-117.25634835830282,33.151243651388079],[-117.25634397895659,33.151256891035651],[-117.25633914698156,33.15127001532904],[-117.2563338558634,33.151283017107303],[-117.25632812152504,33.15129588271494],[-117.25632194172942,33.151308604054613],[-117.25631532276286,33.151321168450856],[-117.25630827628132,33.1513335640864],[-117.25630080002722,33.151345781060456],[-117.2562929035645,33.151357812081486],[-117.25628459315887,33.151369642670709],[-117.25627587834332,33.151381262831578],[-117.2562667655077,33.151392668905245],[-117.25625725872223,33.151403841922125],[-117.2562473697775,33.151414781786478],[-117.25623710812386,33.151425471288476],[-117.25622647799703,33.151435905884966],[-117.25622418000188,33.151438084193238],[-117.25587504825305,33.151765240131482],[-117.25573048639538,33.151980795932026],[-117.25562748263624,33.152116307428194],[-117.25521313843309,33.152161544027642],[-117.255020626621,33.152182561839155],[-117.25482486423192,33.152203935737028],[-117.25465169361561,33.152222843924413],[-117.25447243085506,33.152242412615031],[-117.2542960170391,33.152261671210852],[-117.25407738829212,33.152285537635727],[-117.25397950018308,33.152297324498583],[-117.25388481626577,33.152303588364049],[-117.25321584936619,33.152377786168387],[-117.25152768733361,33.152636136254557],[-117.25054471969003,33.152740249222511],[-117.2500662455414,33.153763505689994],[-117.24852618025668,33.15394326082685],[-117.24842935223379,33.152298138812277]],[[-117.24587642914071,33.15054964582761],[-117.24644897278357,33.150365438853918],[-117.24646673980453,33.151924886869871],[-117.24466708113228,33.151990364640774],[-117.24325281895736,33.15203743603432],[-117.24295258485019,33.151204302208143],[-117.24431988039055,33.15105041919935],[-117.24463276163431,33.150949760604334],[-117.24587642914071,33.15054964582761]]]}},{"attributes":{"OBJECTID":48,"Campus":"Natural Reserves System","FeatureID":null,"SHAPE.STLength()":4787.8994282461463,"SHAPE.STArea()":720193.82709783618,"GlobalID":"{7BF98FB7-D037-4985-B152-25AC601EED62}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887901000,"Clery":"Yes","Region":"Kendall-Frost Mission Bay Marsh"},"geometry":{"rings":[[[-117.23008071919379,32.796091199152002],[-117.22992364278571,32.795564856660498],[-117.22809405519855,32.79595286709047],[-117.22805547628364,32.795825946013153],[-117.22780318690135,32.794995933214196],[-117.22758090739221,32.794264632908153],[-117.22919263973552,32.793783810725856],[-117.22928032441878,32.793409135808687],[-117.22931379370631,32.793266124444933],[-117.23018277188977,32.792693029591746],[-117.2307374683743,32.791960207699219],[-117.23074101198516,32.791955531032265],[-117.23106177099791,32.792988658197167],[-117.23112553231621,32.793194018783147],[-117.23109366773988,32.793254739680592],[-117.23108445362671,32.793263411083181],[-117.23080349522138,32.79320482352918],[-117.23029634658971,32.793541424918828],[-117.23031289107936,32.79356603029202],[-117.23016097046808,32.793657938122841],[-117.23011031614428,32.793784773546648],[-117.23006527915847,32.793831856113144],[-117.23005289752228,32.794181018475129],[-117.23010086784879,32.794397771390912],[-117.23011582930867,32.794864900696858],[-117.23048127030484,32.794952702802391],[-117.23048787981251,32.794974638536132],[-117.23077525889033,32.795928845510453],[-117.23008071919379,32.796091199152002]]]}},{"attributes":{"OBJECTID":49,"Campus":"Natural Reserves System","FeatureID":null,"SHAPE.STLength()":8100.4684131013628,"SHAPE.STArea()":1965844.003897093,"GlobalID":"{DE523E31-70A5-471C-A087-4806A491AA42}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887901000,"Clery":"Yes","Region":"Scripps Coastal Reserve - Land"},"geometry":{"rings":[[[-117.24694022518059,32.879690228993702],[-117.2471208649312,32.878671813209834],[-117.246523381334,32.878919579841209],[-117.24608664900178,32.879100680903704],[-117.24514860259622,32.878678720144819],[-117.24524440976379,32.878521224546802],[-117.24611019979977,32.87869299073261],[-117.24632468752705,32.878260458099213],[-117.24656388616648,32.877810518598352],[-117.24664975153969,32.877138337774845],[-117.24670224785648,32.876797940533834],[-117.24675331844797,32.876418230395032],[-117.24682845076939,32.875862420128492],[-117.24683421719179,32.875796408864041],[-117.24680604304972,32.875568729925845],[-117.246730240757,32.874956195408636],[-117.24681488737754,32.874952766708894],[-117.24724267610709,32.874263527331806],[-117.24946376991613,32.874281809106904],[-117.25165639092943,32.874301771483573],[-117.25170945559654,32.874300255573729],[-117.25152362707776,32.874910065031209],[-117.25151958687235,32.874923321033506],[-117.25151554568961,32.874936585159304],[-117.25151150441327,32.874949841169958],[-117.25150746637205,32.874963099859514],[-117.25133581296468,32.875526382867655],[-117.25131725707806,32.876286528513688],[-117.25131692160667,32.876300244134796],[-117.25131658829282,32.87631396154196],[-117.25131625285204,32.876327679868091],[-117.25131608900675,32.876334410049573],[-117.25131765605128,32.876341020699272],[-117.25149111446781,32.877073222242117],[-117.25127091765891,32.877075343169992],[-117.25081773230204,32.877079012050501],[-117.25076203680898,32.877131704207557],[-117.2506590925999,32.877239381719242],[-117.25060231251631,32.877320568845867],[-117.25056207682084,32.877371947208339],[-117.25052188046146,32.877426882639611],[-117.25048081639764,32.87746218498436],[-117.25038016278253,32.877523541590655],[-117.25033977839422,32.87756186194995],[-117.25031887486749,32.877579835319942],[-117.25029825480019,32.877622740660023],[-117.2502945156475,32.877665510237996],[-117.25028918130391,32.877691669884257],[-117.25027405818865,32.877723848597263],[-117.25024478873334,32.877749015302278],[-117.25021818642648,32.877761100375565],[-117.25016756981391,32.877766260520659],[-117.25011692446276,32.877767858968156],[-117.25005631761617,32.87776122299077],[-117.25000272277333,32.877750972833383],[-117.249929323082,32.877732576014331],[-117.24986160966291,32.877718878142517],[-117.24976851299131,32.877701821006447],[-117.24966700929858,32.877687207927146],[-117.24953802101956,32.877678700115631],[-117.24939307415787,32.877681060179526],[-117.24931019690334,32.877695975420174],[-117.24922325571617,32.877723983502833],[-117.24916008952472,32.877739927744045],[-117.2491150899789,32.877742667730047],[-117.24902910046994,32.877731492390332],[-117.24884030576206,32.877715207370493],[-117.24862422063111,32.877700387944842],[-117.24843140525296,32.877701944341233],[-117.24833572163149,32.877703905081582],[-117.2482274604191,32.877714282389384],[-117.24811368903157,32.877735379920423],[-117.2480153502669,32.877751608593726],[-117.24792835642978,32.877776051572724],[-117.24784381003747,32.877802216002586],[-117.24770104991281,32.877873413073964],[-117.24748978657161,32.877986706592438],[-117.24743949202566,32.878019167977399],[-117.24741577287213,32.878038357495143],[-117.24739773812193,32.878061057621188],[-117.24738392798396,32.878084910345123],[-117.24738131422578,32.878102740986009],[-117.2473817841576,32.878144287982906],[-117.24738917265054,32.878175097916184],[-117.24740924659527,32.878206992151831],[-117.24742938736847,32.87824600515308],[-117.24744938055539,32.87827077351195],[-117.24748762284105,32.878291838049044],[-117.2475370609571,32.878308053659005],[-117.2475723126432,32.87831370797791],[-117.24761450971619,32.878310992085112],[-117.24765237618712,32.878298815726843],[-117.24770843776567,32.878278177411886],[-117.24776429679669,32.878238550774235],[-117.24783693019167,32.878189293230577],[-117.24792918040606,32.878132750688707],[-117.24802279778459,32.878071445718383],[-117.24808159400085,32.87804366493345],[-117.2481082639746,32.878037511482013],[-117.2481364214128,32.878037284026441],[-117.24816323852167,32.878044193914882],[-117.24818026874118,32.878057115467996],[-117.24819744537943,32.878081905558872],[-117.24820055732515,32.878107998678566],[-117.24818115653623,32.87813545946841],[-117.24815043763448,32.878157079980433],[-117.24811128520376,32.878179950803066],[-117.24807639716491,32.87820634997761],[-117.24802084636498,32.878272097937902],[-117.24798351853195,32.878331753458347],[-117.24794065266306,32.878399775035128],[-117.24791309929842,32.878452233182699],[-117.24787774889313,32.878578080014819],[-117.24784912367299,32.878660226970752],[-117.24782710790858,32.87870551926548],[-117.24779393651777,32.878759209454934],[-117.24775785521484,32.87880461531897],[-117.24770636621942,32.878856078189926],[-117.24763933730343,32.878904108207699],[-117.24758206986286,32.878942559453627],[-117.24752493594551,32.878992885628755],[-117.24747899897019,32.879038365563801],[-117.2474121366006,32.879122789601993],[-117.24733423315382,32.879204146600074],[-117.24726905553564,32.879290149448572],[-117.24723718327776,32.879334334483303],[-117.24720275092317,32.879401093813691],[-117.24716965957433,32.879461902491478],[-117.24713648813332,32.879516780101802],[-117.24708253255658,32.879599137592606],[-117.24704378167743,32.879657615795786],[-117.24699111317342,32.879729272625923],[-117.24695377065929,32.879787748453602],[-117.24692690939182,32.879839789589766],[-117.24694022518059,32.879690228993702]]]}},{"attributes":{"OBJECTID":50,"Campus":"La Jolla Campus","FeatureID":null,"SHAPE.STLength()":3230.0856990923171,"SHAPE.STArea()":452118.77552441973,"GlobalID":"{C54FA55F-A61E-4D49-B0DC-247A6BFB0959}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887901000,"Clery":"Yes","Region":"La Jolla Del Sol"},"geometry":{"rings":[[[-117.22214515221053,32.86445605999252],[-117.22215299125796,32.864443739955938],[-117.22306616350745,32.864854327605435],[-117.22460120902464,32.864954708732149],[-117.22507924730226,32.864985972253749],[-117.22502891517895,32.865050690238576],[-117.22497318135109,32.865130029381682],[-117.22490390383609,32.865226494956012],[-117.22484204748797,32.865326489083152],[-117.22478786426599,32.865429605803591],[-117.22474157392155,32.865535424982873],[-117.22470336406734,32.865643518623408],[-117.22467339119557,32.865753446347334],[-117.22465177540498,32.86586476175021],[-117.22463860575265,32.86597701326032],[-117.22420725471508,32.86598039559923],[-117.22270713183919,32.865992141785476],[-117.22270728609921,32.865972169575599],[-117.22267264291149,32.865972439624194],[-117.22148667322428,32.865981634113105],[-117.22076491165552,32.865981700506424],[-117.22077117169304,32.865976151561874],[-117.22078241273287,32.865966212547903],[-117.22094049894451,32.865830288904277],[-117.22094312571321,32.865828388117613],[-117.22095534638005,32.865819307065777],[-117.22096732631211,32.865810003369674],[-117.22097905907907,32.865800475276458],[-117.22099054261368,32.8657907291147],[-117.22100176312621,32.865780774010275],[-117.2210127238119,32.865770609036367],[-117.22102341303773,32.865760245105491],[-117.22103382867685,32.865749683136144],[-117.22104396544701,32.86573892858047],[-117.22105381698742,32.865727985997189],[-117.22106338339776,32.865716864403069],[-117.22107265402381,32.865705566587174],[-117.22107630592714,32.865702060745875],[-117.22108704358358,32.865691729793319],[-117.22109775758334,32.865681385499563],[-117.22110844993382,32.865671016126107],[-117.2211191218726,32.865660636992899],[-117.22112976686986,32.865650237330399],[-117.22114039035722,32.865639825211538],[-117.22115098904979,32.865629393448238],[-117.22116156939785,32.865618945596736],[-117.22117212282433,32.865608479019286],[-117.22118265365253,32.865597998190623],[-117.2211931618626,32.865587501307324],[-117.22120364638612,32.865576988377889],[-117.22121410826168,32.865566456688931],[-117.22122454753902,32.865555910748746],[-117.22123495989472,32.865545346082627],[-117.22124535286743,32.865534768041769],[-117.22125571890849,32.865524170373291],[-117.22126606660511,32.865513556616783],[-117.22127638637151,32.86550292955264],[-117.22128668454832,32.865492282819005],[-117.22129695906847,32.865481622744156],[-117.22130721097058,32.865470946614955],[-117.22131744022464,32.865460251726176],[-117.22132763940174,32.865449542645038],[-117.2213378180975,32.865438817492624],[-117.22134797524357,32.865428076277361],[-117.2213581087032,32.865417319016011],[-117.22136821632955,32.86540654482372],[-117.22137830026941,32.865395754585379],[-117.22138836161108,32.865384950095958],[-117.22139840034463,32.865374130453702],[-117.22140840897134,32.865363293914193],[-117.22141840139039,32.865352441269806],[-117.22142836797619,32.865341571694557],[-117.22143830771016,32.865330689705111],[-117.22144822481609,32.865319790759635],[-117.22145811929403,32.865308874858059],[-117.22146798689027,32.865297943837312],[-117.22147783188835,32.865286998565537],[-117.22148764999481,32.865276037272984],[-117.22149744974679,32.865265058990758],[-117.22150721944185,32.865254068319643],[-117.22151696867549,32.865243063380632],[-117.22152669202617,32.865232037002478],[-117.22153638960347,32.865220999103542],[-117.22154606349427,32.865209945158604],[-117.22155571476705,32.865198875159308],[-117.22156534024649,32.865187791835851],[-117.22157494200968,32.865176689761483],[-117.22158559910739,32.865164396294581],[-117.22159553984041,32.865153511579067],[-117.22160545042684,32.86514260635969],[-117.22161532769131,32.865131683366542],[-117.22162517912258,32.865120743442631],[-117.22163500467093,32.865109782079458],[-117.22164479691718,32.865098804745998],[-117.22165455899695,32.865087805105297],[-117.22166429632192,32.865076789427079],[-117.22167400034492,32.865065757778567],[-117.22168367740657,32.865054703797604],[-117.22169332223463,32.865043633837935],[-117.22170294116987,32.865032541537474],[-117.22171252684284,32.865021436873413],[-117.2217220855546,32.865010309876979],[-117.22173161312108,32.864999168696798],[-117.22174110944279,32.86498800431621],[-117.2217505810296,32.864976825701468],[-117.22176001928456,32.86496562841144],[-117.22176942740295,32.864954411519321],[-117.22177880649306,32.864943178623342],[-117.22178815655477,32.864931929723511],[-117.22179747645006,32.864920658516532],[-117.22180676090666,32.864909371356227],[-117.22181602488206,32.864898068124802],[-117.22182525338894,32.864886746235008],[-117.22183445285754,32.864875407439754],[-117.22184362222941,32.864864052649068],[-117.22185276147479,32.864852679157934],[-117.22186186844675,32.864841286081635],[-117.22187094962554,32.864829879681324],[-117.22187999425751,32.864818453729342],[-117.22188900984122,32.86480700997032],[-117.22189799858322,32.86479555469905],[-117.22190695823727,32.864784078013955],[-117.22191587917776,32.864772579089127],[-117.22192477328659,32.864761069553715],[-117.22193363726888,32.864749541317977],[-117.22194247225281,32.864737999783557],[-117.22195127175834,32.864726438689146],[-117.22196004754771,32.864714858843989],[-117.2219687879284,32.864703265750492],[-117.22197749820256,32.86469165576009],[-117.22198617621343,32.864680027086209],[-117.22199482415765,32.864668385122002],[-117.22200344304375,32.864656724449112],[-117.22201202971645,32.864645049601116],[-117.2220205862627,32.864633356052849],[-117.22202910953705,32.864621649239552],[-117.22203760053829,32.864609922841083],[-117.22204606254127,32.864598183144004],[-117.22205449441778,32.864586424746662],[-117.22206289408093,32.864574652174241],[-117.22207126045237,32.864562864533497],[-117.22207959778572,32.86455105998747],[-117.22208790180747,32.864539238569719],[-117.22209617360589,32.864527402075254],[-117.22210441639612,32.864515551380542],[-117.22211262908986,32.864503684690582],[-117.22212080529677,32.864491803859259],[-117.22212895242578,32.864479902515946],[-117.22213706737136,32.864467989702675],[-117.22214515221053,32.86445605999252]]]}},{"attributes":{"OBJECTID":51,"Campus":"Hillcrest Campus","FeatureID":null,"SHAPE.STLength()":8140.7460926851199,"SHAPE.STArea()":2799164.6686579422,"GlobalID":"{BC80D097-0AC6-4472-B971-9D5B5D3CF2AE}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"Yes","Region":"Hillcrest"},"geometry":{"rings":[[[-117.16487175600734,32.75839941776902],[-117.16471863098609,32.758314100187803],[-117.16462897739895,32.75826414632531],[-117.16448475762505,32.757939499408991],[-117.1643132228234,32.757759692483603],[-117.16367220601049,32.757791290910745],[-117.16373294287045,32.757266954750875],[-117.1637025140229,32.757198076821481],[-117.163065408664,32.757012878634214],[-117.16291919896163,32.756798014720246],[-117.16289594061988,32.756774392511304],[-117.16235895289242,32.75622898557377],[-117.16252787602308,32.755929621197559],[-117.16251496138652,32.755559851617285],[-117.16235071285351,32.755561066191305],[-117.1623504332205,32.755528086119256],[-117.16277316066703,32.755522208502725],[-117.16277179396192,32.755390291853203],[-117.16277042727025,32.755258376105608],[-117.16276897510707,32.755118210044934],[-117.16276470413868,32.754705963981223],[-117.16276377311452,32.754563050965444],[-117.16276287659331,32.754425631111147],[-117.16276198334147,32.754288217545167],[-117.16276092442658,32.754126057779011],[-117.16275919416205,32.7538607778841],[-117.16300694238105,32.753859712295871],[-117.16304258636421,32.753859559456394],[-117.16314104397215,32.753805025665315],[-117.1631778601872,32.753858977690982],[-117.16320736841753,32.753858852179121],[-117.16321382857316,32.753858824204642],[-117.16322105490225,32.753858793264477],[-117.16334464629819,32.753858268022888],[-117.16353330459532,32.753857470137],[-117.16368291591152,32.753856834867953],[-117.163701395774,32.753856756636331],[-117.16381626477796,32.753856268460417],[-117.16394636543458,32.753855716951293],[-117.16401466452729,32.753855428351287],[-117.16405378296815,32.753855262106278],[-117.16407098871983,32.753855188749206],[-117.16408947178279,32.753855110435715],[-117.16417140510039,32.753854765828883],[-117.16417267385653,32.753854759133922],[-117.16417198347155,32.753815682716912],[-117.16417164970493,32.753796782857719],[-117.16425799678169,32.753796143084273],[-117.16425794585319,32.753791235275642],[-117.16425749920215,32.753748192991651],[-117.16425725528275,32.753724687266391],[-117.16425662786149,32.753664224651331],[-117.16425588635539,32.753592767931906],[-117.16425520189794,32.753526808715606],[-117.16425440336552,32.753449856296655],[-117.1642537189103,32.753383897080482],[-117.16425297741827,32.753312441263084],[-117.16425220740861,32.753238237145034],[-117.16425157998491,32.7531777736287],[-117.16425086701513,32.753109066112167],[-117.16425015407454,32.753040361300677],[-117.16424932700421,32.752960657876635],[-117.16424873599065,32.752903702771945],[-117.16424864255659,32.752894698660924],[-117.16427261155414,32.752894624756564],[-117.16453161055105,32.752893827104423],[-117.16464870673023,32.752893467718771],[-117.16481457748223,32.752892955808555],[-117.16488287985086,32.752892746051508],[-117.16488356474522,32.752958702558608],[-117.16488433531228,32.753032909377374],[-117.16488464923593,32.753063140683032],[-117.16488504877543,32.753101616890227],[-117.16488584785549,32.753178569304652],[-117.1648865042531,32.753241781118255],[-117.164887274797,32.753315985232327],[-117.16488795972602,32.753381944444911],[-117.16488875881116,32.753458896859662],[-117.16488947376993,32.753527747739014],[-117.16489018575237,32.753596311886248],[-117.16489092777293,32.753667768601858],[-117.16489149855158,32.753722734612573],[-117.16498907536828,32.753722436682686],[-117.16499558041387,32.753722416397672],[-117.1649954050592,32.753705531661616],[-117.16504294851448,32.753705061859904],[-117.16506625662623,32.753704832193911],[-117.16508670510187,32.753704630044027],[-117.16516505358369,32.7537038559826],[-117.16520111798305,32.753703500115691],[-117.16605213091908,32.753695233568941],[-117.16605155575397,32.753653668392296],[-117.16622209415318,32.75365240215941],[-117.16641950682913,32.753652530374467],[-117.16674161393888,32.753652738225234],[-117.16699847600952,32.753652903528874],[-117.16733674604326,32.753653119554791],[-117.16764574757465,32.753653315172485],[-117.1678929594807,32.753653471931763],[-117.16822147797147,32.753653678721641],[-117.16826376241673,32.7536537076057],[-117.16826422072286,32.753697680401771],[-117.16826493682716,32.753766387895745],[-117.16826565293253,32.753835095389746],[-117.16826636903905,32.753903802883812],[-117.16826717107968,32.753980755277297],[-117.16826788718856,32.754049462771547],[-117.16826854601911,32.754112674567963],[-117.16826926213014,32.754181382062306],[-117.16827000688676,32.754252837856576],[-117.16827075164463,32.754324293650832],[-117.16827141046988,32.754387504545832],[-117.16827209794076,32.75445346374071],[-117.16827281405729,32.754522171235379],[-117.16827350153966,32.754588131332021],[-117.16827370205282,32.754607369430609],[-117.16827453275101,32.75468707012466],[-117.16827524887137,32.754755777619557],[-117.16827596499287,32.754824485114604],[-117.16827586328232,32.75488219923367],[-117.16827575497524,32.754942659209718],[-117.16827564353581,32.755005890265686],[-117.16827553948394,32.755063584564013],[-117.16827541603097,32.755132318145904],[-117.16827528560856,32.755206526262157],[-117.16827516310011,32.755275248114501],[-117.1682750458704,32.755343964517223],[-117.16827489352349,32.755426410220188],[-117.16827477450698,32.755495160000834],[-117.16827468932387,32.75554186641935],[-117.16827464062855,32.755569343796125],[-117.16827454340698,32.755624314779929],[-117.16827588972853,32.755753484872315],[-117.16827602688377,32.75576172939067],[-117.16827714101873,32.755813948257028],[-117.16827856578468,32.75588265949682],[-117.16828010424844,32.75595685248873],[-117.16828146821074,32.756022801240256],[-117.16828300566871,32.756096999650232],[-117.16828425705326,32.756157471150203],[-117.16828562422305,32.756223419878054],[-117.1682873329449,32.756305858044151],[-117.16828898313634,32.756385547231105],[-117.16829204321125,32.756446002565617],[-117.16829364386152,32.756514692658754],[-117.16829524782838,32.756583393548212],[-117.16829697432333,32.756657604078093],[-117.16829761789286,32.756685049251153],[-117.16829838810156,32.756718091503181],[-117.16829941260497,32.756762015902204],[-117.16832393658834,32.758490651738434],[-117.16756897008179,32.75846054010124],[-117.16683757335556,32.758407791714475],[-117.16671621830847,32.75839903928528],[-117.1661693685537,32.758359603358372],[-117.16559954458653,32.758318501341151],[-117.16507437915573,32.758621933489117],[-117.16494839698247,32.758442119642012],[-117.16487175600734,32.75839941776902]],[[-117.1652680786593,32.752839404297411],[-117.16527276960976,32.75283795376388],[-117.16541236734253,32.753136493361524],[-117.1653798360551,32.753139174825819],[-117.16538316292491,32.753268341942302],[-117.16538528709115,32.753350770729952],[-117.16508282685163,32.75335301426567],[-117.16508200225435,32.753273313528105],[-117.16508060995672,32.753138645855735],[-117.16507852574833,32.752937359849291],[-117.1650805121711,32.752923743228259],[-117.1650855147906,32.752910688567098],[-117.16509335610485,32.752898675105598],[-117.16510374924,32.752888131495169],[-117.16511631507947,32.752879441082484],[-117.16513060124592,32.752872920126755],[-117.16514609265015,32.752868805999285],[-117.16515887943822,32.752866388270121],[-117.16517469298992,32.752863187018612],[-117.16519044237603,32.752859767117542],[-117.1652061243766,32.752856126787243],[-117.16522173263603,32.752852270583631],[-117.16523726394381,32.752848197628865],[-117.1652527140597,32.752843910659536],[-117.1652680786593,32.752839404297411]]]}},{"attributes":{"OBJECTID":53,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":2223.8301622032891,"SHAPE.STArea()":299566.63406388066,"GlobalID":"{850756E4-4A2F-4B8F-95E1-55E265147F78}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"No","Region":"East Medical Center"},"geometry":{"rings":[[[-117.05788360075969,32.7773380722616],[-117.05762750824761,32.777242726094393],[-117.05761258272189,32.777237263661007],[-117.05759755235651,32.777232008409214],[-117.05758242354726,32.777226959395506],[-117.05756719847831,32.777222122015793],[-117.05755188036815,32.777217498052636],[-117.05753647768931,32.777213080236507],[-117.05752098838974,32.777208877598298],[-117.0575054231344,32.777204889166391],[-117.05748978089728,32.77720111945618],[-117.05747406697365,32.777197563924297],[-117.05745828673325,32.777194226142484],[-117.05744244870633,32.77719110515325],[-117.05742654546283,32.777188205513767],[-117.05741059192891,32.777185525322977],[-117.0573992248403,32.777183752931165],[-117.05640543991481,32.777022592274896],[-117.05638978029499,32.777019013707211],[-117.05637575031645,32.777012138566654],[-117.05636429998115,32.77700243405797],[-117.05636230813148,32.776999511923144],[-117.05635620491974,32.776990558791638],[-117.05635202009154,32.776977318900798],[-117.05635202381217,32.776963617008029],[-117.05635280894808,32.776959717283546],[-117.05670604401377,32.775540415709997],[-117.05841895587037,32.775559832359178],[-117.05789553482299,32.777298431402706],[-117.05788360075969,32.7773380722616]]]}},{"attributes":{"OBJECTID":54,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":400.30051424737763,"SHAPE.STArea()":10015.017534265144,"GlobalID":"{41B01CED-22E7-4BE9-9CC8-CDA1480B7EA0}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887928000,"Clery":"Yes","Region":"Framework Apartments"},"geometry":{"rings":[[[-117.15241139609489,32.713906179083473],[-117.1524103196888,32.713768638075102],[-117.15273564479936,32.713766653118171],[-117.15273663163136,32.713903313782005],[-117.1527376331034,32.714041820203313],[-117.1524124724951,32.714043719190727],[-117.15241139609489,32.713906179083473]]]}},{"attributes":{"OBJECTID":60,"Campus":"Downtown Culture Center","FeatureID":null,"SHAPE.STLength()":944.08998085209578,"SHAPE.STArea()":51613.484222035142,"GlobalID":"{E34D872C-3C4C-424D-98ED-AA966B013512}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887918000,"Clery":"Yes","Region":"Park and Market"},"geometry":{"rings":[[[-117.15398192578108,32.711691560595547],[-117.15398174598214,32.711669660423695],[-117.15401001962343,32.711669511791236],[-117.15454128661104,32.711666724641482],[-117.15454758861053,32.712491422671995],[-117.15398852089024,32.712493970836348],[-117.15398739136995,32.712356585318076],[-117.15398626186247,32.712219200701931],[-117.15398513341574,32.712081815176852],[-117.15398400498181,32.711944430553935],[-117.15398287547562,32.711807045037745],[-117.15398192578108,32.711691560595547]]]}},{"attributes":{"OBJECTID":63,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":1255.5975972196477,"SHAPE.STArea()":85215.677539055745,"GlobalID":"{E2CDB12F-D2CF-4887-A7EA-1A2370E77DA8}","created_user":"GIS","created_date":1740568047000,"last_edited_user":"GIS","last_edited_date":1775887901000,"Clery":"No","Region":"1200 Garden View"},"geometry":{"rings":[[[-117.25969455827658,33.058360974762479],[-117.2596868825562,33.058131173415156],[-117.25966839992137,33.057769421720536],[-117.26044080475984,33.057773394145102],[-117.26105789658787,33.057776564228661],[-117.26104197538669,33.058329030195274],[-117.26060455253372,33.058324355766139],[-117.26047074356825,33.058325447867745],[-117.26045442541761,33.058325303304308],[-117.26043810768212,33.058325194804979],[-117.26041852864677,33.058325873988281],[-117.2604054703168,33.058325092336631],[-117.26038915072849,33.058325101974191],[-117.26037283155522,33.058325147675859],[-117.26035651281767,33.058325231245057],[-117.26034019452629,33.058325353583314],[-117.2603238766395,33.058325511084099],[-117.26030755922993,33.058325710058952],[-117.26029124226642,33.058325947802935],[-117.26027492891971,33.058326220683213],[-117.26025861281717,33.058326533260406],[-117.26024230038321,33.058326885482195],[-117.26022598516226,33.058327274696012],[-117.2602096768014,33.058327701724828],[-117.26019336567421,33.058328167549043],[-117.26017705819481,33.058328671214433],[-117.26016075117168,33.058329214550611],[-117.2601444477859,33.058329794826413],[-117.26012814485634,33.05833041477301],[-117.26011184554338,33.058331069855832],[-117.26009554774699,33.058331763699087],[-117.26007924934636,33.058332498123519],[-117.26006295778485,33.058333268559657],[-117.26004666666913,33.058334077764918],[-117.26003038028207,33.058334925704351],[-117.26001409325963,33.058335811520067],[-117.2599978131073,33.058336736052375],[-117.25998153442995,33.05833769573853],[-117.2599652583708,33.058338696881343],[-117.25994898379692,33.058339734079468],[-117.25993271502237,33.058340810003131],[-117.25991645099711,33.058341926464294],[-117.25990018948632,33.058343075365499],[-117.25988393277667,33.058344269312528],[-117.25986767965206,33.058345495690851],[-117.25985143021639,33.058346763517122],[-117.25983518335728,33.058348069193393],[-117.25981894120589,33.058349411800506],[-117.25980270590367,33.058350791321111],[-117.25978647423831,33.058352207781297],[-117.25977024628244,33.058353667492725],[-117.25975402195309,33.058355163242105],[-117.25973780873504,33.058356694066703],[-117.25972159492269,33.058358266374185],[-117.25970538798012,33.058359877398381],[-117.25969455827658,33.058360974762479]]]}},{"attributes":{"OBJECTID":66,"Campus":"Greater San Diego County","FeatureID":null,"SHAPE.STLength()":1441.8564643150135,"SHAPE.STArea()":115833.11658602566,"GlobalID":"{27D3F489-3D94-4410-A3C1-E7A02FE87804}","created_user":"GIS","created_date":1761979811000,"last_edited_user":"GIS","last_edited_date":1775887928000,"Clery":"No","Region":"La Jolla Professional"},"geometry":{"rings":[[[-117.22703023923096,32.870382840647174],[-117.22704025442579,32.869331414955262],[-117.22717841405188,32.869453145712498],[-117.22841447162656,32.869406673833623],[-117.22841395612348,32.869407977334312],[-117.22841343956189,32.869409281745156],[-117.22841291976488,32.869410583476373],[-117.22841239995779,32.869411884305933],[-117.22841188016073,32.869413186037093],[-117.22841135718839,32.869414490498727],[-117.22841083738125,32.869415791328258],[-117.22841031437888,32.869417093084813],[-117.22840978814097,32.869418392161748],[-117.22840926943229,32.86941969568786],[-117.22840874639972,32.869420994739372],[-117.22840822019188,32.869422296521364],[-117.22840769397399,32.869423597401664],[-117.22840716773598,32.86942489647857],[-117.22840663832277,32.869426198285908],[-117.22840610886936,32.869427496486573],[-117.2284055826614,32.869428798268487],[-117.22840505000266,32.869430096494511],[-117.22840452055925,32.869431395596862],[-117.2284039879105,32.86943269472453],[-117.22840345845701,32.869433992925202],[-117.22840292260291,32.869435292078258],[-117.22840238887561,32.869436590312738],[-117.2284018561967,32.869437886735462],[-117.22840132034248,32.869439185888538],[-117.22840078447828,32.869440484139908],[-117.22840024538858,32.869441780613371],[-117.22839970949424,32.86944307615979],[-117.22839917043464,32.869444375338176],[-117.22839863134494,32.869445671811626],[-117.22839809117674,32.869446967391852],[-117.228397552087,32.869448263865273],[-117.22839700978184,32.869449559462424],[-117.22839646748673,32.869450855961269],[-117.22839592518157,32.869452151558413],[-117.22839537861265,32.869453448091086],[-117.2283948362773,32.869454740983187],[-117.22839429077679,32.869456037507383],[-117.22839374523613,32.869457330424886],[-117.22839319543169,32.869458624277925],[-117.22839264993112,32.869459920802065],[-117.22839210118507,32.869461213744955],[-117.22839155138055,32.869462507597952],[-117.22839100263447,32.869463800540856],[-117.22839045069306,32.869465094410813],[-117.22838990087843,32.869466387362102],[-117.22838934893703,32.869467681232059],[-117.22838879375006,32.869468971520654],[-117.22838824074012,32.869470265399052],[-117.22838768558323,32.869471558392696],[-117.22838713040625,32.869472849582969],[-117.22838657415079,32.869474139880069],[-117.22838601897378,32.86947543107032],[-117.22838545954301,32.869476724097815],[-117.22838490116064,32.86947801531349],[-117.22838434169977,32.869479305635899],[-117.22838378007192,32.869480593270318],[-117.22838322062104,32.869481884494462],[-117.22838266222855,32.86948317480843],[-117.22838210064076,32.86948446604945],[-117.228381534739,32.869485753717633],[-117.22838097208272,32.869487044967151],[-117.22838040404399,32.869488332652296],[-117.22837984135764,32.869489621196777],[-117.22837927652425,32.869490908856477],[-117.22837871062244,32.86949219652471],[-117.22837814256364,32.869493482406455],[-117.22837757348651,32.869494772805076],[-117.22837700545779,32.869496061391779],[-117.22837643635053,32.869497349085407],[-117.22837586400787,32.869498634099337],[-117.22837529277366,32.869499922711491],[-117.22837472043096,32.869501207725413],[-117.22837414812832,32.869502496345994],[-117.22837357364867,32.869503781376856],[-117.2283730013059,32.869505066390801],[-117.22837242576779,32.869506352331797],[-117.22837185128809,32.869507637362602],[-117.2283712725345,32.869508922427272],[-117.22837069379101,32.869510208393642],[-117.22837011503741,32.869511493458347],[-117.22836953736231,32.869512779416212],[-117.22836895857867,32.869514061775902],[-117.22836837982504,32.869515346840544],[-117.22836779784598,32.869516630127279],[-117.22836670789312,32.869519029291325],[-117.22822294349908,32.869835416810481],[-117.22821641014764,32.869849427591802],[-117.22820958194634,32.869863348728984],[-117.22820247260458,32.869877163881988],[-117.22819507782835,32.869890871281292],[-117.22818739973434,32.869904469106558],[-117.22817943931084,32.86991795013595],[-117.22817120508532,32.869931312498323],[-117.22816269489063,32.869944553505682],[-117.22815391077344,32.869957665025893],[-117.22814485377209,32.869970644345521],[-117.22813553883475,32.869983490444433],[-117.2281259509129,32.869996195325882],[-117.22811610818012,32.870008759747748],[-117.228106003067,32.870021175654152],[-117.22809564194414,32.870033439387605],[-117.22808503229066,32.87004555088884],[-117.22807416974248,32.870057502076577],[-117.22806306394583,32.87006929557969],[-117.22805171585875,32.870080921471235],[-117.22804013080356,32.870092377905571],[-117.22802830980854,32.870103661267521],[-117.22801625605898,32.870114769728183],[-117.22800397484716,32.870125698736985],[-117.22799146721135,32.870136445580393],[-117.22797874273763,32.870147007477179],[-117.22796580028741,32.870157378124034],[-117.22795264521305,32.870167558380309],[-117.2279392817282,32.870177542802075],[-117.22792571406669,32.870187327748788],[-117.22791194650236,32.870196913186469],[-117.22789798109193,32.870206291884962],[-117.22788382641328,32.870215466481419],[-117.2278694813178,32.870224429770843],[-117.22785495541157,32.870233180775536],[-117.2278402475862,32.870241715897144],[-117.22782536745781,32.870250035059492],[-117.22781031922018,32.870258131015341],[-117.22779510502035,32.870266004649352],[-117.2277797301906,32.870273655017598],[-117.22776419785625,32.870281074881298],[-117.22774851446835,32.870288267796226],[-117.22773268849431,32.87029522648151],[-117.22771671567054,32.870301951872463],[-117.22770061093547,32.870308442047289],[-117.22768436888686,32.87031469163837],[-117.22766800451326,32.870320703232089],[-117.2276515166762,32.870326470525264],[-117.22763491504203,32.870331997950075],[-117.22761819738383,32.870337277408453],[-117.22760137545475,32.870342308807274],[-117.22758445033338,32.870347093039705],[-117.22756743161601,32.870351628226288],[-117.22755032140959,32.870355911645099],[-117.22753312394809,32.870359939655614],[-117.22751584463403,32.870363717625466],[-117.22749849193508,32.870367238273772],[-117.22748106801839,32.870370504288516],[-117.22746357818635,32.870373512020727],[-117.2274460309968,32.87037626230444],[-117.22742842854673,32.870378751516071],[-117.22741077514029,32.870380982326779],[-117.22739308254056,32.870382955545175],[-117.22737534748231,32.870384665786666],[-117.22735758386574,32.870386113843018],[-117.22733979062248,32.870387299722637],[-117.22732197630044,32.870388223357914],[-117.2273041451636,32.870388883813355],[-117.22728630154606,32.870389286465091],[-117.22726845496393,32.870389422220555],[-117.22725060868295,32.870389296464218],[-117.2272318177621,32.870388878796902],[-117.22703023923096,32.870382840647174]]]}},{"attributes":{"OBJECTID":74,"Campus":"Downtown Culture Center","FeatureID":null,"SHAPE.STLength()":774.97761423551981,"SHAPE.STArea()":33256.491785749706,"GlobalID":"{AA3F5742-E334-40C9-A605-1806B3999162}","created_user":"GIS","created_date":1774579374000,"last_edited_user":"GIS","last_edited_date":1775887901000,"Clery":null,"Region":"Museum of Contemporary Art"},"geometry":{"rings":[[[-117.16932006347221,32.717521896934763],[-117.1693203851361,32.717061124871613],[-117.16973756944614,32.717061338378279],[-117.16973725309711,32.717522104106948],[-117.16973708203723,32.717773639243724],[-117.16963544843362,32.717773589134914],[-117.16931989122178,32.717773432070977],[-117.16932006347221,32.717521896934763]]]}}]} diff --git a/lib/core/services/esri_map_services/esrimap_boundary_service.dart b/lib/core/services/esri_map_services/esrimap_boundary_service.dart deleted file mode 100644 index 93ce43ce5..000000000 --- a/lib/core/services/esri_map_services/esrimap_boundary_service.dart +++ /dev/null @@ -1,223 +0,0 @@ -/// ============================================================================ -/// File: esrimap_boundary_service.dart -/// Description: Service providing UC San Diego campus boundary geometry loading -/// and constructing subtle off-campus vignette masks with feathered -/// perimeter highlighting to stylize non-campus map regions. -/// ============================================================================ - -import 'dart:convert'; -import 'package:arcgis_maps/arcgis_maps.dart'; -import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_basemaps.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart' show rootBundle; -import 'package:http/http.dart' as http; - -/// Service managing campus boundary geometry and vignette overlay graphic generation. -class EsriMapBoundaryService { - /// Singleton instance accessor. - static final EsriMapBoundaryService instance = EsriMapBoundaryService._(); - EsriMapBoundaryService._(); - - /// Asset bundle path for pre-packaged campus boundary JSON geometry. - static const String BOUNDARY_ASSET_PATH = 'assets/esri_map_assets/ucsd_boundary.json'; - - /// Live REST endpoint querying official UCSD campus boundary features (Layer 3). - static const String BOUNDARY_SERVICE_URL = - 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/AdministrationServices/Areas_and_Boundaries/MapServer/3/query?where=1%3D1&outFields=*&returnGeometry=true&outSR=4326&f=json'; - - List? _cachedPolygons; - - /// Loads and caches UC San Diego campus boundary [Polygon] geometries. - /// First attempts to read from bundled local asset, with live network fallback. - Future> loadCampusBoundaries() async { - if (_cachedPolygons != null && _cachedPolygons!.isNotEmpty) { - return _cachedPolygons!; - } - - String? jsonString; - - // 1. Attempt loading from bundled offline asset for instant startup - try { - jsonString = await rootBundle.loadString(BOUNDARY_ASSET_PATH); - } catch (e) { - debugPrint('Local boundary asset load failed ($e), falling back to remote endpoint...'); - } - - // 2. Fallback to live REST query if local asset was unavailable - if (jsonString == null || jsonString.isEmpty) { - try { - final response = await http.get(Uri.parse(BOUNDARY_SERVICE_URL)).timeout(const Duration(seconds: 6)); - if (response.statusCode == 200) { - jsonString = response.body; - } - } catch (e) { - debugPrint('Remote boundary fetch failed: $e'); - } - } - - if (jsonString == null || jsonString.isEmpty) { - return []; - } - - // 3. Deserialize JSON features into ArcGIS Polygon geometries - try { - final data = jsonDecode(jsonString) as Map; - final features = data['features'] as List? ?? []; - final polygons = []; - - for (final feature in features) { - final geometryMap = feature['geometry'] as Map?; - if (geometryMap != null && geometryMap['rings'] != null) { - final poly = Geometry.fromJson({ - 'rings': geometryMap['rings'], - 'spatialReference': {'wkid': 4326}, - }); - if (poly is Polygon) { - polygons.add(poly); - } - } - } - - _cachedPolygons = polygons; - return polygons; - } catch (e) { - debugPrint('Failed to parse boundary geometries: $e'); - return []; - } - } - - /// Constructs vignette overlay graphics (inverted off-campus mask + feathered perimeter lines). - /// - /// The inverted mask covers the region outside the campus perimeter with a soft translucent - /// tint, while multi-tiered feathered perimeter lines create a smooth aesthetic glow around - /// UC San Diego. - List createVignetteGraphics({ - required BasemapType basemapType, - required List campusBoundaries, - }) { - if (campusBoundaries.isEmpty) return []; - - final graphics = []; - - // Theme-specific color configuration - final (maskColor, primaryStrokeColor, glow1Color, glow2Color) = _getColorsForBasemap(basemapType); - - // ------------------------------------------------------------------------- - // 1. Inverted Mask (Dims off-campus areas, keeping campus 100% vibrant) - // ------------------------------------------------------------------------- - try { - // Large bounding box encompassing the world in WGS84 - final outerBox = Geometry.fromJson({ - 'rings': [ - [ - [-180.0, -85.0], - [-180.0, 85.0], - [180.0, 85.0], - [180.0, -85.0], - [-180.0, -85.0], - ], - ], - 'spatialReference': {'wkid': 4326}, - }); - - // Subtract all campus boundary polygons from the world box to create a cutout hole - Geometry maskedArea = outerBox; - for (final boundary in campusBoundaries) { - final diff = GeometryEngine.difference(geometry1: maskedArea, geometry2: boundary); - if (diff != null) { - maskedArea = diff; - } - } - - final maskSymbol = SimpleFillSymbol( - style: SimpleFillSymbolStyle.solid, - color: maskColor, - outline: null, - ); - - graphics.add(Graphic(geometry: maskedArea, symbol: maskSymbol)); - } catch (e) { - debugPrint('Error constructing inverted vignette mask: $e'); - } - - // ------------------------------------------------------------------------- - // 2. Feathered Perimeter Highlighting (Soft glow rings around campus boundary) - // ------------------------------------------------------------------------- - for (final boundary in campusBoundaries) { - try { - final polyline = boundary.toPolyline(); - - // Outer glow layer 2 (Widest, most diffuse feather ring - reduced by 60%) - graphics.add( - Graphic( - geometry: polyline, - symbol: SimpleLineSymbol( - style: SimpleLineSymbolStyle.solid, - color: glow2Color, - width: 3.2, - ), - ), - ); - - // Outer glow layer 1 (Medium feather ring - reduced by 60%) - graphics.add( - Graphic( - geometry: polyline, - symbol: SimpleLineSymbol( - style: SimpleLineSymbolStyle.solid, - color: glow1Color, - width: 1.8, - ), - ), - ); - - // Crisp primary boundary stroke (UCSD Navy / Brand Accent - reduced by 60%) - graphics.add( - Graphic( - geometry: polyline, - symbol: SimpleLineSymbol( - style: SimpleLineSymbolStyle.solid, - color: primaryStrokeColor, - width: 0.72, - ), - ), - ); - } catch (e) { - debugPrint('Error creating boundary perimeter lines: $e'); - } - } - - return graphics; - } - - /// Returns styling colors matched to the active [BasemapType]. - (Color mask, Color primaryStroke, Color glow1, Color glow2) _getColorsForBasemap(BasemapType type) { - switch (type) { - case BasemapType.dark: - return ( - const Color(0x38000000), // ~22% dark dimming - const Color(0xAA00629B), // Bright UCSD blue stroke - const Color(0x3500629B), // Medium blue glow - const Color(0x1500629B), // Diffuse blue glow - ); - - case BasemapType.satellite: - return ( - const Color(0x22000000), // ~13% soft vignette - const Color(0xCCFFCD00), // UCSD Gold stroke on satellite - const Color(0x40FFCD00), // Medium gold glow - const Color(0x18FFCD00), // Diffuse gold glow - ); - - case BasemapType.defaultMap: - case BasemapType.light: - default: - return ( - const Color(0x1F000000), // ~12% soft neutral dimming - const Color(0x9900629B), // UCSD Navy stroke - const Color(0x3000629B), // Medium navy glow - const Color(0x1200629B), // Diffuse navy glow - ); - } - } -} diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index b06449e2b..dc812f1cd 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -15,7 +15,6 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_s import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_auth_handler.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_basemap_factory.dart'; -import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_boundary_service.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_config_service.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_route_service.dart'; import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_search_service.dart'; @@ -53,10 +52,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // --------------------------------------------------------------------------- final _mapViewController = ArcGISMapView.createController(); late final ArcGISMap _map; - final _vignetteGraphicsOverlay = GraphicsOverlay(); final _graphicsOverlay = GraphicsOverlay(); final _routeGraphicsOverlay = GraphicsOverlay(); - List _campusBoundaries = []; final _searchController = TextEditingController(); final _fromController = TextEditingController(); @@ -218,8 +215,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.selectionProperties = SelectionProperties(color: const Color(0xFF34C759)); _mapViewController.interactionOptions.rotateEnabled = true; - final isVignetteOverlayMissing = !_mapViewController.graphicsOverlays.contains(_vignetteGraphicsOverlay); - if (isVignetteOverlayMissing) _mapViewController.graphicsOverlays.add(_vignetteGraphicsOverlay); final isGraphicsOverlayMissing = !_mapViewController.graphicsOverlays.contains(_graphicsOverlay); if (isGraphicsOverlayMissing) _mapViewController.graphicsOverlays.add(_graphicsOverlay); final isRouteOverlayMissing = !_mapViewController.graphicsOverlays.contains(_routeGraphicsOverlay); @@ -230,7 +225,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.locationDisplay.autoPanMode = LocationDisplayAutoPanMode.off; _startLocationDisplay(); - _initCampusBoundaryVignette(); _preloadAlternateBasemaps(); _preloadHeavyLayers(); @@ -354,29 +348,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } - /// Loads campus boundary polygons and renders the stylized off-campus vignette mask. - Future _initCampusBoundaryVignette() async { - try { - final boundaries = await EsriMapBoundaryService.instance.loadCampusBoundaries(); - if (!mounted || boundaries.isEmpty) return; - _campusBoundaries = boundaries; - _updateVignetteGraphics(); - } catch (e) { - debugPrint('Failed to load campus boundary vignette: $e'); - } - } - - /// Updates vignette graphics based on the current basemap theme (Default, Light, Dark, Satellite). - void _updateVignetteGraphics() { - if (_campusBoundaries.isEmpty) return; - final graphics = EsriMapBoundaryService.instance.createVignetteGraphics( - basemapType: _currentBasemapType, - campusBoundaries: _campusBoundaries, - ); - _vignetteGraphicsOverlay.graphics.clear(); - _vignetteGraphicsOverlay.graphics.addAll(graphics); - } - /// Switches active basemap without resetting viewpoint frame. void _switchBasemap(BasemapType newType) { final isSameType = newType == _currentBasemapType; @@ -389,7 +360,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _map.basemap = newBasemap; _map.maxScale = 38.4; _currentBasemapType = newType; - _updateVignetteGraphics(); }); } diff --git a/test/core/services/esrimap_boundary_service_test.dart b/test/core/services/esrimap_boundary_service_test.dart deleted file mode 100644 index 81a45d60d..000000000 --- a/test/core/services/esrimap_boundary_service_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'dart:convert'; -import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_basemaps.dart'; -import 'package:campus_mobile_experimental/core/services/esri_map_services/esrimap_boundary_service.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_test/flutter_test.dart'; - -void main() { - TestWidgetsFlutterBinding.ensureInitialized(); - - group('EsriMapBoundaryService & Campus Boundary Asset', () { - test('ucsd_boundary.json asset is present and contains valid polygon rings', () async { - final jsonString = await rootBundle.loadString(EsriMapBoundaryService.BOUNDARY_ASSET_PATH); - expect(jsonString, isNotEmpty); - - final data = jsonDecode(jsonString) as Map; - final features = data['features'] as List?; - expect(features, isNotNull); - expect(features!.isNotEmpty, isTrue); - - // Verify that features contain geometry with coordinates / rings - for (final feature in features) { - final geometry = (feature as Map)['geometry'] as Map?; - expect(geometry, isNotNull); - final rings = geometry!['rings'] as List?; - expect(rings, isNotNull); - expect(rings!.isNotEmpty, isTrue); - } - }); - - test('createVignetteGraphics returns empty list when given empty boundaries', () { - final graphics = EsriMapBoundaryService.instance.createVignetteGraphics( - basemapType: BasemapType.defaultMap, - campusBoundaries: [], - ); - expect(graphics, isEmpty); - }); - - test('Boundary service constants are configured properly', () { - expect(EsriMapBoundaryService.BOUNDARY_ASSET_PATH, 'assets/esri_map_assets/ucsd_boundary.json'); - expect( - EsriMapBoundaryService.BOUNDARY_SERVICE_URL, - contains('Areas_and_Boundaries/MapServer/3'), - ); - }); - }); -} From 42e41b6f662bf1a1f7622aeb72143dc67a0bbef7 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 12:14:21 -0700 Subject: [PATCH 065/139] added max zoom out level --- lib/ui/esrimap/esrimap.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index dc812f1cd..8ef64dde7 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -199,7 +199,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } _map = ArcGISMap.withBasemap(_basemaps[_currentBasemapType]!); - _map.maxScale = 38.4; // Limit zoom to scale 1:38.4 (~23.88 max zoom level) + _map.maxScale = 38.4; // Limit zoom in to scale 1:38.4 (~23.88 max zoom level) + _map.minScale = 158846130.2; // Limit zoom out to scale 1:158846130.2 (~1.90 min zoom level) _map.initialViewpoint = Viewpoint.fromCenter( ArcGISPoint(x: -117.2340, y: 32.8801, spatialReference: SpatialReference.wgs84), scale: 24000, @@ -359,6 +360,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { setState(() { _map.basemap = newBasemap; _map.maxScale = 38.4; + _map.minScale = 158846130.2; _currentBasemapType = newType; }); } From b2cb0ab1c46e60690976595889e0babf5e3bd828 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 12:35:05 -0700 Subject: [PATCH 066/139] fixed max zoom --- lib/ui/esrimap/esrimap.dart | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 8ef64dde7..7dbd4dce2 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -104,6 +104,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { bool _ignoreViewpointReset = false; double _mapRotation = 0.0; double _currentScale = 24000.0; + bool _isDisposed = false; StreamSubscription? _viewpointChangedSubscription; // Routing State @@ -200,7 +201,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _map = ArcGISMap.withBasemap(_basemaps[_currentBasemapType]!); _map.maxScale = 38.4; // Limit zoom in to scale 1:38.4 (~23.88 max zoom level) - _map.minScale = 158846130.2; // Limit zoom out to scale 1:158846130.2 (~1.90 min zoom level) + _map.minScale = 70000000.0; // Limit zoom out to scale 1:70000000.0 (~3.08 min zoom level) + _map.maxExtent = Envelope.fromXY( + xMin: -180.0, + yMin: -55.0, + xMax: 180.0, + yMax: 55.0, + spatialReference: SpatialReference.wgs84, + ); _map.initialViewpoint = Viewpoint.fromCenter( ArcGISPoint(x: -117.2340, y: 32.8801, spatialReference: SpatialReference.wgs84), scale: 24000, @@ -239,6 +247,17 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Print current zoom scale and estimated level in PINK ANSI color (\x1B[38;2;255;105;180m) debugPrint('\x1B[38;2;255;105;180m🔍 [MAP ZOOM] Scale: 1:${scale.toStringAsFixed(1)} | Zoom Level: ~${zoomLevel.toStringAsFixed(2)}\x1B[0m'); + // Print current center coordinates in GREEN ANSI color (\x1B[38;2;46;204;113m) + final centerPoint = vp.targetGeometry as ArcGISPoint?; + if (centerPoint != null) { + final wgs84Point = centerPoint.spatialReference == SpatialReference.wgs84 + ? centerPoint + : (GeometryEngine.project(centerPoint, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?); + final xVal = wgs84Point?.x ?? centerPoint.x; + final yVal = wgs84Point?.y ?? centerPoint.y; + debugPrint('\x1B[38;2;46;204;113m📍 [MAP LOCATION] X: ${xVal.toStringAsFixed(6)}, Y: ${yVal.toStringAsFixed(6)}\x1B[0m'); + } + setState(() { _mapRotation = vp.rotation; _currentScale = scale; @@ -360,7 +379,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { setState(() { _map.basemap = newBasemap; _map.maxScale = 38.4; - _map.minScale = 158846130.2; + _map.minScale = 70000000.0; + _map.maxExtent = Envelope.fromXY( + xMin: -180.0, + yMin: -55.0, + xMax: 180.0, + yMax: 55.0, + spatialReference: SpatialReference.wgs84, + ); _currentBasemapType = newType; }); } From b49285333a5553c6c99d2bb12d67a6c6a242a96a Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 12:49:53 -0700 Subject: [PATCH 067/139] added buttons highlight fix and code to remove the licence watermark --- lib/main.dart | 11 +++++++++++ lib/ui/esrimap/esrimap.dart | 18 ++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 4413f7367..a53b2ec3d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -39,6 +39,17 @@ void main() async { // dotenv loading await dotenv.load(isOptional: true); + // Uncomment to remove the "Licensed for Developer Use Only" watermark in the ESRI Map + // final esriApiKey = dotenv.env['ESRI_API_KEY']; + // if (esriApiKey != null && esriApiKey.isNotEmpty) { + // ArcGISEnvironment.apiKey = esriApiKey; + // } + // + // final esriLicenseKey = dotenv.env['ESRI_LICENSE_KEY']; + // if (esriLicenseKey != null && esriLicenseKey.isNotEmpty) { + // ArcGISEnvironment.setLicense(esriLicenseKey); + // } + /// Enable crash analytics - https://firebase.flutter.dev/docs/crashlytics/usage#toggle-crashlytics-collection await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true); diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 7dbd4dce2..79e2054c6 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1202,8 +1202,13 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { scale: 10000, ), ); - Future.delayed(const Duration(milliseconds: 1500), () { - if (mounted) _ignoreViewpointReset = false; + Future.delayed(const Duration(milliseconds: 600), () { + if (mounted) { + setState(() { + _ignoreViewpointReset = false; + _isLocationActive = false; + }); + } }); } catch (e) { debugPrint('Location error: $e'); @@ -1215,8 +1220,13 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { void _recenterOnView() { _ignoreViewpointReset = true; setState(() => _isRecenterActive = true); - Future.delayed(const Duration(milliseconds: 1500), () { - if (mounted) _ignoreViewpointReset = false; + Future.delayed(const Duration(milliseconds: 600), () { + if (mounted) { + setState(() { + _ignoreViewpointReset = false; + _isRecenterActive = false; + }); + } }); final isNotDefaultScene = _sceneMode != 'default'; From c6becefff23a96d629299d0ab336f55541851380 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 13:04:58 -0700 Subject: [PATCH 068/139] Improved the center on me button --- .../esrimap/esri_map_widgets/esrimap_fab.dart | 120 +++++++++++++----- lib/ui/esrimap/esrimap.dart | 27 ++-- 2 files changed, 108 insertions(+), 39 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index 7e1050cad..9cda5d363 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -64,14 +64,21 @@ class EsriMapFabCluster extends StatelessWidget { final bgColor = isDark ? Colors.grey[800]! : Colors.white; final fgColor = isDark ? Colors.white : Colors.grey[800]!; - final locationColor = isLocationActive ? ACTIVE_COLOR : fgColor; final recenterColor = isRecenterActive ? ACTIVE_COLOR : fgColor; - final isNot3D = !is3D; - + return Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, children: [ + // Map displays (Layers) + _circleButton( + icon: Icons.layers_outlined, + color: fgColor, + bgColor: bgColor, + onTap: onShowLayersPanel, + ), + const SizedBox(height: 10), + // Compass needle button Material( elevation: 4, @@ -97,38 +104,91 @@ class EsriMapFabCluster extends StatelessWidget { ), ), const SizedBox(height: 10), - // Pill container with action buttons - Material( - elevation: 4, - color: bgColor, - borderRadius: BorderRadius.circular(SIZE / 2), - clipBehavior: Clip.antiAlias, - child: SizedBox( - width: SIZE, - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 4), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - if (isNot3D) _pillButton(icon: Icons.my_location, color: locationColor, onTap: onRecenterOnUser), - _pillButton(icon: Icons.center_focus_strong, color: recenterColor, onTap: onRecenterOnView), - _pillButton(icon: Icons.layers_outlined, color: fgColor, onTap: onShowLayersPanel), - ], - ), - ), - ), + + // Center Map (Center on Campus) + _circleButton( + icon: Icons.center_focus_strong, + color: recenterColor, + bgColor: bgColor, + onTap: onRecenterOnView, ), ], ); } - Widget _pillButton({required IconData icon, required Color color, required VoidCallback onTap}) { - return GestureDetector( - onTap: onTap, - behavior: HitTestBehavior.opaque, - child: SizedBox( - height: BTN_HEIGHT, - child: Center(child: Icon(icon, size: 22, color: color)), + Widget _circleButton({ + required IconData icon, + required Color color, + required Color bgColor, + required VoidCallback onTap, + }) { + return Material( + elevation: 4, + color: bgColor, + shape: const CircleBorder(), + clipBehavior: Clip.antiAlias, + child: InkWell( + onTap: onTap, + child: SizedBox( + width: SIZE, + height: SIZE, + child: Center(child: Icon(icon, size: 22, color: color)), + ), + ), + ); + } +} + +/// Floating action button for "Center on Me" rendered in bottom-right of map view. +class EsriMapLocationFab extends StatelessWidget { + final bool isDark; + final bool isLocationActive; + final VoidCallback onRecenterOnUser; + + const EsriMapLocationFab({ + Key? key, + required this.isDark, + this.isLocationActive = false, + required this.onRecenterOnUser, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + final bgColor = isDark ? Colors.grey[800]! : Colors.white; + final fgColor = isDark ? Colors.white : Colors.grey[800]!; + + // Inactive state uses the compass needle icon (Icons.explore_outlined) + // Active state uses a custom blue dot container with a white border and light blue background. + final activeBgColor = isDark ? Colors.blue[900]!.withValues(alpha: 0.5) : const Color(0xFFE8F0FE); + final currentBgColor = isLocationActive ? bgColor : activeBgColor; + + return Material( + elevation: 4, + color: currentBgColor, + shape: const CircleBorder(), + clipBehavior: Clip.antiAlias, + child: InkWell( + onTap: onRecenterOnUser, + child: SizedBox( + width: EsriMapFabCluster.SIZE, + height: EsriMapFabCluster.SIZE, + child: Center( + child: isLocationActive + ? Icon(Icons.explore_outlined, size: 26, color: fgColor) + : Container( + width: 14, + height: 14, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.blue[600], + border: Border.all(color: Colors.white, width: 2), + boxShadow: [ + BoxShadow(color: Colors.black.withValues(alpha: 0.2), blurRadius: 2) + ], + ), + ), + ), + ), ), ); } diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 79e2054c6..445233be3 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1196,20 +1196,17 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _ignoreViewpointReset = true; setState(() => _isLocationActive = true); - _mapViewController.setViewpointAnimated( + await _mapViewController.setViewpointAnimated( Viewpoint.fromCenter( ArcGISPoint(x: location.longitude, y: location.latitude, spatialReference: SpatialReference.wgs84), scale: 10000, ), ); - Future.delayed(const Duration(milliseconds: 600), () { - if (mounted) { - setState(() { - _ignoreViewpointReset = false; - _isLocationActive = false; - }); - } - }); + if (mounted) { + setState(() { + _ignoreViewpointReset = false; + }); + } } catch (e) { debugPrint('Location error: $e'); if (!mounted) return; @@ -1843,6 +1840,18 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { onSnapToNorth: _snapToNorth, ), ), + + // Bottom-right center-on-me button + if (isFabVisible && _sceneMode == 'default') + Positioned( + bottom: 100, + right: 16, + child: EsriMapLocationFab( + isDark: isDark, + isLocationActive: _isLocationActive, + onRecenterOnUser: _recenterOnUser, + ), + ), // Floating top search bar & suggestion panel if (FeatureFlags.mapSearchEnabled && isDefaultScene) From 595c99dbacb768354c4ed347a2989dfc1e295b25 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 13:07:55 -0700 Subject: [PATCH 069/139] Rearranged map buttons --- .../esrimap/esri_map_widgets/esrimap_fab.dart | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index 9cda5d363..967b01c6b 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -70,15 +70,6 @@ class EsriMapFabCluster extends StatelessWidget { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, children: [ - // Map displays (Layers) - _circleButton( - icon: Icons.layers_outlined, - color: fgColor, - bgColor: bgColor, - onTap: onShowLayersPanel, - ), - const SizedBox(height: 10), - // Compass needle button Material( elevation: 4, @@ -112,6 +103,15 @@ class EsriMapFabCluster extends StatelessWidget { bgColor: bgColor, onTap: onRecenterOnView, ), + const SizedBox(height: 10), + + // Map displays (Layers) + _circleButton( + icon: Icons.layers_outlined, + color: fgColor, + bgColor: bgColor, + onTap: onShowLayersPanel, + ), ], ); } From 91db7c7e52ccd905120df54655d5c64cdad0879f Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 13:36:36 -0700 Subject: [PATCH 070/139] Created the center on campus icon to make the button more explicit --- assets/esri_map_assets/Center-Trident.svg | 119 ++++++++++++++++++ .../esrimap/esri_map_widgets/esrimap_fab.dart | 20 ++- 2 files changed, 136 insertions(+), 3 deletions(-) create mode 100644 assets/esri_map_assets/Center-Trident.svg diff --git a/assets/esri_map_assets/Center-Trident.svg b/assets/esri_map_assets/Center-Trident.svg new file mode 100644 index 000000000..b27fc3844 --- /dev/null +++ b/assets/esri_map_assets/Center-Trident.svg @@ -0,0 +1,119 @@ + + + + + + + + diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index 967b01c6b..59dd6b4e9 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -6,6 +6,7 @@ import 'dart:math' as math; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; /// Floating action button cluster widget rendered in top-right of map view. class EsriMapFabCluster extends StatelessWidget { @@ -98,7 +99,7 @@ class EsriMapFabCluster extends StatelessWidget { // Center Map (Center on Campus) _circleButton( - icon: Icons.center_focus_strong, + svgAsset: 'assets/esri_map_assets/Center-Trident.svg', color: recenterColor, bgColor: bgColor, onTap: onRecenterOnView, @@ -117,11 +118,24 @@ class EsriMapFabCluster extends StatelessWidget { } Widget _circleButton({ - required IconData icon, + IconData? icon, + String? svgAsset, required Color color, required Color bgColor, required VoidCallback onTap, }) { + Widget iconWidget; + if (svgAsset != null) { + iconWidget = SvgPicture.asset( + svgAsset, + width: 22, + height: 22, + colorFilter: ColorFilter.mode(color, BlendMode.srcIn), + ); + } else { + iconWidget = Icon(icon, size: 22, color: color); + } + return Material( elevation: 4, color: bgColor, @@ -132,7 +146,7 @@ class EsriMapFabCluster extends StatelessWidget { child: SizedBox( width: SIZE, height: SIZE, - child: Center(child: Icon(icon, size: 22, color: color)), + child: Center(child: iconWidget), ), ), ); From 64c98b4553803e76dee0c83bede00dd17c5757ad Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 13:44:20 -0700 Subject: [PATCH 071/139] Completed center on me re-design --- .../esrimap/esri_map_widgets/esrimap_fab.dart | 100 ++++++++++++++---- lib/ui/esrimap/esrimap.dart | 58 ++++++++-- 2 files changed, 132 insertions(+), 26 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index 59dd6b4e9..d5d2720d5 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -157,12 +157,16 @@ class EsriMapFabCluster extends StatelessWidget { class EsriMapLocationFab extends StatelessWidget { final bool isDark; final bool isLocationActive; + final double? bearingToUser; + final double mapRotation; final VoidCallback onRecenterOnUser; const EsriMapLocationFab({ Key? key, required this.isDark, this.isLocationActive = false, + this.bearingToUser, + this.mapRotation = 0.0, required this.onRecenterOnUser, }) : super(key: key); @@ -171,14 +175,67 @@ class EsriMapLocationFab extends StatelessWidget { final bgColor = isDark ? Colors.grey[800]! : Colors.white; final fgColor = isDark ? Colors.white : Colors.grey[800]!; - // Inactive state uses the compass needle icon (Icons.explore_outlined) - // Active state uses a custom blue dot container with a white border and light blue background. final activeBgColor = isDark ? Colors.blue[900]!.withValues(alpha: 0.5) : const Color(0xFFE8F0FE); - final currentBgColor = isLocationActive ? bgColor : activeBgColor; + + Widget iconWidget; + if (isLocationActive || bearingToUser != null) { + double totalRotation = 0; + if (!isLocationActive && bearingToUser != null) { + final mapRotRad = mapRotation * math.pi / 180.0; + totalRotation = bearingToUser! - mapRotRad; + } + + iconWidget = Stack( + alignment: Alignment.center, + children: [ + // Light blue halo + Container( + width: 30, + height: 30, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: activeBgColor, + ), + ), + // Directional Triangle (only if inactive) + if (!isLocationActive && bearingToUser != null) + Transform.rotate( + angle: totalRotation, + child: Container( + width: 30, + height: 30, + alignment: Alignment.topCenter, + child: Padding( + padding: const EdgeInsets.only(top: 2.0), + child: CustomPaint( + size: const Size(10, 8), + painter: _DirectionArrowPainter(color: Colors.blue[600]!), + ), + ), + ), + ), + // The blue dot + Container( + width: 16, + height: 16, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.blue[600], + border: Border.all(color: Colors.white, width: 2.5), + boxShadow: [ + BoxShadow(color: Colors.black.withValues(alpha: 0.2), blurRadius: 2) + ], + ), + ), + ], + ); + } else { + iconWidget = Icon(Icons.explore_outlined, size: 26, color: fgColor); + } return Material( elevation: 4, - color: currentBgColor, + color: bgColor, shape: const CircleBorder(), clipBehavior: Clip.antiAlias, child: InkWell( @@ -187,20 +244,7 @@ class EsriMapLocationFab extends StatelessWidget { width: EsriMapFabCluster.SIZE, height: EsriMapFabCluster.SIZE, child: Center( - child: isLocationActive - ? Icon(Icons.explore_outlined, size: 26, color: fgColor) - : Container( - width: 14, - height: 14, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: Colors.blue[600], - border: Border.all(color: Colors.white, width: 2), - boxShadow: [ - BoxShadow(color: Colors.black.withValues(alpha: 0.2), blurRadius: 2) - ], - ), - ), + child: iconWidget, ), ), ), @@ -208,6 +252,26 @@ class EsriMapLocationFab extends StatelessWidget { } } +class _DirectionArrowPainter extends CustomPainter { + final Color color; + _DirectionArrowPainter({required this.color}); + + @override + void paint(Canvas canvas, Size size) { + final path = Path() + ..moveTo(size.width / 2, 0) + ..lineTo(size.width, size.height) + ..lineTo(0, size.height) + ..close(); + canvas.drawPath(path, Paint()..color = color); + } + + @override + bool shouldRepaint(covariant _DirectionArrowPainter oldDelegate) { + return oldDelegate.color != color; + } +} + class _CompassNeedlePainter extends CustomPainter { final double rotationDegrees; final Color southColor; diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 445233be3..cd3cf9af7 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -140,9 +140,24 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { EsriSceneWidget? _sceneDroneWidget; final _scene3DKey = GlobalKey(); final _sceneDroneKey = GlobalKey(); + + (double lat, double lng)? _currentMapCenter; final _mapReadyCompleter = Completer(); + double _calculateBearing(double startLat, double startLng, double endLat, double endLng) { + final startLatRad = startLat * math.pi / 180; + final startLngRad = startLng * math.pi / 180; + final endLatRad = endLat * math.pi / 180; + final endLngRad = endLng * math.pi / 180; + + final dLng = endLngRad - startLngRad; + final y = math.sin(dLng) * math.cos(endLatRad); + final x = math.cos(startLatRad) * math.sin(endLatRad) - + math.sin(startLatRad) * math.cos(endLatRad) * math.cos(dLng); + return math.atan2(y, x); + } + /// Returns list of mapped search categories constructed from server configuration. List get _categories { final isConfigNull = _config == null; @@ -261,6 +276,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { setState(() { _mapRotation = vp.rotation; _currentScale = scale; + if (centerPoint != null) { + final wgs84Point = centerPoint.spatialReference == SpatialReference.wgs84 + ? centerPoint + : (GeometryEngine.project(centerPoint, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?); + final xVal = wgs84Point?.x ?? centerPoint.x; + final yVal = wgs84Point?.y ?? centerPoint.y; + _currentMapCenter = (yVal, xVal); + } final shouldResetVP = !_ignoreViewpointReset && (_isLocationActive || _isRecenterActive); if (shouldResetVP) { _isLocationActive = false; @@ -1843,14 +1866,33 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Bottom-right center-on-me button if (isFabVisible && _sceneMode == 'default') - Positioned( - bottom: 100, - right: 16, - child: EsriMapLocationFab( - isDark: isDark, - isLocationActive: _isLocationActive, - onRecenterOnUser: _recenterOnUser, - ), + Builder( + builder: (context) { + double? bearing; + if (!_isLocationActive && _currentMapCenter != null) { + final userLoc = _getUserLatLng(); + if (userLoc != null) { + final mapLat = _currentMapCenter!.$1; + final mapLng = _currentMapCenter!.$2; + final userLat = userLoc.$1; + final userLng = userLoc.$2; + // Bearing pointing FROM map center TO user location + bearing = _calculateBearing(mapLat, mapLng, userLat, userLng); + } + } + + return Positioned( + bottom: 100, + right: 16, + child: EsriMapLocationFab( + isDark: isDark, + isLocationActive: _isLocationActive, + bearingToUser: bearing, + mapRotation: _mapRotation, + onRecenterOnUser: _recenterOnUser, + ), + ); + } ), // Floating top search bar & suggestion panel From d2f3fc123ec7a595a4a656e63e23c9017ae339c7 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 13:56:44 -0700 Subject: [PATCH 072/139] cleaned up 'Map Displays' UI --- .../esrimap/esri_map_widgets/esrimap_fab.dart | 64 ++++++++++++++++++- .../esrimap_layers_panel.dart | 48 +++++++------- 2 files changed, 86 insertions(+), 26 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index d5d2720d5..a37c24324 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -108,7 +108,10 @@ class EsriMapFabCluster extends StatelessWidget { // Map displays (Layers) _circleButton( - icon: Icons.layers_outlined, + customIcon: CustomPaint( + size: const Size(20, 20), + painter: _MapDisplaysIconPainter(color: fgColor), + ), color: fgColor, bgColor: bgColor, onTap: onShowLayersPanel, @@ -120,12 +123,15 @@ class EsriMapFabCluster extends StatelessWidget { Widget _circleButton({ IconData? icon, String? svgAsset, + Widget? customIcon, required Color color, required Color bgColor, required VoidCallback onTap, }) { Widget iconWidget; - if (svgAsset != null) { + if (customIcon != null) { + iconWidget = customIcon; + } else if (svgAsset != null) { iconWidget = SvgPicture.asset( svgAsset, width: 22, @@ -153,6 +159,60 @@ class EsriMapFabCluster extends StatelessWidget { } } +class _MapDisplaysIconPainter extends CustomPainter { + final Color color; + _MapDisplaysIconPainter({required this.color}); + + @override + void paint(Canvas canvas, Size size) { + final paint = Paint() + ..color = color + ..style = PaintingStyle.stroke + ..strokeWidth = 2.0 + ..strokeJoin = StrokeJoin.miter + ..strokeCap = StrokeCap.square; + + final double w = size.width; + final double h = size.height; + + final path = Path(); + + // Top Diamond + // Stop the diamond much earlier to leave a clear gap for the + sign + path.moveTo(w * 0.40, h * 0.20); // Start at top, slightly left + path.lineTo(w * 0.15, h * 0.40); // Down-left to left point + path.lineTo(w * 0.50, h * 0.65); // Down-right to bottom point + path.lineTo(w * 0.70, h * 0.50); // Up-right, stopping early + + // Bottom Diamond (V shape) + path.moveTo(w * 0.15, h * 0.60); // Left start + path.lineTo(w * 0.50, h * 0.85); // Bottom point + path.lineTo(w * 0.85, h * 0.60); // Right end + + canvas.drawPath(path, paint); + + // Plus sign + // Positioned solidly in the top right + final cx = w * 0.80; + final cy = h * 0.20; + final r = w * 0.14; + + final plusPaint = Paint() + ..color = color + ..style = PaintingStyle.stroke + ..strokeWidth = 2.0 + ..strokeCap = StrokeCap.square; + + canvas.drawLine(Offset(cx - r, cy), Offset(cx + r, cy), plusPaint); + canvas.drawLine(Offset(cx, cy - r), Offset(cx, cy + r), plusPaint); + } + + @override + bool shouldRepaint(covariant _MapDisplaysIconPainter oldDelegate) { + return oldDelegate.color != color; + } +} + /// Floating action button for "Center on Me" rendered in bottom-right of map view. class EsriMapLocationFab extends StatelessWidget { final bool isDark; diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index f661d3c23..e72b617c0 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -65,10 +65,10 @@ class EsriMapLayersPanel extends StatelessWidget { final accent = isDark ? Colors.lightBlue[300]! : Theme.of(context).colorScheme.primary; Widget sectionLabel(String text) => Padding( - padding: const EdgeInsets.fromLTRB(16, 12, 16, 8), + padding: const EdgeInsets.fromLTRB(16, 14, 16, 8), child: Text( text, - style: TextStyle(fontSize: 11, fontWeight: FontWeight.w700, letterSpacing: 0.8, color: subtitleColor), + style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: textColor), ), ); @@ -172,25 +172,6 @@ class EsriMapLayersPanel extends StatelessWidget { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - // Header - Padding( - padding: const EdgeInsets.fromLTRB(16, 14, 8, 0), - child: Row( - children: [ - Expanded( - child: Text( - 'Map Display', - style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: textColor), - ), - ), - IconButton( - icon: Icon(Icons.close, size: 20, color: subtitleColor), - onPressed: onClose, - ), - ], - ), - ), - // Basemap + Layers — grayed out when not in default 2D scene Opacity( opacity: isDefault ? 1.0 : 0.35, @@ -199,7 +180,26 @@ class EsriMapLayersPanel extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - sectionLabel('BASEMAP'), + // Map Type Header (with Close Button) + Padding( + padding: const EdgeInsets.fromLTRB(16, 14, 8, 8), + child: Row( + children: [ + Expanded( + child: Text( + 'Map Type', + style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: textColor), + ), + ), + IconButton( + icon: Icon(Icons.close, size: 20, color: subtitleColor), + onPressed: onClose, + padding: EdgeInsets.zero, + constraints: const BoxConstraints(), + ), + ], + ), + ), Padding( padding: const EdgeInsets.symmetric(horizontal: 12), child: SingleChildScrollView( @@ -232,7 +232,7 @@ class EsriMapLayersPanel extends StatelessWidget { if (FeatureFlags.mapOperationalLayersEnabled) ...[ const Divider(height: 24, indent: 16, endIndent: 16), - sectionLabel('LAYERS'), + sectionLabel('Map Details'), Padding( padding: const EdgeInsets.symmetric(horizontal: 12), child: SingleChildScrollView( @@ -271,7 +271,7 @@ class EsriMapLayersPanel extends StatelessWidget { // Scene chips — gated by features flag, hidden when slide-over is active if (showSceneSwitcher) ...[ const Divider(height: 24, indent: 16, endIndent: 16), - sectionLabel('SCENE'), + sectionLabel('Scene'), Padding( padding: const EdgeInsets.fromLTRB(12, 0, 12, 20), child: Wrap( From 0319638b5ea8f23ebd96cde2746caee6a3764235 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 13:59:48 -0700 Subject: [PATCH 073/139] made displays 20% bigger --- .../esri_map_widgets/esrimap_layers_panel.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index e72b617c0..937a6c0e5 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -82,36 +82,36 @@ class EsriMapLayersPanel extends StatelessWidget { return GestureDetector( onTap: onTap, child: SizedBox( - width: 72, + width: 86, child: Column( mainAxisSize: MainAxisSize.min, children: [ Container( - width: 56, - height: 56, + width: 68, + height: 68, decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), + borderRadius: BorderRadius.circular(10), border: selected ? Border.all(color: accent, width: 2.5) : Border.all(color: isDark ? Colors.grey[700]! : Colors.grey[300]!, width: 1), ), child: ClipRRect( - borderRadius: BorderRadius.circular(6.5), + borderRadius: BorderRadius.circular(8.5), child: loading ? const Center( - child: SizedBox(width: 22, height: 22, child: CircularProgressIndicator(strokeWidth: 2)), + child: SizedBox(width: 26, height: 26, child: CircularProgressIndicator(strokeWidth: 2)), ) : (imageWidget ?? Container(color: isDark ? Colors.grey[700] : Colors.grey[300])), ), ), - const SizedBox(height: 5), + const SizedBox(height: 6), Text( label, textAlign: TextAlign.center, maxLines: 2, overflow: TextOverflow.ellipsis, style: TextStyle( - fontSize: 11, + fontSize: 13, fontWeight: selected ? FontWeight.w700 : FontWeight.w400, color: selected ? accent : textColor, ), From eb9d29db0d5eb847f77ffb42aff42ea35bb71f5e Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 14:04:12 -0700 Subject: [PATCH 074/139] reduced FPS to about 30 for a smoother experience --- lib/ui/esrimap/esrimap.dart | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index cd3cf9af7..7bc752430 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -253,25 +253,20 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _preloadHeavyLayers(); // Track map heading rotation and zoom level changes + DateTime? lastUpdateTime; + _viewpointChangedSubscription = _mapViewController.onViewpointChanged.listen((_) { + final now = DateTime.now(); + if (lastUpdateTime != null && now.difference(lastUpdateTime!).inMilliseconds < 32) { + return; // Throttle to ~30 FPS to prevent heavy jitter + } + lastUpdateTime = now; + final vp = _mapViewController.getCurrentViewpoint(ViewpointType.centerAndScale); final isVpValid = vp != null && mounted; if (isVpValid) { final scale = vp.targetScale; - final zoomLevel = scale > 0 ? (math.log(591657550.5 / scale) / math.ln2) : 0.0; - // Print current zoom scale and estimated level in PINK ANSI color (\x1B[38;2;255;105;180m) - debugPrint('\x1B[38;2;255;105;180m🔍 [MAP ZOOM] Scale: 1:${scale.toStringAsFixed(1)} | Zoom Level: ~${zoomLevel.toStringAsFixed(2)}\x1B[0m'); - - // Print current center coordinates in GREEN ANSI color (\x1B[38;2;46;204;113m) final centerPoint = vp.targetGeometry as ArcGISPoint?; - if (centerPoint != null) { - final wgs84Point = centerPoint.spatialReference == SpatialReference.wgs84 - ? centerPoint - : (GeometryEngine.project(centerPoint, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?); - final xVal = wgs84Point?.x ?? centerPoint.x; - final yVal = wgs84Point?.y ?? centerPoint.y; - debugPrint('\x1B[38;2;46;204;113m📍 [MAP LOCATION] X: ${xVal.toStringAsFixed(6)}, Y: ${yVal.toStringAsFixed(6)}\x1B[0m'); - } setState(() { _mapRotation = vp.rotation; From 11e48c8f063d923723145334a2980804d39d869a Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Sat, 15 Aug 2026 14:08:30 -0700 Subject: [PATCH 075/139] satellite now uses ESRI's highly optimized global CDN so it loads faster and with more detail --- .../esri_map_services/esrimap_basemap_factory.dart | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart index c804c5ab1..0f155f0a1 100644 --- a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart +++ b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart @@ -16,15 +16,9 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_c /// Vector tiles scale seamlessly to building/room level (Level 22+) without tile cutoff watermarks. /// 2. Custom UC San Diego campus vector tile layers are layered directly on top to display campus-specific facilities. Basemap buildBasemap(BasemapType type, EsriMapConfig config) { - // 1. Satellite Basemap: Use global World Imagery layer. + // 1. Satellite Basemap: Use modern BasemapStyle for optimized CDN routing and faster raster loading. if (type == BasemapType.satellite) { - final basemap = Basemap(); - basemap.baseLayers.add( - ArcGISTiledLayer.withUri( - Uri.parse('https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer'), - ), - ); - return basemap; + return Basemap.withStyle(BasemapStyle.arcGISImagery); } final basemap = Basemap(); From cdaf1d97fed212630ad32b58a9c95d2726ccde2b Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Sat, 15 Aug 2026 21:15:34 +0000 Subject: [PATCH 076/139] style: auto fix formatting violations --- lib/app_networking.dart | 1 + lib/core/models/authentication.dart | 1 + lib/core/models/dining.dart | 1 + lib/core/models/speed_test.dart | 1 + lib/core/models/user_profile.dart | 1 + lib/core/providers/classes.dart | 8 ++-- lib/core/providers/dining.dart | 1 + lib/core/providers/location.dart | 1 + lib/core/providers/map.dart | 1 + lib/core/providers/notifications.dart | 11 +++-- .../providers/notifications_freefood.dart | 1 + lib/core/providers/shuttle.dart | 1 + lib/core/providers/speed_test.dart | 1 + lib/core/providers/user.dart | 1 + lib/core/services/availability.dart | 1 + lib/core/services/cards.dart | 1 + lib/core/services/classes.dart | 1 + lib/core/services/dining.dart | 1 + lib/core/services/employee_id.dart | 1 + .../esrimap_auth_handler.dart | 1 + .../esrimap_basemap_factory.dart | 21 ++-------- .../esrimap_config_service.dart | 1 + .../esrimap_search_service.dart | 1 + lib/core/services/events.dart | 1 + lib/core/services/map.dart | 1 + lib/core/services/messages.dart | 1 + lib/core/services/news.dart | 1 + lib/core/services/notices.dart | 1 + lib/core/services/notifications.dart | 1 + lib/core/services/parking.dart | 1 + lib/core/services/shuttle.dart | 1 + lib/core/services/speed_test.dart | 1 + lib/core/services/spot_types.dart | 1 + lib/core/services/student_id.dart | 1 + .../tgpt_services/chat_persistence.dart | 1 + .../tgpt_services/chat_session_creation.dart | 1 + lib/core/services/user.dart | 1 + lib/core/utils/webview.dart | 1 + lib/main.dart | 11 +++-- lib/ui/classes/classes_list.dart | 5 +-- lib/ui/common/base64_image_widget.dart | 1 + lib/ui/common/directions_helper.dart | 1 + lib/ui/common/webview_container.dart | 1 + lib/ui/dining/dining_detail_view.dart | 1 + .../esrimap_ai_search_sheet.dart | 1 + .../esrimap/esri_map_widgets/esrimap_fab.dart | 42 +++++++------------ .../esri_map_widgets/esrimap_scale_bar.dart | 21 ++++------ .../esri_map_widgets/esrimap_scene.dart | 1 + lib/ui/esrimap/esrimap.dart | 39 ++++++++--------- lib/ui/home/home.dart | 1 + lib/ui/map/map.dart | 1 + lib/ui/navigator/top.dart | 5 +-- lib/ui/news/news_list.dart | 7 +--- .../notifications_list_view.dart | 11 +++-- lib/ui/onboarding/onboarding_slides.dart | 1 + .../parking/circular_parking_indicator.dart | 12 +++--- lib/ui/parking/spot_types_view.dart | 6 +-- lib/ui/profile/cards.dart | 1 + lib/ui/profile/profile.dart | 1 + lib/ui/wifi/wifi_card.dart | 1 + 60 files changed, 126 insertions(+), 120 deletions(-) diff --git a/lib/app_networking.dart b/lib/app_networking.dart index f7026077a..bce80e2a4 100644 --- a/lib/app_networking.dart +++ b/lib/app_networking.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_constants.dart'; import 'package:campus_mobile_experimental/app_styles.dart'; import 'package:dio/dio.dart'; diff --git a/lib/core/models/authentication.dart b/lib/core/models/authentication.dart index a5eca9aac..844e98c92 100644 --- a/lib/core/models/authentication.dart +++ b/lib/core/models/authentication.dart @@ -1,4 +1,5 @@ import 'dart:convert'; + import 'package:hive/hive.dart'; part 'authentication.g.dart'; diff --git a/lib/core/models/dining.dart b/lib/core/models/dining.dart index e9373afd3..ec1621a88 100644 --- a/lib/core/models/dining.dart +++ b/lib/core/models/dining.dart @@ -1,4 +1,5 @@ import 'dart:convert'; + import 'package:campus_mobile_experimental/core/models/location.dart'; // To parse this JSON data, do diff --git a/lib/core/models/speed_test.dart b/lib/core/models/speed_test.dart index dd4f0d2c4..dd029f812 100644 --- a/lib/core/models/speed_test.dart +++ b/lib/core/models/speed_test.dart @@ -1,5 +1,6 @@ import 'dart:convert'; import 'dart:io'; + import 'package:wifi_connection/WifiInfo.dart'; class SpeedTestModel { diff --git a/lib/core/models/user_profile.dart b/lib/core/models/user_profile.dart index 5ed3f258c..419bf575e 100644 --- a/lib/core/models/user_profile.dart +++ b/lib/core/models/user_profile.dart @@ -1,4 +1,5 @@ import 'dart:convert'; + import 'package:hive/hive.dart'; part 'user_profile.g.dart'; diff --git a/lib/core/providers/classes.dart b/lib/core/providers/classes.dart index 3399cc820..c34facb66 100644 --- a/lib/core/providers/classes.dart +++ b/lib/core/providers/classes.dart @@ -216,9 +216,11 @@ class ClassScheduleDataProvider extends ChangeNotifier { /// if no classes are scheduled for today then find the next day with classes var daysToAdd = 1; while (_enrolledClasses[today]!.isEmpty && daysToAdd <= 7) { - today = DateFormat( - 'EEEE', - ).format(DateTime.now().add(Duration(days: daysToAdd))).toString().toUpperCase().substring(0, 2); + today = DateFormat('EEEE') + .format(DateTime.now().add(Duration(days: daysToAdd))) + .toString() + .toUpperCase() + .substring(0, 2); nextDayWithClass = DateFormat('EEEE').format(DateTime.now().add(Duration(days: daysToAdd))); daysToAdd += 1; } diff --git a/lib/core/providers/dining.dart b/lib/core/providers/dining.dart index e0e9864e9..bbe1e902a 100644 --- a/lib/core/providers/dining.dart +++ b/lib/core/providers/dining.dart @@ -1,4 +1,5 @@ import 'dart:math'; + import 'package:campus_mobile_experimental/app_constants.dart'; import 'package:campus_mobile_experimental/core/models/dining.dart'; import 'package:campus_mobile_experimental/core/models/location.dart'; diff --git a/lib/core/providers/location.dart b/lib/core/providers/location.dart index 947f523a5..bb0722319 100644 --- a/lib/core/providers/location.dart +++ b/lib/core/providers/location.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_constants.dart'; import 'package:campus_mobile_experimental/core/models/location.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/core/providers/map.dart b/lib/core/providers/map.dart index 79bc2d579..3f1d5b2f5 100644 --- a/lib/core/providers/map.dart +++ b/lib/core/providers/map.dart @@ -1,4 +1,5 @@ import 'dart:math'; + import 'package:campus_mobile_experimental/core/models/location.dart'; import 'package:campus_mobile_experimental/core/models/map.dart'; import 'package:campus_mobile_experimental/core/services/map.dart'; diff --git a/lib/core/providers/notifications.dart b/lib/core/providers/notifications.dart index e5ac28f0d..c0bb85eea 100644 --- a/lib/core/providers/notifications.dart +++ b/lib/core/providers/notifications.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'dart:io'; + import 'package:campus_mobile_experimental/app_constants.dart'; import 'package:campus_mobile_experimental/core/models/topics.dart'; import 'package:campus_mobile_experimental/core/providers/bottom_nav.dart'; @@ -143,9 +144,8 @@ class PushNotificationDataProvider extends ChangeNotifier { NavigatorConstants.NOTIFICATIONS_TAB; /// Navigate to Notifications tab - Navigator.of( - context, - ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of(context) + .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); }); } on PlatformException { _error = 'Failed to get platform info.'; @@ -159,9 +159,8 @@ class PushNotificationDataProvider extends ChangeNotifier { Provider.of(this.context, listen: false).fetchMessages(true); /// Navigate to Notifications tab - Navigator.of( - this.context, - ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of(this.context) + .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); /// Set tab bar index to the Notifications tab Provider.of(this.context, listen: false).currentIndex = diff --git a/lib/core/providers/notifications_freefood.dart b/lib/core/providers/notifications_freefood.dart index fc30b9208..d7d78862c 100644 --- a/lib/core/providers/notifications_freefood.dart +++ b/lib/core/providers/notifications_freefood.dart @@ -1,4 +1,5 @@ import 'dart:collection'; + import 'package:campus_mobile_experimental/app_constants.dart'; import 'package:campus_mobile_experimental/core/models/notifications.dart'; import 'package:campus_mobile_experimental/core/models/notifications_freefood.dart'; diff --git a/lib/core/providers/shuttle.dart b/lib/core/providers/shuttle.dart index aae9b5365..adcec697d 100644 --- a/lib/core/providers/shuttle.dart +++ b/lib/core/providers/shuttle.dart @@ -1,4 +1,5 @@ import 'dart:math' as Math; + import 'package:campus_mobile_experimental/core/models/location.dart'; import 'package:campus_mobile_experimental/core/models/shuttle_arrival.dart'; import 'package:campus_mobile_experimental/core/models/shuttle_stop.dart'; diff --git a/lib/core/providers/speed_test.dart b/lib/core/providers/speed_test.dart index cff411651..a556fc00a 100644 --- a/lib/core/providers/speed_test.dart +++ b/lib/core/providers/speed_test.dart @@ -1,5 +1,6 @@ import 'dart:convert'; import 'dart:io'; + import 'package:campus_mobile_experimental/app_constants.dart'; import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/location.dart'; diff --git a/lib/core/providers/user.dart b/lib/core/providers/user.dart index 367b4f97e..8b2a1287e 100644 --- a/lib/core/providers/user.dart +++ b/lib/core/providers/user.dart @@ -1,5 +1,6 @@ import 'dart:convert'; import 'dart:typed_data'; + import 'package:campus_mobile_experimental/app_provider.dart'; import 'package:campus_mobile_experimental/core/models/authentication.dart'; import 'package:campus_mobile_experimental/core/models/user_profile.dart'; diff --git a/lib/core/services/availability.dart b/lib/core/services/availability.dart index e14899b1f..bac385388 100644 --- a/lib/core/services/availability.dart +++ b/lib/core/services/availability.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/availability.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; diff --git a/lib/core/services/cards.dart b/lib/core/services/cards.dart index 8823d31b2..020a61d8a 100644 --- a/lib/core/services/cards.dart +++ b/lib/core/services/cards.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/cards.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; diff --git a/lib/core/services/classes.dart b/lib/core/services/classes.dart index 568cb7d59..84c97696b 100644 --- a/lib/core/services/classes.dart +++ b/lib/core/services/classes.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/classes.dart'; import 'package:campus_mobile_experimental/core/models/term.dart'; diff --git a/lib/core/services/dining.dart b/lib/core/services/dining.dart index 309173241..370d63975 100644 --- a/lib/core/services/dining.dart +++ b/lib/core/services/dining.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/dining.dart'; import 'package:campus_mobile_experimental/core/models/dining_menu.dart'; diff --git a/lib/core/services/employee_id.dart b/lib/core/services/employee_id.dart index 2132f081d..602a52e22 100644 --- a/lib/core/services/employee_id.dart +++ b/lib/core/services/employee_id.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/employee_id.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; diff --git a/lib/core/services/esri_map_services/esrimap_auth_handler.dart b/lib/core/services/esri_map_services/esrimap_auth_handler.dart index dee509f35..49c0f3aff 100644 --- a/lib/core/services/esri_map_services/esrimap_auth_handler.dart +++ b/lib/core/services/esri_map_services/esrimap_auth_handler.dart @@ -5,6 +5,7 @@ /// ============================================================================ import 'dart:convert'; + import 'package:arcgis_maps/arcgis_maps.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; diff --git a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart index 0f155f0a1..c5ef0f8f7 100644 --- a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart +++ b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart @@ -17,9 +17,7 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_c /// 2. Custom UC San Diego campus vector tile layers are layered directly on top to display campus-specific facilities. Basemap buildBasemap(BasemapType type, EsriMapConfig config) { // 1. Satellite Basemap: Use modern BasemapStyle for optimized CDN routing and faster raster loading. - if (type == BasemapType.satellite) { - return Basemap.withStyle(BasemapStyle.arcGISImagery); - } + if (type == BasemapType.satellite) return Basemap.withStyle(BasemapStyle.arcGISImagery); final basemap = Basemap(); @@ -34,10 +32,7 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { basemap.baseLayers.add( ArcGISVectorTiledLayer.withItem( - PortalItem.withPortalAndItemId( - portal: Portal.arcGISOnline(), - itemId: globalBaseItemId, - ), + PortalItem.withPortalAndItemId(portal: Portal.arcGISOnline(), itemId: globalBaseItemId), ), ); @@ -55,12 +50,7 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { if (pUrl != null && layer.itemId != null) { final portal = pUrl.contains('arcgis.com') ? Portal.arcGISOnline() : Portal(Uri.parse(pUrl)); basemap.baseLayers.add( - ArcGISVectorTiledLayer.withItem( - PortalItem.withPortalAndItemId( - portal: portal, - itemId: layer.itemId!, - ), - ), + ArcGISVectorTiledLayer.withItem(PortalItem.withPortalAndItemId(portal: portal, itemId: layer.itemId!)), ); } } @@ -74,10 +64,7 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { basemap.baseLayers.add( ArcGISVectorTiledLayer.withItem( - PortalItem.withPortalAndItemId( - portal: Portal(Uri.parse(portalUrl)), - itemId: fallbackItemId, - ), + PortalItem.withPortalAndItemId(portal: Portal(Uri.parse(portalUrl)), itemId: fallbackItemId), ), ); } diff --git a/lib/core/services/esri_map_services/esrimap_config_service.dart b/lib/core/services/esri_map_services/esrimap_config_service.dart index f45907ad5..31e55800a 100644 --- a/lib/core/services/esri_map_services/esrimap_config_service.dart +++ b/lib/core/services/esri_map_services/esrimap_config_service.dart @@ -6,6 +6,7 @@ /// ============================================================================ import 'dart:convert'; + import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart' show rootBundle; diff --git a/lib/core/services/esri_map_services/esrimap_search_service.dart b/lib/core/services/esri_map_services/esrimap_search_service.dart index 7679ee3ea..9fa357f83 100644 --- a/lib/core/services/esri_map_services/esrimap_search_service.dart +++ b/lib/core/services/esri_map_services/esrimap_search_service.dart @@ -6,6 +6,7 @@ import 'dart:convert'; import 'dart:math' as math; + import 'package:arcgis_maps/arcgis_maps.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; import 'package:flutter/material.dart'; diff --git a/lib/core/services/events.dart b/lib/core/services/events.dart index 4c51e6320..300d21d95 100644 --- a/lib/core/services/events.dart +++ b/lib/core/services/events.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/events.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; diff --git a/lib/core/services/map.dart b/lib/core/services/map.dart index 27f8965d0..1a50002f0 100644 --- a/lib/core/services/map.dart +++ b/lib/core/services/map.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/map.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; diff --git a/lib/core/services/messages.dart b/lib/core/services/messages.dart index b3cf1717a..d8e2fac09 100644 --- a/lib/core/services/messages.dart +++ b/lib/core/services/messages.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/notifications.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; diff --git a/lib/core/services/news.dart b/lib/core/services/news.dart index b1134cca1..8cff63427 100644 --- a/lib/core/services/news.dart +++ b/lib/core/services/news.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/news.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; diff --git a/lib/core/services/notices.dart b/lib/core/services/notices.dart index edd7c50c5..64e4d6638 100644 --- a/lib/core/services/notices.dart +++ b/lib/core/services/notices.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/notices.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; diff --git a/lib/core/services/notifications.dart b/lib/core/services/notifications.dart index b104f9bb9..dc7f0b39e 100644 --- a/lib/core/services/notifications.dart +++ b/lib/core/services/notifications.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/topics.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; diff --git a/lib/core/services/parking.dart b/lib/core/services/parking.dart index 6845cfc3b..62f51b132 100644 --- a/lib/core/services/parking.dart +++ b/lib/core/services/parking.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/parking.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; diff --git a/lib/core/services/shuttle.dart b/lib/core/services/shuttle.dart index 511eb4f2e..d10417ab2 100644 --- a/lib/core/services/shuttle.dart +++ b/lib/core/services/shuttle.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/shuttle_arrival.dart'; import 'package:campus_mobile_experimental/core/models/shuttle_stop.dart'; diff --git a/lib/core/services/speed_test.dart b/lib/core/services/speed_test.dart index 51c2e1772..bfe5498f3 100644 --- a/lib/core/services/speed_test.dart +++ b/lib/core/services/speed_test.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'dart:io'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/speed_test.dart'; import 'package:connectivity_plus/connectivity_plus.dart'; diff --git a/lib/core/services/spot_types.dart b/lib/core/services/spot_types.dart index d05329ee8..90466da85 100644 --- a/lib/core/services/spot_types.dart +++ b/lib/core/services/spot_types.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/spot_types.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; diff --git a/lib/core/services/student_id.dart b/lib/core/services/student_id.dart index 0e6c40b69..29d533aec 100644 --- a/lib/core/services/student_id.dart +++ b/lib/core/services/student_id.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/student_id_name.dart'; import 'package:campus_mobile_experimental/core/models/student_id_photo.dart'; diff --git a/lib/core/services/tgpt_services/chat_persistence.dart b/lib/core/services/tgpt_services/chat_persistence.dart index 0a917705e..ecbeb3bba 100644 --- a/lib/core/services/tgpt_services/chat_persistence.dart +++ b/lib/core/services/tgpt_services/chat_persistence.dart @@ -1,4 +1,5 @@ import 'dart:convert'; + import 'package:hive/hive.dart'; import 'package:campus_mobile_experimental/core/models/tgpt_models/chat_message_persistent.dart'; import 'package:campus_mobile_experimental/core/models/tgpt_models/chat_history.dart'; diff --git a/lib/core/services/tgpt_services/chat_session_creation.dart b/lib/core/services/tgpt_services/chat_session_creation.dart index eb7267c9b..353726340 100644 --- a/lib/core/services/tgpt_services/chat_session_creation.dart +++ b/lib/core/services/tgpt_services/chat_session_creation.dart @@ -5,6 +5,7 @@ /// - MOBILE_APP_PUBLIC_DATA_KEY: Public API key for unauthenticated users /// - TGPT_PERSONA_ID: Persona ID for chat sessions (optional, defaults to 1) import 'dart:convert'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/tgpt_models/chat_session.dart'; import 'package:campus_mobile_experimental/core/providers/user.dart'; diff --git a/lib/core/services/user.dart b/lib/core/services/user.dart index 44264d534..38f52a665 100644 --- a/lib/core/services/user.dart +++ b/lib/core/services/user.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_networking.dart'; import 'package:campus_mobile_experimental/core/models/user_profile.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; diff --git a/lib/core/utils/webview.dart b/lib/core/utils/webview.dart index 273087f51..03751f209 100644 --- a/lib/core/utils/webview.dart +++ b/lib/core/utils/webview.dart @@ -1,4 +1,5 @@ import 'dart:core'; + import 'package:campus_mobile_experimental/app_styles.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; diff --git a/lib/main.dart b/lib/main.dart index a53b2ec3d..5621483f8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'dart:io'; + import 'package:campus_mobile_experimental/app_constants.dart'; import 'package:campus_mobile_experimental/app_provider.dart'; import 'package:campus_mobile_experimental/app_router.dart' as campusMobileRouter; @@ -116,9 +117,8 @@ class CampusMobile extends StatelessWidget { iconTheme: lightIconTheme, appBarTheme: lightAppBarTheme, listTileTheme: lightListTileTheme, - colorScheme: ColorScheme.fromSwatch( - primarySwatch: ColorPrimary, - ).copyWith(surface: lightButtonColor, brightness: Brightness.light), + colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) + .copyWith(surface: lightButtonColor, brightness: Brightness.light), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconLightColor, selectedItemColor: Colors.white, @@ -144,9 +144,8 @@ class CampusMobile extends StatelessWidget { appBarTheme: darkAppBarTheme, unselectedWidgetColor: darkAccentColor, listTileTheme: darkListTileTheme, - colorScheme: ColorScheme.fromSwatch( - primarySwatch: ColorPrimary, - ).copyWith(surface: darkButtonColor, brightness: Brightness.dark), + colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) + .copyWith(surface: darkButtonColor, brightness: Brightness.dark), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconDarkColor, selectedItemColor: Colors.white, diff --git a/lib/ui/classes/classes_list.dart b/lib/ui/classes/classes_list.dart index 37a4ba82c..c2f997023 100644 --- a/lib/ui/classes/classes_list.dart +++ b/lib/ui/classes/classes_list.dart @@ -13,9 +13,8 @@ class ClassList extends StatelessWidget { Widget buildSchedule(BuildContext context) { List list = []; - Provider.of( - context, - ).enrolledClasses.addAll(Provider.of(context).midterms); + Provider.of(context).enrolledClasses + .addAll(Provider.of(context).midterms); Provider.of(context).enrolledClasses.keys.forEach((key) { final bool hasClasses = Provider.of(context).enrolledClasses[key]!.isNotEmpty; if (hasClasses) { diff --git a/lib/ui/common/base64_image_widget.dart b/lib/ui/common/base64_image_widget.dart index 70469bf94..bb7b3113b 100644 --- a/lib/ui/common/base64_image_widget.dart +++ b/lib/ui/common/base64_image_widget.dart @@ -1,5 +1,6 @@ import 'dart:convert'; import 'dart:typed_data'; + import 'package:flutter/material.dart'; class Base64ImageWidget extends StatelessWidget { diff --git a/lib/ui/common/directions_helper.dart b/lib/ui/common/directions_helper.dart index f799c5c04..e438a4ab6 100644 --- a/lib/ui/common/directions_helper.dart +++ b/lib/ui/common/directions_helper.dart @@ -1,4 +1,5 @@ import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:url_launcher/url_launcher.dart'; diff --git a/lib/ui/common/webview_container.dart b/lib/ui/common/webview_container.dart index b896fa2bc..fc000bd02 100644 --- a/lib/ui/common/webview_container.dart +++ b/lib/ui/common/webview_container.dart @@ -11,6 +11,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:campus_mobile_experimental/ui/home/home.dart'; import 'package:webview_flutter/webview_flutter.dart'; + import 'dart:async'; class WebViewContainer extends StatefulWidget { diff --git a/lib/ui/dining/dining_detail_view.dart b/lib/ui/dining/dining_detail_view.dart index 8bb21f2c2..c0608a438 100644 --- a/lib/ui/dining/dining_detail_view.dart +++ b/lib/ui/dining/dining_detail_view.dart @@ -8,6 +8,7 @@ import 'package:url_launcher/url_launcher.dart'; import 'package:provider/provider.dart'; import 'package:campus_mobile_experimental/core/models/availability.dart'; import 'package:campus_mobile_experimental/core/providers/availability.dart'; + import 'dining_busyness_bar.dart'; class DiningDetailView extends StatefulWidget { diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart index 31f0f63b9..46733e260 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart @@ -5,6 +5,7 @@ /// ============================================================================ import 'dart:convert'; + import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_ai_search_model.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index a37c24324..ee4cb8d68 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -5,6 +5,7 @@ /// ============================================================================ import 'dart:math' as math; + import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -66,7 +67,7 @@ class EsriMapFabCluster extends StatelessWidget { final fgColor = isDark ? Colors.white : Colors.grey[800]!; final recenterColor = isRecenterActive ? ACTIVE_COLOR : fgColor; - + return Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, @@ -96,7 +97,7 @@ class EsriMapFabCluster extends StatelessWidget { ), ), const SizedBox(height: 10), - + // Center Map (Center on Campus) _circleButton( svgAsset: 'assets/esri_map_assets/Center-Trident.svg', @@ -105,7 +106,7 @@ class EsriMapFabCluster extends StatelessWidget { onTap: onRecenterOnView, ), const SizedBox(height: 10), - + // Map displays (Layers) _circleButton( customIcon: CustomPaint( @@ -176,14 +177,14 @@ class _MapDisplaysIconPainter extends CustomPainter { final double h = size.height; final path = Path(); - + // Top Diamond // Stop the diamond much earlier to leave a clear gap for the + sign path.moveTo(w * 0.40, h * 0.20); // Start at top, slightly left path.lineTo(w * 0.15, h * 0.40); // Down-left to left point path.lineTo(w * 0.50, h * 0.65); // Down-right to bottom point path.lineTo(w * 0.70, h * 0.50); // Up-right, stopping early - + // Bottom Diamond (V shape) path.moveTo(w * 0.15, h * 0.60); // Left start path.lineTo(w * 0.50, h * 0.85); // Bottom point @@ -196,7 +197,7 @@ class _MapDisplaysIconPainter extends CustomPainter { final cx = w * 0.80; final cy = h * 0.20; final r = w * 0.14; - + final plusPaint = Paint() ..color = color ..style = PaintingStyle.stroke @@ -208,9 +209,7 @@ class _MapDisplaysIconPainter extends CustomPainter { } @override - bool shouldRepaint(covariant _MapDisplaysIconPainter oldDelegate) { - return oldDelegate.color != color; - } + bool shouldRepaint(covariant _MapDisplaysIconPainter oldDelegate) => oldDelegate.color != color; } /// Floating action button for "Center on Me" rendered in bottom-right of map view. @@ -234,9 +233,9 @@ class EsriMapLocationFab extends StatelessWidget { Widget build(BuildContext context) { final bgColor = isDark ? Colors.grey[800]! : Colors.white; final fgColor = isDark ? Colors.white : Colors.grey[800]!; - + final activeBgColor = isDark ? Colors.blue[900]!.withValues(alpha: 0.5) : const Color(0xFFE8F0FE); - + Widget iconWidget; if (isLocationActive || bearingToUser != null) { double totalRotation = 0; @@ -244,7 +243,7 @@ class EsriMapLocationFab extends StatelessWidget { final mapRotRad = mapRotation * math.pi / 180.0; totalRotation = bearingToUser! - mapRotRad; } - + iconWidget = Stack( alignment: Alignment.center, children: [ @@ -252,10 +251,7 @@ class EsriMapLocationFab extends StatelessWidget { Container( width: 30, height: 30, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: activeBgColor, - ), + decoration: BoxDecoration(shape: BoxShape.circle, color: activeBgColor), ), // Directional Triangle (only if inactive) if (!isLocationActive && bearingToUser != null) @@ -282,9 +278,7 @@ class EsriMapLocationFab extends StatelessWidget { shape: BoxShape.circle, color: Colors.blue[600], border: Border.all(color: Colors.white, width: 2.5), - boxShadow: [ - BoxShadow(color: Colors.black.withValues(alpha: 0.2), blurRadius: 2) - ], + boxShadow: [BoxShadow(color: Colors.black.withValues(alpha: 0.2), blurRadius: 2)], ), ), ], @@ -292,7 +286,7 @@ class EsriMapLocationFab extends StatelessWidget { } else { iconWidget = Icon(Icons.explore_outlined, size: 26, color: fgColor); } - + return Material( elevation: 4, color: bgColor, @@ -303,9 +297,7 @@ class EsriMapLocationFab extends StatelessWidget { child: SizedBox( width: EsriMapFabCluster.SIZE, height: EsriMapFabCluster.SIZE, - child: Center( - child: iconWidget, - ), + child: Center(child: iconWidget), ), ), ); @@ -327,9 +319,7 @@ class _DirectionArrowPainter extends CustomPainter { } @override - bool shouldRepaint(covariant _DirectionArrowPainter oldDelegate) { - return oldDelegate.color != color; - } + bool shouldRepaint(covariant _DirectionArrowPainter oldDelegate) => oldDelegate.color != color; } class _CompassNeedlePainter extends CustomPainter { diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart index 019d91909..1c9525098 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart @@ -6,6 +6,7 @@ /// ============================================================================ import 'dart:async'; + import 'package:flutter/material.dart'; /// Dynamic scale bar widget modeled after Google Maps' scale indicator. @@ -67,9 +68,7 @@ class _EsriMapScaleBarState extends State { void initState() { super.initState(); _lastScale = widget.scale; - if (!widget.autoFade) { - _isVisible = true; - } + if (!widget.autoFade) _isVisible = true; } @override @@ -78,9 +77,7 @@ class _EsriMapScaleBarState extends State { // Detect zoom/scale changes if (widget.scale > 0 && (widget.scale - _lastScale).abs() > 0.05) { _lastScale = widget.scale; - if (widget.autoFade) { - _triggerZoomFade(); - } + if (widget.autoFade) _triggerZoomFade(); } } @@ -162,8 +159,8 @@ class _EsriMapScaleBarState extends State { final String metricLabel = chosenMetricMeters >= 1000 ? '${(chosenMetricMeters / 1000).toStringAsFixed(chosenMetricMeters % 1000 == 0 ? 0 : 1)} km' : (chosenMetricMeters < 1 - ? '${(chosenMetricMeters * 100).round()} cm' - : '${chosenMetricMeters % 1 == 0 ? chosenMetricMeters.toInt() : chosenMetricMeters.toStringAsFixed(1)} m'); + ? '${(chosenMetricMeters * 100).round()} cm' + : '${chosenMetricMeters % 1 == 0 ? chosenMetricMeters.toInt() : chosenMetricMeters.toStringAsFixed(1)} m'); final textColor = widget.isDark ? Colors.white70 : const Color(0xFF3C4043); final lineColor = widget.isDark ? Colors.white70 : const Color(0xFF5F6368); @@ -195,9 +192,7 @@ class _EsriMapScaleBarState extends State { SizedBox( width: chosenWidthPx, height: 6, - child: CustomPaint( - painter: _ScaleBarBracketPainter(color: lineColor), - ), + child: CustomPaint(painter: _ScaleBarBracketPainter(color: lineColor)), ), const SizedBox(height: 1), @@ -250,7 +245,5 @@ class _ScaleBarBracketPainter extends CustomPainter { } @override - bool shouldRepaint(covariant _ScaleBarBracketPainter oldDelegate) { - return oldDelegate.color != color; - } + bool shouldRepaint(covariant _ScaleBarBracketPainter oldDelegate) => oldDelegate.color != color; } diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_scene.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_scene.dart index 6645288cc..d67ac6f77 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_scene.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_scene.dart @@ -5,6 +5,7 @@ /// ============================================================================ import 'dart:async'; + import 'package:arcgis_maps/arcgis_maps.dart'; import 'package:flutter/material.dart'; diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 7bc752430..a4a7e2a2d 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -7,6 +7,7 @@ import 'dart:async'; import 'dart:math' as math; + import 'package:arcgis_maps/arcgis_maps.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_ai_search_model.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_basemaps.dart'; @@ -31,6 +32,7 @@ import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_s import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; import 'package:url_launcher/url_launcher.dart'; + import 'dart:ui' as ui; // Re-export MapSearchResult so callers importing esrimap.dart retain access @@ -140,7 +142,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { EsriSceneWidget? _sceneDroneWidget; final _scene3DKey = GlobalKey(); final _sceneDroneKey = GlobalKey(); - + (double lat, double lng)? _currentMapCenter; final _mapReadyCompleter = Completer(); @@ -153,8 +155,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final dLng = endLngRad - startLngRad; final y = math.sin(dLng) * math.cos(endLatRad); - final x = math.cos(startLatRad) * math.sin(endLatRad) - - math.sin(startLatRad) * math.cos(endLatRad) * math.cos(dLng); + final x = + math.cos(startLatRad) * math.sin(endLatRad) - math.sin(startLatRad) * math.cos(endLatRad) * math.cos(dLng); return math.atan2(y, x); } @@ -254,12 +256,11 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Track map heading rotation and zoom level changes DateTime? lastUpdateTime; - + _viewpointChangedSubscription = _mapViewController.onViewpointChanged.listen((_) { final now = DateTime.now(); - if (lastUpdateTime != null && now.difference(lastUpdateTime!).inMilliseconds < 32) { + if (lastUpdateTime != null && now.difference(lastUpdateTime!).inMilliseconds < 32) return; // Throttle to ~30 FPS to prevent heavy jitter - } lastUpdateTime = now; final vp = _mapViewController.getCurrentViewpoint(ViewpointType.centerAndScale); @@ -852,9 +853,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); if (allResults.isEmpty) { - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); } } catch (e) { debugPrint('Category search error: $e'); @@ -866,9 +866,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _allCategoryResults = []; _isSearching = false; }); - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); } } @@ -1858,7 +1857,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { onSnapToNorth: _snapToNorth, ), ), - + // Bottom-right center-on-me button if (isFabVisible && _sceneMode == 'default') Builder( @@ -1875,7 +1874,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { bearing = _calculateBearing(mapLat, mapLng, userLat, userLng); } } - + return Positioned( bottom: 100, right: 16, @@ -1887,7 +1886,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { onRecenterOnUser: _recenterOnUser, ), ); - } + }, ), // Floating top search bar & suggestion panel @@ -2066,9 +2065,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } if (gps == null) { if (mounted) { - ScaffoldMessenger.of( - context, - ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + ScaffoldMessenger.of(context) + .showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } @@ -2113,10 +2111,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Positioned( bottom: 24, right: 16, - child: EsriMapScaleBar( - scale: _currentScale, - isDark: isDark, - ), + child: EsriMapScaleBar(scale: _currentScale, isDark: isDark), ), // Transit Legend diff --git a/lib/ui/home/home.dart b/lib/ui/home/home.dart index b764e7f69..8fe4fb2b6 100644 --- a/lib/ui/home/home.dart +++ b/lib/ui/home/home.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_constants.dart'; import 'package:campus_mobile_experimental/app_styles.dart'; import 'package:campus_mobile_experimental/core/models/notices.dart'; diff --git a/lib/ui/map/map.dart b/lib/ui/map/map.dart index 66fc222f7..d43e56dc7 100644 --- a/lib/ui/map/map.dart +++ b/lib/ui/map/map.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_constants.dart'; import 'package:campus_mobile_experimental/core/providers/bottom_nav.dart'; import 'package:campus_mobile_experimental/core/providers/map.dart'; diff --git a/lib/ui/navigator/top.dart b/lib/ui/navigator/top.dart index f4792bbf7..180d4f1fb 100644 --- a/lib/ui/navigator/top.dart +++ b/lib/ui/navigator/top.dart @@ -27,9 +27,8 @@ class CMAppBar extends StatelessWidget { Provider.of(context, listen: false).currentIndex = NavigatorConstants.HOME_TAB; // Navigate to Home tab - Navigator.of( - context, - ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of(context) + .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); // change the appBar title to the ucsd logo Provider.of(context, listen: false).changeTitle(CustomAppBar().appBar.title); }, diff --git a/lib/ui/news/news_list.dart b/lib/ui/news/news_list.dart index a756b475c..3ab74c34a 100644 --- a/lib/ui/news/news_list.dart +++ b/lib/ui/news/news_list.dart @@ -106,11 +106,8 @@ class NewsList extends StatelessWidget { ), TextSpan( text: ' - ', - style: Theme.of(context).textTheme.headlineMedium!.copyWith( - height: 1.42, - fontSize: 16.0, - decoration: TextDecoration.none, - ), + style: Theme.of(context).textTheme.headlineMedium! + .copyWith(height: 1.42, fontSize: 16.0, decoration: TextDecoration.none), ), TextSpan( text: newsItem.title, diff --git a/lib/ui/notifications/notifications_list_view.dart b/lib/ui/notifications/notifications_list_view.dart index 2057b9923..4b96562b4 100644 --- a/lib/ui/notifications/notifications_list_view.dart +++ b/lib/ui/notifications/notifications_list_view.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_constants.dart'; import 'package:campus_mobile_experimental/app_styles.dart'; import 'package:campus_mobile_experimental/core/models/notifications.dart'; @@ -182,9 +183,8 @@ class _NotificationsListViewState extends State { } }, options: LinkifyOptions(humanize: false), - style: Theme.of( - context, - ).textTheme.bodySmall?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), + style: Theme.of(context).textTheme.bodySmall + ?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), ), freefoodProvider.isFreeFood(data.messageId) ? FreeFoodNotification(messageId: data.messageId) : Container(), ], @@ -197,9 +197,8 @@ class _NotificationsListViewState extends State { padding: const EdgeInsets.only(top: 6.0), child: Text( _readTimestamp(data.timestamp), - style: Theme.of( - context, - ).textTheme.bodySmall?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), + style: Theme.of(context).textTheme.bodySmall + ?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), ), ), ], diff --git a/lib/ui/onboarding/onboarding_slides.dart b/lib/ui/onboarding/onboarding_slides.dart index 7839e02e4..61c4717cd 100644 --- a/lib/ui/onboarding/onboarding_slides.dart +++ b/lib/ui/onboarding/onboarding_slides.dart @@ -3,6 +3,7 @@ import 'package:dots_indicator/dots_indicator.dart'; import 'package:flutter/material.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:campus_mobile_experimental/app_constants.dart'; + import 'onboarding_slide_template.dart'; class OnboardingSlides extends StatefulWidget { diff --git a/lib/ui/parking/circular_parking_indicator.dart b/lib/ui/parking/circular_parking_indicator.dart index d3001d352..90deb068c 100644 --- a/lib/ui/parking/circular_parking_indicator.dart +++ b/lib/ui/parking/circular_parking_indicator.dart @@ -217,12 +217,12 @@ class CircularParkingIndicators extends StatelessWidget { } Widget buildSpotsAvailableText(BuildContext context) { - final openSpots = Provider.of( - context, - ).getApproxNumOfOpenSpots(model.locationName)["Open"].toString(); - final totalSpots = Provider.of( - context, - ).getApproxNumOfOpenSpots(model.locationName)["Total"].toString(); + final openSpots = Provider.of(context) + .getApproxNumOfOpenSpots(model.locationName)["Open"] + .toString(); + final totalSpots = Provider.of(context) + .getApproxNumOfOpenSpots(model.locationName)["Total"] + .toString(); final visualText = "~$openSpots of $totalSpots Spots Available"; final semanticText = "Approximately $openSpots of $totalSpots Spots Available"; diff --git a/lib/ui/parking/spot_types_view.dart b/lib/ui/parking/spot_types_view.dart index 4e2c5bb0f..0704a3d62 100644 --- a/lib/ui/parking/spot_types_view.dart +++ b/lib/ui/parking/spot_types_view.dart @@ -46,9 +46,9 @@ class _SpotTypesViewState extends State { ); List createList(BuildContext context) { - var selectedSpots = Provider.of( - context, - ).spotTypesState.values.where((selected) => selected == true).length; + var selectedSpots = Provider.of(context).spotTypesState.values + .where((selected) => selected == true) + .length; List list = []; diff --git a/lib/ui/profile/cards.dart b/lib/ui/profile/cards.dart index 230eb1d29..52ade7e82 100644 --- a/lib/ui/profile/cards.dart +++ b/lib/ui/profile/cards.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_constants.dart'; import 'package:campus_mobile_experimental/app_styles.dart'; import 'package:campus_mobile_experimental/core/providers/cards.dart'; diff --git a/lib/ui/profile/profile.dart b/lib/ui/profile/profile.dart index 880bf6b92..f94bdbc98 100644 --- a/lib/ui/profile/profile.dart +++ b/lib/ui/profile/profile.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_constants.dart'; import 'package:campus_mobile_experimental/app_styles.dart'; import 'package:campus_mobile_experimental/core/providers/bottom_nav.dart'; diff --git a/lib/ui/wifi/wifi_card.dart b/lib/ui/wifi/wifi_card.dart index 5f88bf841..8b71eb63d 100644 --- a/lib/ui/wifi/wifi_card.dart +++ b/lib/ui/wifi/wifi_card.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:campus_mobile_experimental/app_constants.dart'; import 'package:campus_mobile_experimental/app_provider.dart'; import 'package:campus_mobile_experimental/app_styles.dart'; From 9bc74572e5ffc8f000975114b947107a4c107ca3 Mon Sep 17 00:00:00 2001 From: Albert Hoang Date: Mon, 17 Aug 2026 06:48:52 +0700 Subject: [PATCH 077/139] dark and light mode search fix --- lib/core/providers/classes.dart | 8 +++----- lib/core/providers/notifications.dart | 10 ++++++---- lib/main.dart | 10 ++++++---- lib/ui/classes/classes_list.dart | 5 +++-- .../esri_map_widgets/esrimap_search_bar.dart | 14 +++++++++----- lib/ui/esrimap/esrimap.dart | 15 +++++++++------ lib/ui/navigator/top.dart | 5 +++-- lib/ui/news/news_list.dart | 7 +++++-- lib/ui/notifications/notifications_list_view.dart | 10 ++++++---- lib/ui/parking/circular_parking_indicator.dart | 12 ++++++------ lib/ui/parking/spot_types_view.dart | 6 +++--- 11 files changed, 59 insertions(+), 43 deletions(-) diff --git a/lib/core/providers/classes.dart b/lib/core/providers/classes.dart index c34facb66..3399cc820 100644 --- a/lib/core/providers/classes.dart +++ b/lib/core/providers/classes.dart @@ -216,11 +216,9 @@ class ClassScheduleDataProvider extends ChangeNotifier { /// if no classes are scheduled for today then find the next day with classes var daysToAdd = 1; while (_enrolledClasses[today]!.isEmpty && daysToAdd <= 7) { - today = DateFormat('EEEE') - .format(DateTime.now().add(Duration(days: daysToAdd))) - .toString() - .toUpperCase() - .substring(0, 2); + today = DateFormat( + 'EEEE', + ).format(DateTime.now().add(Duration(days: daysToAdd))).toString().toUpperCase().substring(0, 2); nextDayWithClass = DateFormat('EEEE').format(DateTime.now().add(Duration(days: daysToAdd))); daysToAdd += 1; } diff --git a/lib/core/providers/notifications.dart b/lib/core/providers/notifications.dart index c0bb85eea..e5a42fec2 100644 --- a/lib/core/providers/notifications.dart +++ b/lib/core/providers/notifications.dart @@ -144,8 +144,9 @@ class PushNotificationDataProvider extends ChangeNotifier { NavigatorConstants.NOTIFICATIONS_TAB; /// Navigate to Notifications tab - Navigator.of(context) - .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of( + context, + ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); }); } on PlatformException { _error = 'Failed to get platform info.'; @@ -159,8 +160,9 @@ class PushNotificationDataProvider extends ChangeNotifier { Provider.of(this.context, listen: false).fetchMessages(true); /// Navigate to Notifications tab - Navigator.of(this.context) - .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of( + this.context, + ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); /// Set tab bar index to the Notifications tab Provider.of(this.context, listen: false).currentIndex = diff --git a/lib/main.dart b/lib/main.dart index 5621483f8..afe2cbc35 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -117,8 +117,9 @@ class CampusMobile extends StatelessWidget { iconTheme: lightIconTheme, appBarTheme: lightAppBarTheme, listTileTheme: lightListTileTheme, - colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) - .copyWith(surface: lightButtonColor, brightness: Brightness.light), + colorScheme: ColorScheme.fromSwatch( + primarySwatch: ColorPrimary, + ).copyWith(surface: lightButtonColor, brightness: Brightness.light), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconLightColor, selectedItemColor: Colors.white, @@ -144,8 +145,9 @@ class CampusMobile extends StatelessWidget { appBarTheme: darkAppBarTheme, unselectedWidgetColor: darkAccentColor, listTileTheme: darkListTileTheme, - colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) - .copyWith(surface: darkButtonColor, brightness: Brightness.dark), + colorScheme: ColorScheme.fromSwatch( + primarySwatch: ColorPrimary, + ).copyWith(surface: darkButtonColor, brightness: Brightness.dark), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconDarkColor, selectedItemColor: Colors.white, diff --git a/lib/ui/classes/classes_list.dart b/lib/ui/classes/classes_list.dart index c2f997023..37a4ba82c 100644 --- a/lib/ui/classes/classes_list.dart +++ b/lib/ui/classes/classes_list.dart @@ -13,8 +13,9 @@ class ClassList extends StatelessWidget { Widget buildSchedule(BuildContext context) { List list = []; - Provider.of(context).enrolledClasses - .addAll(Provider.of(context).midterms); + Provider.of( + context, + ).enrolledClasses.addAll(Provider.of(context).midterms); Provider.of(context).enrolledClasses.keys.forEach((key) { final bool hasClasses = Provider.of(context).enrolledClasses[key]!.isNotEmpty; if (hasClasses) { diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index ff165bbfa..7913292ae 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -7,6 +7,7 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; import 'package:campus_mobile_experimental/core/utils/esri_map_feature_flags.dart'; +import 'package:campus_mobile_experimental/app_styles.dart'; import 'package:flutter/material.dart'; /// Search input bar and route directions header widget. @@ -140,7 +141,7 @@ class EsriMapSearchBar extends StatelessWidget { Widget build(BuildContext context) { const searchFontSize = 16.0; final isDark = Theme.of(context).brightness == Brightness.dark; - final searchTextColor = Theme.of(context).textTheme.titleMedium?.color; + final searchTextColor = isDark ? descriptiveTextColorDark : descriptiveTextColorLight; final hasSearchResults = isSearching || searchResults.isNotEmpty; final shouldShowResultsDivider = showResults && hasSearchResults; @@ -309,12 +310,15 @@ class EsriMapSearchBar extends StatelessWidget { }, onTap: onTapSearchField, style: TextStyle(fontSize: searchFontSize, color: searchTextColor), - decoration: const InputDecoration( + decoration: InputDecoration( border: InputBorder.none, - contentPadding: EdgeInsets.symmetric(horizontal: 12, vertical: 16), + contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 16), hint: Padding( - padding: EdgeInsets.only(left: 4), - child: Text('Search buildings, places...', style: TextStyle(fontSize: searchFontSize)), + padding: const EdgeInsets.only(left: 4), + child: Text( + 'Search buildings, places...', + style: TextStyle(fontSize: searchFontSize, color: searchTextColor), + ), ), ), ), diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index a4a7e2a2d..dcf6e02ef 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -853,8 +853,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); if (allResults.isEmpty) { - ScaffoldMessenger.of(context) - .showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); } } catch (e) { debugPrint('Category search error: $e'); @@ -866,8 +867,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _allCategoryResults = []; _isSearching = false; }); - ScaffoldMessenger.of(context) - .showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); } } @@ -2065,8 +2067,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } if (gps == null) { if (mounted) { - ScaffoldMessenger.of(context) - .showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + ScaffoldMessenger.of( + context, + ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } diff --git a/lib/ui/navigator/top.dart b/lib/ui/navigator/top.dart index 180d4f1fb..f4792bbf7 100644 --- a/lib/ui/navigator/top.dart +++ b/lib/ui/navigator/top.dart @@ -27,8 +27,9 @@ class CMAppBar extends StatelessWidget { Provider.of(context, listen: false).currentIndex = NavigatorConstants.HOME_TAB; // Navigate to Home tab - Navigator.of(context) - .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of( + context, + ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); // change the appBar title to the ucsd logo Provider.of(context, listen: false).changeTitle(CustomAppBar().appBar.title); }, diff --git a/lib/ui/news/news_list.dart b/lib/ui/news/news_list.dart index 3ab74c34a..a756b475c 100644 --- a/lib/ui/news/news_list.dart +++ b/lib/ui/news/news_list.dart @@ -106,8 +106,11 @@ class NewsList extends StatelessWidget { ), TextSpan( text: ' - ', - style: Theme.of(context).textTheme.headlineMedium! - .copyWith(height: 1.42, fontSize: 16.0, decoration: TextDecoration.none), + style: Theme.of(context).textTheme.headlineMedium!.copyWith( + height: 1.42, + fontSize: 16.0, + decoration: TextDecoration.none, + ), ), TextSpan( text: newsItem.title, diff --git a/lib/ui/notifications/notifications_list_view.dart b/lib/ui/notifications/notifications_list_view.dart index 4b96562b4..54e301058 100644 --- a/lib/ui/notifications/notifications_list_view.dart +++ b/lib/ui/notifications/notifications_list_view.dart @@ -183,8 +183,9 @@ class _NotificationsListViewState extends State { } }, options: LinkifyOptions(humanize: false), - style: Theme.of(context).textTheme.bodySmall - ?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), + style: Theme.of( + context, + ).textTheme.bodySmall?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), ), freefoodProvider.isFreeFood(data.messageId) ? FreeFoodNotification(messageId: data.messageId) : Container(), ], @@ -197,8 +198,9 @@ class _NotificationsListViewState extends State { padding: const EdgeInsets.only(top: 6.0), child: Text( _readTimestamp(data.timestamp), - style: Theme.of(context).textTheme.bodySmall - ?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), + style: Theme.of( + context, + ).textTheme.bodySmall?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), ), ), ], diff --git a/lib/ui/parking/circular_parking_indicator.dart b/lib/ui/parking/circular_parking_indicator.dart index 90deb068c..d3001d352 100644 --- a/lib/ui/parking/circular_parking_indicator.dart +++ b/lib/ui/parking/circular_parking_indicator.dart @@ -217,12 +217,12 @@ class CircularParkingIndicators extends StatelessWidget { } Widget buildSpotsAvailableText(BuildContext context) { - final openSpots = Provider.of(context) - .getApproxNumOfOpenSpots(model.locationName)["Open"] - .toString(); - final totalSpots = Provider.of(context) - .getApproxNumOfOpenSpots(model.locationName)["Total"] - .toString(); + final openSpots = Provider.of( + context, + ).getApproxNumOfOpenSpots(model.locationName)["Open"].toString(); + final totalSpots = Provider.of( + context, + ).getApproxNumOfOpenSpots(model.locationName)["Total"].toString(); final visualText = "~$openSpots of $totalSpots Spots Available"; final semanticText = "Approximately $openSpots of $totalSpots Spots Available"; diff --git a/lib/ui/parking/spot_types_view.dart b/lib/ui/parking/spot_types_view.dart index 0704a3d62..4e2c5bb0f 100644 --- a/lib/ui/parking/spot_types_view.dart +++ b/lib/ui/parking/spot_types_view.dart @@ -46,9 +46,9 @@ class _SpotTypesViewState extends State { ); List createList(BuildContext context) { - var selectedSpots = Provider.of(context).spotTypesState.values - .where((selected) => selected == true) - .length; + var selectedSpots = Provider.of( + context, + ).spotTypesState.values.where((selected) => selected == true).length; List list = []; From 3ea438cb60464437cecf23f97e9711fe85e12383 Mon Sep 17 00:00:00 2001 From: alberthoangg <115964431+alberthoangg@users.noreply.github.com> Date: Sun, 16 Aug 2026 23:52:55 +0000 Subject: [PATCH 078/139] style: auto fix formatting violations --- lib/core/providers/classes.dart | 8 +++++--- lib/core/providers/notifications.dart | 10 ++++------ lib/main.dart | 10 ++++------ lib/ui/classes/classes_list.dart | 5 ++--- lib/ui/esrimap/esrimap.dart | 15 ++++++--------- lib/ui/navigator/top.dart | 5 ++--- lib/ui/news/news_list.dart | 7 ++----- lib/ui/notifications/notifications_list_view.dart | 10 ++++------ lib/ui/parking/circular_parking_indicator.dart | 12 ++++++------ lib/ui/parking/spot_types_view.dart | 6 +++--- 10 files changed, 38 insertions(+), 50 deletions(-) diff --git a/lib/core/providers/classes.dart b/lib/core/providers/classes.dart index 3399cc820..c34facb66 100644 --- a/lib/core/providers/classes.dart +++ b/lib/core/providers/classes.dart @@ -216,9 +216,11 @@ class ClassScheduleDataProvider extends ChangeNotifier { /// if no classes are scheduled for today then find the next day with classes var daysToAdd = 1; while (_enrolledClasses[today]!.isEmpty && daysToAdd <= 7) { - today = DateFormat( - 'EEEE', - ).format(DateTime.now().add(Duration(days: daysToAdd))).toString().toUpperCase().substring(0, 2); + today = DateFormat('EEEE') + .format(DateTime.now().add(Duration(days: daysToAdd))) + .toString() + .toUpperCase() + .substring(0, 2); nextDayWithClass = DateFormat('EEEE').format(DateTime.now().add(Duration(days: daysToAdd))); daysToAdd += 1; } diff --git a/lib/core/providers/notifications.dart b/lib/core/providers/notifications.dart index e5a42fec2..c0bb85eea 100644 --- a/lib/core/providers/notifications.dart +++ b/lib/core/providers/notifications.dart @@ -144,9 +144,8 @@ class PushNotificationDataProvider extends ChangeNotifier { NavigatorConstants.NOTIFICATIONS_TAB; /// Navigate to Notifications tab - Navigator.of( - context, - ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of(context) + .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); }); } on PlatformException { _error = 'Failed to get platform info.'; @@ -160,9 +159,8 @@ class PushNotificationDataProvider extends ChangeNotifier { Provider.of(this.context, listen: false).fetchMessages(true); /// Navigate to Notifications tab - Navigator.of( - this.context, - ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of(this.context) + .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); /// Set tab bar index to the Notifications tab Provider.of(this.context, listen: false).currentIndex = diff --git a/lib/main.dart b/lib/main.dart index afe2cbc35..5621483f8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -117,9 +117,8 @@ class CampusMobile extends StatelessWidget { iconTheme: lightIconTheme, appBarTheme: lightAppBarTheme, listTileTheme: lightListTileTheme, - colorScheme: ColorScheme.fromSwatch( - primarySwatch: ColorPrimary, - ).copyWith(surface: lightButtonColor, brightness: Brightness.light), + colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) + .copyWith(surface: lightButtonColor, brightness: Brightness.light), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconLightColor, selectedItemColor: Colors.white, @@ -145,9 +144,8 @@ class CampusMobile extends StatelessWidget { appBarTheme: darkAppBarTheme, unselectedWidgetColor: darkAccentColor, listTileTheme: darkListTileTheme, - colorScheme: ColorScheme.fromSwatch( - primarySwatch: ColorPrimary, - ).copyWith(surface: darkButtonColor, brightness: Brightness.dark), + colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) + .copyWith(surface: darkButtonColor, brightness: Brightness.dark), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconDarkColor, selectedItemColor: Colors.white, diff --git a/lib/ui/classes/classes_list.dart b/lib/ui/classes/classes_list.dart index 37a4ba82c..c2f997023 100644 --- a/lib/ui/classes/classes_list.dart +++ b/lib/ui/classes/classes_list.dart @@ -13,9 +13,8 @@ class ClassList extends StatelessWidget { Widget buildSchedule(BuildContext context) { List list = []; - Provider.of( - context, - ).enrolledClasses.addAll(Provider.of(context).midterms); + Provider.of(context).enrolledClasses + .addAll(Provider.of(context).midterms); Provider.of(context).enrolledClasses.keys.forEach((key) { final bool hasClasses = Provider.of(context).enrolledClasses[key]!.isNotEmpty; if (hasClasses) { diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index dcf6e02ef..a4a7e2a2d 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -853,9 +853,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); if (allResults.isEmpty) { - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); } } catch (e) { debugPrint('Category search error: $e'); @@ -867,9 +866,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _allCategoryResults = []; _isSearching = false; }); - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); } } @@ -2067,9 +2065,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } if (gps == null) { if (mounted) { - ScaffoldMessenger.of( - context, - ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + ScaffoldMessenger.of(context) + .showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } diff --git a/lib/ui/navigator/top.dart b/lib/ui/navigator/top.dart index f4792bbf7..180d4f1fb 100644 --- a/lib/ui/navigator/top.dart +++ b/lib/ui/navigator/top.dart @@ -27,9 +27,8 @@ class CMAppBar extends StatelessWidget { Provider.of(context, listen: false).currentIndex = NavigatorConstants.HOME_TAB; // Navigate to Home tab - Navigator.of( - context, - ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of(context) + .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); // change the appBar title to the ucsd logo Provider.of(context, listen: false).changeTitle(CustomAppBar().appBar.title); }, diff --git a/lib/ui/news/news_list.dart b/lib/ui/news/news_list.dart index a756b475c..3ab74c34a 100644 --- a/lib/ui/news/news_list.dart +++ b/lib/ui/news/news_list.dart @@ -106,11 +106,8 @@ class NewsList extends StatelessWidget { ), TextSpan( text: ' - ', - style: Theme.of(context).textTheme.headlineMedium!.copyWith( - height: 1.42, - fontSize: 16.0, - decoration: TextDecoration.none, - ), + style: Theme.of(context).textTheme.headlineMedium! + .copyWith(height: 1.42, fontSize: 16.0, decoration: TextDecoration.none), ), TextSpan( text: newsItem.title, diff --git a/lib/ui/notifications/notifications_list_view.dart b/lib/ui/notifications/notifications_list_view.dart index 54e301058..4b96562b4 100644 --- a/lib/ui/notifications/notifications_list_view.dart +++ b/lib/ui/notifications/notifications_list_view.dart @@ -183,9 +183,8 @@ class _NotificationsListViewState extends State { } }, options: LinkifyOptions(humanize: false), - style: Theme.of( - context, - ).textTheme.bodySmall?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), + style: Theme.of(context).textTheme.bodySmall + ?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), ), freefoodProvider.isFreeFood(data.messageId) ? FreeFoodNotification(messageId: data.messageId) : Container(), ], @@ -198,9 +197,8 @@ class _NotificationsListViewState extends State { padding: const EdgeInsets.only(top: 6.0), child: Text( _readTimestamp(data.timestamp), - style: Theme.of( - context, - ).textTheme.bodySmall?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), + style: Theme.of(context).textTheme.bodySmall + ?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), ), ), ], diff --git a/lib/ui/parking/circular_parking_indicator.dart b/lib/ui/parking/circular_parking_indicator.dart index d3001d352..90deb068c 100644 --- a/lib/ui/parking/circular_parking_indicator.dart +++ b/lib/ui/parking/circular_parking_indicator.dart @@ -217,12 +217,12 @@ class CircularParkingIndicators extends StatelessWidget { } Widget buildSpotsAvailableText(BuildContext context) { - final openSpots = Provider.of( - context, - ).getApproxNumOfOpenSpots(model.locationName)["Open"].toString(); - final totalSpots = Provider.of( - context, - ).getApproxNumOfOpenSpots(model.locationName)["Total"].toString(); + final openSpots = Provider.of(context) + .getApproxNumOfOpenSpots(model.locationName)["Open"] + .toString(); + final totalSpots = Provider.of(context) + .getApproxNumOfOpenSpots(model.locationName)["Total"] + .toString(); final visualText = "~$openSpots of $totalSpots Spots Available"; final semanticText = "Approximately $openSpots of $totalSpots Spots Available"; diff --git a/lib/ui/parking/spot_types_view.dart b/lib/ui/parking/spot_types_view.dart index 4e2c5bb0f..0704a3d62 100644 --- a/lib/ui/parking/spot_types_view.dart +++ b/lib/ui/parking/spot_types_view.dart @@ -46,9 +46,9 @@ class _SpotTypesViewState extends State { ); List createList(BuildContext context) { - var selectedSpots = Provider.of( - context, - ).spotTypesState.values.where((selected) => selected == true).length; + var selectedSpots = Provider.of(context).spotTypesState.values + .where((selected) => selected == true) + .length; List list = []; From 4e86d9e5cddb7c3a13279c787746484c2830afaa Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 17 Aug 2026 08:13:09 -0700 Subject: [PATCH 079/139] made construction icons render always on top --- lib/ui/esrimap/esrimap.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index a4a7e2a2d..ec38dfc14 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -580,7 +580,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { FeatureLayer.withFeatureTable( ServiceFeatureTable.withUri( Uri.parse( - 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/0', + 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/2', ), ), ), @@ -594,7 +594,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { FeatureLayer.withFeatureTable( ServiceFeatureTable.withUri( Uri.parse( - 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/2', + 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/Construction/Construction_Alert_Approved/MapServer/0', ), ), ), From 369b67ad46e55ecbb5932058a245ccb9eb06c616 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 17 Aug 2026 12:27:49 -0700 Subject: [PATCH 080/139] Fixed all pre-commit violations --- android/app/build.gradle | 4 +- lib/core/providers/classes.dart | 8 +- lib/core/providers/notifications.dart | 10 +- lib/core/services/cards.dart | 6 +- .../esrimap_basemap_factory.dart | 6 +- lib/core/services/notifications_freefood.dart | 6 +- lib/core/services/parking.dart | 6 +- lib/core/services/shuttle.dart | 6 +- lib/core/utils/esri_map_feature_flags.dart | 32 +++---- lib/main.dart | 10 +- lib/ui/classes/classes_list.dart | 5 +- .../esrimap_detail_slide_over.dart | 8 +- .../esrimap_layers_panel.dart | 95 ++++++++++--------- .../esri_map_widgets/esrimap_scale_bar.dart | 15 +-- .../esri_map_widgets/esrimap_search_bar.dart | 5 +- lib/ui/esrimap/esrimap.dart | 65 ++++++++----- lib/ui/navigator/top.dart | 5 +- lib/ui/news/news_list.dart | 7 +- .../notifications_list_view.dart | 10 +- .../parking/circular_parking_indicator.dart | 12 +-- lib/ui/parking/spot_types_view.dart | 6 +- 21 files changed, 187 insertions(+), 140 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index f190221d5..5488c54bc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -16,7 +16,7 @@ if (keystorePropertiesFile.exists()) { android { namespace = "edu.ucsd" compileSdk = 36 - ndkVersion = "27.0.12077973" + ndkVersion = "28.2.13676358" compileOptions { sourceCompatibility = JavaVersion.VERSION_17 @@ -34,7 +34,7 @@ android { defaultConfig { applicationId = "edu.ucsd" - minSdkVersion = flutter.minSdkVersion + minSdkVersion = 28 targetSdk = 36 versionCode = flutter.versionCode versionName = flutter.versionName diff --git a/lib/core/providers/classes.dart b/lib/core/providers/classes.dart index c34facb66..3399cc820 100644 --- a/lib/core/providers/classes.dart +++ b/lib/core/providers/classes.dart @@ -216,11 +216,9 @@ class ClassScheduleDataProvider extends ChangeNotifier { /// if no classes are scheduled for today then find the next day with classes var daysToAdd = 1; while (_enrolledClasses[today]!.isEmpty && daysToAdd <= 7) { - today = DateFormat('EEEE') - .format(DateTime.now().add(Duration(days: daysToAdd))) - .toString() - .toUpperCase() - .substring(0, 2); + today = DateFormat( + 'EEEE', + ).format(DateTime.now().add(Duration(days: daysToAdd))).toString().toUpperCase().substring(0, 2); nextDayWithClass = DateFormat('EEEE').format(DateTime.now().add(Duration(days: daysToAdd))); daysToAdd += 1; } diff --git a/lib/core/providers/notifications.dart b/lib/core/providers/notifications.dart index c0bb85eea..e5a42fec2 100644 --- a/lib/core/providers/notifications.dart +++ b/lib/core/providers/notifications.dart @@ -144,8 +144,9 @@ class PushNotificationDataProvider extends ChangeNotifier { NavigatorConstants.NOTIFICATIONS_TAB; /// Navigate to Notifications tab - Navigator.of(context) - .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of( + context, + ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); }); } on PlatformException { _error = 'Failed to get platform info.'; @@ -159,8 +160,9 @@ class PushNotificationDataProvider extends ChangeNotifier { Provider.of(this.context, listen: false).fetchMessages(true); /// Navigate to Notifications tab - Navigator.of(this.context) - .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of( + this.context, + ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); /// Set tab bar index to the Notifications tab Provider.of(this.context, listen: false).currentIndex = diff --git a/lib/core/services/cards.dart b/lib/core/services/cards.dart index 020a61d8a..a1d80061e 100644 --- a/lib/core/services/cards.dart +++ b/lib/core/services/cards.dart @@ -26,8 +26,10 @@ class CardsService { _cardsModel = cardsModelFromJson(_response); return true; } catch (e) { - if (e.toString().contains("401")) - if (await NetworkHelper.getNewToken(headers)) return await fetchCards(ucsdAffiliation); + if (e.toString().contains("401")) { + var isNewTokenObtained = await NetworkHelper.getNewToken(headers); + if (isNewTokenObtained) return await fetchCards(ucsdAffiliation); + } _error = e.toString(); return false; } finally { diff --git a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart index c5ef0f8f7..f832d9172 100644 --- a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart +++ b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart @@ -17,7 +17,8 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_c /// 2. Custom UC San Diego campus vector tile layers are layered directly on top to display campus-specific facilities. Basemap buildBasemap(BasemapType type, EsriMapConfig config) { // 1. Satellite Basemap: Use modern BasemapStyle for optimized CDN routing and faster raster loading. - if (type == BasemapType.satellite) return Basemap.withStyle(BasemapStyle.arcGISImagery); + var isSatellite = type == BasemapType.satellite; + if (isSatellite) return Basemap.withStyle(BasemapStyle.arcGISImagery); final basemap = Basemap(); @@ -47,7 +48,8 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { if (campusVectorLayers.isNotEmpty) { for (final layer in campusVectorLayers) { final pUrl = layer.portalKey != null ? config.portals[layer.portalKey!] : portalUrl; - if (pUrl != null && layer.itemId != null) { + var hasValidUrlAndId = pUrl != null && layer.itemId != null; + if (hasValidUrlAndId) { final portal = pUrl.contains('arcgis.com') ? Portal.arcGISOnline() : Portal(Uri.parse(pUrl)); basemap.baseLayers.add( ArcGISVectorTiledLayer.withItem(PortalItem.withPortalAndItemId(portal: portal, itemId: layer.itemId!)), diff --git a/lib/core/services/notifications_freefood.dart b/lib/core/services/notifications_freefood.dart index 7c46630f7..bdb75832e 100644 --- a/lib/core/services/notifications_freefood.dart +++ b/lib/core/services/notifications_freefood.dart @@ -75,8 +75,10 @@ class FreeFoodService { } catch (e) { /// if the authorized fetch failed we know we have to refresh the /// token for this service - if (e.toString().contains("401")) - if (await NetworkHelper.getNewToken(headers)) return await updateCount(id, body); + if (e.toString().contains("401")) { + var isNewTokenObtained = await NetworkHelper.getNewToken(headers); + if (isNewTokenObtained) return await updateCount(id, body); + } _error = e.toString(); return false; } finally { diff --git a/lib/core/services/parking.dart b/lib/core/services/parking.dart index 62f51b132..8d70e09c7 100644 --- a/lib/core/services/parking.dart +++ b/lib/core/services/parking.dart @@ -34,8 +34,10 @@ class ParkingService { } catch (e) { /// if the authorized fetch failed we know we have to refresh the /// token for this service - if (e.toString().contains("401")) - if (await NetworkHelper.getNewToken(headers)) return await fetchParkingLotData(); + if (e.toString().contains("401")) { + var isNewTokenObtained = await NetworkHelper.getNewToken(headers); + if (isNewTokenObtained) return await fetchParkingLotData(); + } _error = e.toString(); return false; } finally { diff --git a/lib/core/services/shuttle.dart b/lib/core/services/shuttle.dart index d10417ab2..69d327673 100644 --- a/lib/core/services/shuttle.dart +++ b/lib/core/services/shuttle.dart @@ -67,8 +67,10 @@ class ShuttleService { } catch (e) { /// if the authorized fetch failed we know we have to refresh the /// token for this service - if (e.toString().contains("401")) - if (await NetworkHelper.getNewToken(headers)) return await getArrivingInformation(stopId); + if (e.toString().contains("401")) { + var isNewTokenObtained = await NetworkHelper.getNewToken(headers); + if (isNewTokenObtained) return await getArrivingInformation(stopId); + } _error = e.toString(); return []; } finally { diff --git a/lib/core/utils/esri_map_feature_flags.dart b/lib/core/utils/esri_map_feature_flags.dart index 8055bbd25..cbbb879ac 100644 --- a/lib/core/utils/esri_map_feature_flags.dart +++ b/lib/core/utils/esri_map_feature_flags.dart @@ -14,27 +14,27 @@ class FeatureFlags { /// Controls the availability of the core Search Bar. /// - `true`: The top search bar is rendered, allowing text search for buildings and places. /// - `false`: The search bar is completely hidden. (Note: this effectively disables AI search and category chips too). - static const bool mapSearchEnabled = true; + static const bool MAP_SEARCH_ENABLED = true; /// Controls the availability of the AI Search feature. /// - `true`: Renders the AI search trigger button inside the search bar. /// - `false`: Hides the AI search button and prevents instantiation of AI-related models. - static const bool mapAiSearchEnabled = false; // No AI search for now. + static const bool MAP_AI_SEARCH_ENABLED = false; // No AI search for now. /// Controls the quick-filter category chips (Dining, Library, Parking, Recreation). /// - `true`: Displays the quick-filter chips when the search bar is active. /// - `false`: Hides the chips, saving UI rendering time. - static const bool mapSearchCategoriesEnabled = true; + static const bool MAP_SEARCH_CATEGORIES_ENABLED = true; /// Controls point-to-point routing and directions. /// - `true`: Enables route calculation and displays "Directions" buttons in POI details. /// - `false`: Disables route generation logic and hides related UI elements. - static const bool mapRoutingEnabled = true; + static const bool MAP_ROUTING_ENABLED = true; /// Controls device GPS location tracking. /// - `true`: Starts the location data source to query GPS hardware and shows the re-center FAB. /// - `false`: Prevents querying GPS hardware (saving battery) and hides location UI controls. - static const bool mapLocationTrackingEnabled = true; + static const bool MAP_LOCATION_TRACKING_ENABLED = true; // --------------------------------------------------------------------------- // Basemaps & Layers (inside the Map Display) @@ -45,17 +45,17 @@ class FeatureFlags { /// will instantiate and pre-load them into memory. /// - `false`: The UI buttons will be hidden, and the map controller will skip /// creating these objects, saving significant memory. - static const bool mapAlternateBasemapsEnabled = false; // No Light and Dark basemaps for now. + static const bool MAP_ALTERNATE_BASEMAPS_ENABLED = false; // No Light and Dark basemaps for now. /// Master switch for all Operational Layers (Transit, Districts, Construction). /// - `true`: Renders the "LAYERS" section in the map settings panel. /// - `false`: Hides the entire "LAYERS" section and prevents layer preloading. - static const bool mapOperationalLayersEnabled = true; + static const bool MAP_OPERATIONAL_LAYERS_ENABLED = true; - // Fine-grained layer toggles (Only effective if mapOperationalLayersEnabled is true) - static const bool transitOperationalLayerEnabled = true; - static const bool districtsOperationalLayerEnabled = true; - static const bool constructionOperationalLayerEnabled = true; + // Fine-grained layer toggles (Only effective if MAP_OPERATIONAL_LAYERS_ENABLED is true) + static const bool TRANSIT_OPERATIONAL_LAYER_ENABLED = true; + static const bool DISTRICTS_OPERATIONAL_LAYER_ENABLED = true; + static const bool CONSTRUCTION_OPERATIONAL_LAYER_ENABLED = true; // --------------------------------------------------------------------------- // SCENES Feature (inside the Map Display) @@ -64,10 +64,10 @@ class FeatureFlags { /// Master switch for the 3D Scene View toggles. /// - `true`: Renders the "SCENE" section in the map settings panel. /// - `false`: Hides the entire "SCENE" section. - static const bool mapScenesEnabled = false; + static const bool MAP_SCENES_ENABLED = false; - // Fine-grained scene toggles (Only effective if mapScenesEnabled is true) - static const bool defaultSceneEnabled = false; - static const bool threeDimensionalSceneEnabled = false; - static const bool droneViewSceneEnabled = false; + // Fine-grained scene toggles (Only effective if MAP_SCENES_ENABLED is true) + static const bool DEFAULT_SCENE_ENABLED = false; + static const bool THREE_DIMENSIONAL_SCENE_ENABLED = false; + static const bool DRONE_VIEW_SCENE_ENABLED = false; } diff --git a/lib/main.dart b/lib/main.dart index 5621483f8..afe2cbc35 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -117,8 +117,9 @@ class CampusMobile extends StatelessWidget { iconTheme: lightIconTheme, appBarTheme: lightAppBarTheme, listTileTheme: lightListTileTheme, - colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) - .copyWith(surface: lightButtonColor, brightness: Brightness.light), + colorScheme: ColorScheme.fromSwatch( + primarySwatch: ColorPrimary, + ).copyWith(surface: lightButtonColor, brightness: Brightness.light), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconLightColor, selectedItemColor: Colors.white, @@ -144,8 +145,9 @@ class CampusMobile extends StatelessWidget { appBarTheme: darkAppBarTheme, unselectedWidgetColor: darkAccentColor, listTileTheme: darkListTileTheme, - colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) - .copyWith(surface: darkButtonColor, brightness: Brightness.dark), + colorScheme: ColorScheme.fromSwatch( + primarySwatch: ColorPrimary, + ).copyWith(surface: darkButtonColor, brightness: Brightness.dark), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconDarkColor, selectedItemColor: Colors.white, diff --git a/lib/ui/classes/classes_list.dart b/lib/ui/classes/classes_list.dart index c2f997023..37a4ba82c 100644 --- a/lib/ui/classes/classes_list.dart +++ b/lib/ui/classes/classes_list.dart @@ -13,8 +13,9 @@ class ClassList extends StatelessWidget { Widget buildSchedule(BuildContext context) { List list = []; - Provider.of(context).enrolledClasses - .addAll(Provider.of(context).midterms); + Provider.of( + context, + ).enrolledClasses.addAll(Provider.of(context).midterms); Provider.of(context).enrolledClasses.keys.forEach((key) { final bool hasClasses = Provider.of(context).enrolledClasses[key]!.isNotEmpty; if (hasClasses) { diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index ea1282e79..b68d17fbe 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -160,9 +160,11 @@ Widget buildDetailSlideOverContent({ // Header GestureDetector( onVerticalDragEnd: (details) { - if (details.primaryVelocity != null && details.primaryVelocity! > 0) { + var isSwipingDown = details.primaryVelocity != null && details.primaryVelocity! > 0; + var isSwipingUp = details.primaryVelocity != null && details.primaryVelocity! < 0; + if (isSwipingDown) { if (!isMinimized) onToggle(); - } else if (details.primaryVelocity != null && details.primaryVelocity! < 0) { + } else if (isSwipingUp) { if (isMinimized) onToggle(); } }, @@ -439,7 +441,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { ), const SizedBox(width: 12), ], - if (FeatureFlags.mapRoutingEnabled) + if (FeatureFlags.MAP_ROUTING_ENABLED) Expanded( child: FilledButton.icon( onPressed: isRoutingMode ? null : () => onGetDirections(result), diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index 937a6c0e5..a59af3be3 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -153,7 +153,7 @@ class EsriMapLayersPanel extends StatelessWidget { final bottomPad = MediaQuery.of(context).padding.bottom; final isDefault = currentSceneKey == 'default'; // Hide SCENES entirely from the UI. SET to TRUE when ready to show drone view and 3D view to the user. - final showSceneSwitcher = FeatureFlags.mapScenesEnabled && config.features.scenes && !hideSceneSwitcher; + final showSceneSwitcher = FeatureFlags.MAP_SCENES_ENABLED && config.features.scenes && !hideSceneSwitcher; return Positioned( left: 12, @@ -206,30 +206,34 @@ class EsriMapLayersPanel extends StatelessWidget { scrollDirection: Axis.horizontal, child: Row( children: [ - for (final entry in config.basemaps.entries) ...[ - if (basemapTypeFromKey(entry.key) != null && - (FeatureFlags.mapAlternateBasemapsEnabled || - (basemapTypeFromKey(entry.key) != BasemapType.light && - basemapTypeFromKey(entry.key) != BasemapType.dark))) ...[ - imageTile( - label: entry.value.label, - selected: currentBasemapType == basemapTypeFromKey(entry.key), - onTap: () { - final t = basemapTypeFromKey(entry.key); - final isTypeNotNull = t != null; - if (isTypeNotNull) onSwitchBasemap(t); - }, - imageWidget: networkImage(entry.value.thumbnailAsset), - ), - const SizedBox(width: 8), - ], + for (final entry in config.basemaps.entries.where((e) { + final t = basemapTypeFromKey(e.key); + var tIsNull = t == null; + if (tIsNull) return false; + var isAlt = FeatureFlags.MAP_ALTERNATE_BASEMAPS_ENABLED; + if (isAlt) return true; + var notLight = t != BasemapType.light; + var notDark = t != BasemapType.dark; + return notLight && notDark; + })) ...[ + imageTile( + label: entry.value.label, + selected: currentBasemapType == basemapTypeFromKey(entry.key), + onTap: () { + final t = basemapTypeFromKey(entry.key); + final isTypeNotNull = t != null; + if (isTypeNotNull) onSwitchBasemap(t); + }, + imageWidget: networkImage(entry.value.thumbnailAsset), + ), + const SizedBox(width: 8), ], ], ), ), ), - if (FeatureFlags.mapOperationalLayersEnabled) ...[ + if (FeatureFlags.MAP_OPERATIONAL_LAYERS_ENABLED) ...[ const Divider(height: 24, indent: 16, endIndent: 16), sectionLabel('Map Details'), @@ -239,24 +243,24 @@ class EsriMapLayersPanel extends StatelessWidget { scrollDirection: Axis.horizontal, child: Row( children: [ - for (final entry in config.layers.entries) ...[ - if ((entry.key == 'tritonTransit' && FeatureFlags.transitOperationalLayerEnabled) || - (entry.key == 'campusDistricts' && - FeatureFlags.districtsOperationalLayerEnabled) || - (entry.key == 'construction' && - FeatureFlags.constructionOperationalLayerEnabled) || - (entry.key != 'tritonTransit' && - entry.key != 'campusDistricts' && - entry.key != 'construction')) ...[ - imageTile( - label: entry.value.label, - selected: layerVisible[entry.key] ?? false, - loading: layerLoading[entry.key] ?? false, - onTap: () => onToggleLayer(entry.key), - imageWidget: networkImage(entry.value.thumbnailAsset), - ), - const SizedBox(width: 8), - ], + for (final entry in config.layers.entries.where((e) { + var key = e.key; + var isTransit = key == 'tritonTransit'; + if (isTransit) return FeatureFlags.TRANSIT_OPERATIONAL_LAYER_ENABLED; + var isDist = key == 'campusDistricts'; + if (isDist) return FeatureFlags.DISTRICTS_OPERATIONAL_LAYER_ENABLED; + var isConst = key == 'construction'; + if (isConst) return FeatureFlags.CONSTRUCTION_OPERATIONAL_LAYER_ENABLED; + return true; + })) ...[ + imageTile( + label: entry.value.label, + selected: layerVisible[entry.key] ?? false, + loading: layerLoading[entry.key] ?? false, + onTap: () => onToggleLayer(entry.key), + imageWidget: networkImage(entry.value.thumbnailAsset), + ), + const SizedBox(width: 8), ], ], ), @@ -277,12 +281,17 @@ class EsriMapLayersPanel extends StatelessWidget { child: Wrap( spacing: 8, children: [ - for (final entry in config.scenes.entries) - if ((entry.key == 'default' && FeatureFlags.defaultSceneEnabled) || - (entry.key == 'building3d' && FeatureFlags.threeDimensionalSceneEnabled) || - (entry.key == 'droneView' && FeatureFlags.droneViewSceneEnabled) || - (entry.key != 'default' && entry.key != 'building3d' && entry.key != 'droneView')) - sceneChip(entry.key, entry.value.label, currentSceneKey == entry.key), + for (final entry in config.scenes.entries.where((e) { + var key = e.key; + var isDef = key == 'default'; + if (isDef) return FeatureFlags.DEFAULT_SCENE_ENABLED; + var is3d = key == 'building3d'; + if (is3d) return FeatureFlags.THREE_DIMENSIONAL_SCENE_ENABLED; + var isDrone = key == 'droneView'; + if (isDrone) return FeatureFlags.DRONE_VIEW_SCENE_ENABLED; + return true; + })) + sceneChip(entry.key, entry.value.label, currentSceneKey == entry.key), ], ), ), diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart index 1c9525098..343b26922 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart @@ -42,7 +42,7 @@ class _EsriMapScaleBarState extends State { double _lastScale = 0.0; /// Standard round imperial distances in feet. - static const List _imperialDistances = [ + static const List _IMPERIAL_DISTANCES = [ 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5280, // 1 mi 10560, // 2 mi @@ -53,7 +53,7 @@ class _EsriMapScaleBarState extends State { ]; /// Standard round metric distances in meters. - static const List _metricDistances = [ + static const List _METRIC_DISTANCES = [ 0.5, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, // 1 km 2000, // 2 km @@ -75,7 +75,8 @@ class _EsriMapScaleBarState extends State { void didUpdateWidget(covariant EsriMapScaleBar oldWidget) { super.didUpdateWidget(oldWidget); // Detect zoom/scale changes - if (widget.scale > 0 && (widget.scale - _lastScale).abs() > 0.05) { + var hasSignificantScaleChange = widget.scale > 0 && (widget.scale - _lastScale).abs() > 0.05; + if (hasSignificantScaleChange) { _lastScale = widget.scale; if (widget.autoFade) _triggerZoomFade(); } @@ -121,10 +122,10 @@ class _EsriMapScaleBarState extends State { if (metersPerPx <= 0) return const SizedBox.shrink(); // Target scale bar width between 40 and 100 logical pixels - double chosenImperialFt = _imperialDistances.first; + double chosenImperialFt = _IMPERIAL_DISTANCES.first; double chosenWidthPx = 60.0; - for (final ft in _imperialDistances) { + for (final ft in _IMPERIAL_DISTANCES) { final meters = ft * 0.3048; final px = meters / metersPerPx; if (px >= 40 && px <= 100) { @@ -146,8 +147,8 @@ class _EsriMapScaleBarState extends State { // Find matching metric distance for the chosen width final barMeters = chosenWidthPx * metersPerPx; - double chosenMetricMeters = _metricDistances.first; - for (final m in _metricDistances) { + double chosenMetricMeters = _METRIC_DISTANCES.first; + for (final m in _METRIC_DISTANCES) { if (m <= barMeters * 1.3) { chosenMetricMeters = m; } else { diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index 7913292ae..e00d79459 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -139,6 +139,7 @@ class EsriMapSearchBar extends StatelessWidget { @override Widget build(BuildContext context) { + var isAiSearchEnabled = FeatureFlags.MAP_AI_SEARCH_ENABLED && (config?.features.aiSearch ?? false); const searchFontSize = 16.0; final isDark = Theme.of(context).brightness == Brightness.dark; final searchTextColor = isDark ? descriptiveTextColorDark : descriptiveTextColorLight; @@ -147,7 +148,7 @@ class EsriMapSearchBar extends StatelessWidget { final isSearchNotEmpty = searchController.text.isNotEmpty; final hasClassMatches = - FeatureFlags.mapSearchCategoriesEnabled && + FeatureFlags.MAP_SEARCH_CATEGORIES_ENABLED && matchingPoiClasses.isNotEmpty && isSearchNotEmpty && !showSuggestions; @@ -324,7 +325,7 @@ class EsriMapSearchBar extends StatelessWidget { ), ), if (isSearchNotEmpty) IconButton(icon: const Icon(Icons.clear), onPressed: onClearSearch), - if (FeatureFlags.mapAiSearchEnabled && (config?.features.aiSearch ?? false)) + if (isAiSearchEnabled) IconButton( icon: Icon( Icons.auto_awesome, diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index ec38dfc14..4a4eb7210 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -75,7 +75,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final _locationDataSource = SystemLocationDataSource(); // Search State - static const _minimumSearchLoadingDuration = Duration(milliseconds: 400); + static const _MINIMUM_SEARCH_LOADING_DURATION = Duration(milliseconds: 400); List _searchResults = []; List _allPoiClasses = []; List _matchingPoiClasses = []; @@ -211,8 +211,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Constructs initial basemaps and sets initial campus viewpoint. void _initMap(EsriMapConfig config) { for (final type in BasemapType.values) { - if (!FeatureFlags.mapAlternateBasemapsEnabled && (type == BasemapType.light || type == BasemapType.dark)) - continue; + var shouldSkipBasemap = + !FeatureFlags.MAP_ALTERNATE_BASEMAPS_ENABLED && (type == BasemapType.light || type == BasemapType.dark); + if (shouldSkipBasemap) continue; _basemaps[type] = buildBasemap(type, config); } @@ -259,8 +260,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _viewpointChangedSubscription = _mapViewController.onViewpointChanged.listen((_) { final now = DateTime.now(); - if (lastUpdateTime != null && now.difference(lastUpdateTime!).inMilliseconds < 32) - return; // Throttle to ~30 FPS to prevent heavy jitter + var isRecentUpdate = lastUpdateTime != null && now.difference(lastUpdateTime!).inMilliseconds < 32; + if (isRecentUpdate) return; // Throttle to ~30 FPS to prevent heavy jitter lastUpdateTime = now; final vp = _mapViewController.getCurrentViewpoint(ViewpointType.centerAndScale); @@ -295,7 +296,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { void _preloadHeavyLayers() async { if (_config == null) return; for (final entry in _config!.layers.entries) { - if (entry.value.source == 'portalItem' && !_layerInstances.containsKey(entry.key)) { + var needsPreload = entry.value.source == 'portalItem' && !_layerInstances.containsKey(entry.key); + if (needsPreload) { final instances = await _buildLayerInstances(entry.key, entry.value); _layerInstances[entry.key] = instances; for (final layer in instances) { @@ -345,7 +347,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Starts the device location data source. Future _startLocationDisplay() async { - if (!FeatureFlags.mapLocationTrackingEnabled) return; + if (!FeatureFlags.MAP_LOCATION_TRACKING_ENABLED) return; bool serviceEnabled = await Geolocator.isLocationServiceEnabled(); if (!serviceEnabled) { @@ -601,7 +603,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ]; } - if (entry.source == 'portalItem' && entry.portalKey != null && entry.itemId != null) { + var isPortalItem = entry.source == 'portalItem' && entry.portalKey != null && entry.itemId != null; + if (isPortalItem) { final portalUrl = _config?.portals[entry.portalKey!]; if (portalUrl != null) { final portalItem = PortalItem.withPortalAndItemId(portal: Portal(Uri.parse(portalUrl)), itemId: entry.itemId!); @@ -622,7 +625,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } - if (entry.hasSublayers) return entry.sublayers!.map(_layerFromSublayer).toList(); + var hasSub = entry.hasSublayers; + if (hasSub) return entry.sublayers!.map(_layerFromSublayer).toList(); return [_layerFromEntry(entry)]; } @@ -756,7 +760,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } Future _waitForMinimumSearchLoadingTime(Stopwatch stopwatch) async { - final remaining = _minimumSearchLoadingDuration - stopwatch.elapsed; + final remaining = _MINIMUM_SEARCH_LOADING_DURATION - stopwatch.elapsed; if (remaining > Duration.zero) await Future.delayed(remaining); } @@ -818,9 +822,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _toFocusNode.unfocus(); try { + var isRec = category.poiClassValue == 'Recreation Facilities'; final searches = >>[ EsriMapSearchService.queryPOIsByClass(category.poiClassValue), - if (category.poiClassValue == 'Recreation Facilities') EsriMapSearchService.queryBuildings('gym'), + if (isRec) EsriMapSearchService.queryBuildings('gym'), ]; final allResults = (await Future.wait(searches)).expand((results) => results).toList(); await _waitForMinimumSearchLoadingTime(loadingStopwatch); @@ -853,8 +858,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); if (allResults.isEmpty) { - ScaffoldMessenger.of(context) - .showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); } } catch (e) { debugPrint('Category search error: $e'); @@ -866,8 +872,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _allCategoryResults = []; _isSearching = false; }); - ScaffoldMessenger.of(context) - .showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); } } @@ -1129,7 +1136,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { void _selectResultFromList(MapSearchResult result) { final index = _mappedResults.indexOf(result); - if (index < 0 || index >= _graphicsOverlay.graphics.length) { + var isOutOfBounds = index < 0 || index >= _graphicsOverlay.graphics.length; + if (isOutOfBounds) { _selectResultFromPin(result); return; } @@ -1384,7 +1392,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // --------------------------------------------------------------------------- Future _solveRoute(MapSearchResult destination, {String? travelMode, (double, double)? originLatLng}) async { - if (!FeatureFlags.mapRoutingEnabled) return; + if (!FeatureFlags.MAP_ROUTING_ENABLED) return; final mode = travelMode ?? _travelMode; setState(() { @@ -1393,12 +1401,15 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _travelMode = mode; }); - if (originLatLng == null && _getUserLatLng() == null) await _startLocationDisplay(); + var noOriginOrUserLocation = originLatLng == null && _getUserLatLng() == null; + if (noOriginOrUserLocation) await _startLocationDisplay(); var userLatLng = originLatLng ?? _getUserLatLng(); - if (userLatLng == null && await Geolocator.isLocationServiceEnabled()) { + var isServiceEnabled = await Geolocator.isLocationServiceEnabled(); + if (userLatLng == null && isServiceEnabled) { final permission = await Geolocator.checkPermission(); - if (permission == LocationPermission.whileInUse || permission == LocationPermission.always) { + var isGranted = permission == LocationPermission.whileInUse || permission == LocationPermission.always; + if (isGranted) { try { final loc = await Geolocator.getCurrentPosition( locationSettings: const LocationSettings(timeLimit: Duration(seconds: 3)), @@ -1712,7 +1723,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } void _hideSearchOverlayWhenUnfocused() { - if (_focusNode.hasFocus || _fromFocusNode.hasFocus || _toFocusNode.hasFocus) return; + var hasFocus = _focusNode.hasFocus || _fromFocusNode.hasFocus || _toFocusNode.hasFocus; + if (hasFocus) return; setState(() { _showSuggestions = false; _showResults = false; @@ -1813,6 +1825,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final isFabVisible = !keyboardVisible && !_showLayersPanel; final isLayersPanelVisible = _showLayersPanel && _config != null; + final isSearchEnabledAndDefault = FeatureFlags.MAP_SEARCH_ENABLED && isDefaultScene; + final shouldShowScaleBar = _sceneMode == 'default' && _selectedResult == null && !shouldShowCatListPanel; return Scaffold( body: Stack( @@ -1890,7 +1904,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), // Floating top search bar & suggestion panel - if (FeatureFlags.mapSearchEnabled && isDefaultScene) + if (isSearchEnabledAndDefault) Positioned( top: 8, left: 12, @@ -2065,8 +2079,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } if (gps == null) { if (mounted) { - ScaffoldMessenger.of(context) - .showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + ScaffoldMessenger.of( + context, + ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } @@ -2107,7 +2122,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), // Dynamic Google Maps-style Scale Bar Indicator - if (_sceneMode == 'default' && _selectedResult == null && !shouldShowCatListPanel) + if (shouldShowScaleBar) Positioned( bottom: 24, right: 16, diff --git a/lib/ui/navigator/top.dart b/lib/ui/navigator/top.dart index 180d4f1fb..f4792bbf7 100644 --- a/lib/ui/navigator/top.dart +++ b/lib/ui/navigator/top.dart @@ -27,8 +27,9 @@ class CMAppBar extends StatelessWidget { Provider.of(context, listen: false).currentIndex = NavigatorConstants.HOME_TAB; // Navigate to Home tab - Navigator.of(context) - .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of( + context, + ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); // change the appBar title to the ucsd logo Provider.of(context, listen: false).changeTitle(CustomAppBar().appBar.title); }, diff --git a/lib/ui/news/news_list.dart b/lib/ui/news/news_list.dart index 3ab74c34a..a756b475c 100644 --- a/lib/ui/news/news_list.dart +++ b/lib/ui/news/news_list.dart @@ -106,8 +106,11 @@ class NewsList extends StatelessWidget { ), TextSpan( text: ' - ', - style: Theme.of(context).textTheme.headlineMedium! - .copyWith(height: 1.42, fontSize: 16.0, decoration: TextDecoration.none), + style: Theme.of(context).textTheme.headlineMedium!.copyWith( + height: 1.42, + fontSize: 16.0, + decoration: TextDecoration.none, + ), ), TextSpan( text: newsItem.title, diff --git a/lib/ui/notifications/notifications_list_view.dart b/lib/ui/notifications/notifications_list_view.dart index 4b96562b4..54e301058 100644 --- a/lib/ui/notifications/notifications_list_view.dart +++ b/lib/ui/notifications/notifications_list_view.dart @@ -183,8 +183,9 @@ class _NotificationsListViewState extends State { } }, options: LinkifyOptions(humanize: false), - style: Theme.of(context).textTheme.bodySmall - ?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), + style: Theme.of( + context, + ).textTheme.bodySmall?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), ), freefoodProvider.isFreeFood(data.messageId) ? FreeFoodNotification(messageId: data.messageId) : Container(), ], @@ -197,8 +198,9 @@ class _NotificationsListViewState extends State { padding: const EdgeInsets.only(top: 6.0), child: Text( _readTimestamp(data.timestamp), - style: Theme.of(context).textTheme.bodySmall - ?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), + style: Theme.of( + context, + ).textTheme.bodySmall?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), ), ), ], diff --git a/lib/ui/parking/circular_parking_indicator.dart b/lib/ui/parking/circular_parking_indicator.dart index 90deb068c..d3001d352 100644 --- a/lib/ui/parking/circular_parking_indicator.dart +++ b/lib/ui/parking/circular_parking_indicator.dart @@ -217,12 +217,12 @@ class CircularParkingIndicators extends StatelessWidget { } Widget buildSpotsAvailableText(BuildContext context) { - final openSpots = Provider.of(context) - .getApproxNumOfOpenSpots(model.locationName)["Open"] - .toString(); - final totalSpots = Provider.of(context) - .getApproxNumOfOpenSpots(model.locationName)["Total"] - .toString(); + final openSpots = Provider.of( + context, + ).getApproxNumOfOpenSpots(model.locationName)["Open"].toString(); + final totalSpots = Provider.of( + context, + ).getApproxNumOfOpenSpots(model.locationName)["Total"].toString(); final visualText = "~$openSpots of $totalSpots Spots Available"; final semanticText = "Approximately $openSpots of $totalSpots Spots Available"; diff --git a/lib/ui/parking/spot_types_view.dart b/lib/ui/parking/spot_types_view.dart index 0704a3d62..4e2c5bb0f 100644 --- a/lib/ui/parking/spot_types_view.dart +++ b/lib/ui/parking/spot_types_view.dart @@ -46,9 +46,9 @@ class _SpotTypesViewState extends State { ); List createList(BuildContext context) { - var selectedSpots = Provider.of(context).spotTypesState.values - .where((selected) => selected == true) - .length; + var selectedSpots = Provider.of( + context, + ).spotTypesState.values.where((selected) => selected == true).length; List list = []; From d3eaca4fdf8ff9218758401410277c92945b35ad Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 17 Aug 2026 12:35:50 -0700 Subject: [PATCH 081/139] improved the user's location --- lib/ui/esrimap/esrimap.dart | 86 ++++++++++++++++++++++++------------- 1 file changed, 55 insertions(+), 31 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 4a4eb7210..2ddd495e3 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -101,6 +101,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { EsriSearchCategory? _activeCategory; // FAB & Viewpoint State + bool _isLocationDataSourceStarted = false; + bool _isStartingLocationDataSource = false; + bool _isLocatingUser = false; bool _isLocationActive = false; bool _isRecenterActive = false; bool _ignoreViewpointReset = false; @@ -348,10 +351,13 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Starts the device location data source. Future _startLocationDisplay() async { if (!FeatureFlags.MAP_LOCATION_TRACKING_ENABLED) return; + if (_isLocationDataSourceStarted || _isStartingLocationDataSource) return; + _isStartingLocationDataSource = true; bool serviceEnabled = await Geolocator.isLocationServiceEnabled(); if (!serviceEnabled) { debugPrint('Location services are disabled.'); + _isStartingLocationDataSource = false; return; } @@ -360,24 +366,56 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { permission = await Geolocator.requestPermission(); if (permission == LocationPermission.denied) { debugPrint('Location permissions are denied'); + _isStartingLocationDataSource = false; return; } } if (permission == LocationPermission.deniedForever) { debugPrint('Location permissions are permanently denied'); + _isStartingLocationDataSource = false; return; } try { await _locationDataSource.start(); + _isLocationDataSourceStarted = true; } on ArcGISException catch (e) { debugPrint('Location error: ${e.message}'); } catch (e) { debugPrint('Location error: $e'); + } finally { + _isStartingLocationDataSource = false; } } + /// Efficiently fetches device location falling back from fastest to slowest + Future<(double, double)?> _getDeviceLocationEfficiently() async { + await _startLocationDisplay(); + + // 1. Try internal ArcGIS cached position first + var gps = _getUserLatLng(); + if (gps != null) return gps; + + // 2. Fallback to Geolocator last known position + try { + final lastKnown = await Geolocator.getLastKnownPosition(); + if (lastKnown != null) { + return (lastKnown.latitude, lastKnown.longitude); + } + } catch (_) {} + + // 3. Fallback to a fresh fetch + try { + final pos = await Geolocator.getCurrentPosition( + locationSettings: const LocationSettings(timeLimit: Duration(seconds: 5)), + ); + return (pos.latitude, pos.longitude); + } catch (_) {} + + return null; + } + /// Preloads non-active basemaps into memory. void _preloadAlternateBasemaps() { for (final entry in _basemaps.entries) { @@ -1212,18 +1250,24 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } Future _recenterOnUser() async { + if (_isLocatingUser) return; + _isLocatingUser = true; + try { - await _startLocationDisplay(); - final location = await Geolocator.getCurrentPosition( - locationSettings: const LocationSettings(timeLimit: Duration(seconds: 10)), - ); + final gps = await _getDeviceLocationEfficiently(); + if (gps == null) { + if (mounted) { + ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + } + return; + } if (!mounted) return; _ignoreViewpointReset = true; setState(() => _isLocationActive = true); await _mapViewController.setViewpointAnimated( Viewpoint.fromCenter( - ArcGISPoint(x: location.longitude, y: location.latitude, spatialReference: SpatialReference.wgs84), + ArcGISPoint(x: gps.$2, y: gps.$1, spatialReference: SpatialReference.wgs84), scale: 10000, ), ); @@ -1236,6 +1280,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { debugPrint('Location error: $e'); if (!mounted) return; ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + } finally { + if (mounted) _isLocatingUser = false; } } @@ -1401,22 +1447,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _travelMode = mode; }); - var noOriginOrUserLocation = originLatLng == null && _getUserLatLng() == null; - if (noOriginOrUserLocation) await _startLocationDisplay(); - - var userLatLng = originLatLng ?? _getUserLatLng(); - var isServiceEnabled = await Geolocator.isLocationServiceEnabled(); - if (userLatLng == null && isServiceEnabled) { - final permission = await Geolocator.checkPermission(); - var isGranted = permission == LocationPermission.whileInUse || permission == LocationPermission.always; - if (isGranted) { - try { - final loc = await Geolocator.getCurrentPosition( - locationSettings: const LocationSettings(timeLimit: Duration(seconds: 3)), - ); - userLatLng = (loc.latitude, loc.longitude); - } catch (_) {} - } + var userLatLng = originLatLng; + if (userLatLng == null) { + userLatLng = await _getDeviceLocationEfficiently(); } final isUserLatLngNull = userLatLng == null; @@ -2067,16 +2100,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { showRouteFields: _showRouteFields, activeRouteField: _activeRouteField, onSelectCurrentLocation: () async { - await _startLocationDisplay(); - (double, double)? gps = _getUserLatLng(); - if (gps == null) { - try { - final pos = await Geolocator.getCurrentPosition( - locationSettings: const LocationSettings(timeLimit: Duration(seconds: 10)), - ); - gps = (pos.latitude, pos.longitude); - } catch (_) {} - } + (double, double)? gps = await _getDeviceLocationEfficiently(); if (gps == null) { if (mounted) { ScaffoldMessenger.of( From d3629eb3e6cc34b70f0ad6e6656fb4b97bcbd91d Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 17 Aug 2026 12:42:10 -0700 Subject: [PATCH 082/139] fixed location pin --- lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart | 13 ++++++++++++- lib/ui/esrimap/esrimap.dart | 14 +++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index ee4cb8d68..36ad63ab2 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -216,6 +216,7 @@ class _MapDisplaysIconPainter extends CustomPainter { class EsriMapLocationFab extends StatelessWidget { final bool isDark; final bool isLocationActive; + final bool isLoading; final double? bearingToUser; final double mapRotation; final VoidCallback onRecenterOnUser; @@ -224,6 +225,7 @@ class EsriMapLocationFab extends StatelessWidget { Key? key, required this.isDark, this.isLocationActive = false, + this.isLoading = false, this.bearingToUser, this.mapRotation = 0.0, required this.onRecenterOnUser, @@ -237,7 +239,16 @@ class EsriMapLocationFab extends StatelessWidget { final activeBgColor = isDark ? Colors.blue[900]!.withValues(alpha: 0.5) : const Color(0xFFE8F0FE); Widget iconWidget; - if (isLocationActive || bearingToUser != null) { + if (isLoading) { + iconWidget = SizedBox( + width: 24, + height: 24, + child: CircularProgressIndicator( + strokeWidth: 2.5, + valueColor: AlwaysStoppedAnimation(Colors.blue[600]!), + ), + ); + } else if (isLocationActive || bearingToUser != null) { double totalRotation = 0; if (!isLocationActive && bearingToUser != null) { final mapRotRad = mapRotation * math.pi / 180.0; diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 2ddd495e3..be58f63a8 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1251,13 +1251,15 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Future _recenterOnUser() async { if (_isLocatingUser) return; - _isLocatingUser = true; + setState(() => _isLocatingUser = true); try { final gps = await _getDeviceLocationEfficiently(); if (gps == null) { if (mounted) { - ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + ScaffoldMessenger.of( + context, + ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } @@ -1266,10 +1268,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _ignoreViewpointReset = true; setState(() => _isLocationActive = true); await _mapViewController.setViewpointAnimated( - Viewpoint.fromCenter( - ArcGISPoint(x: gps.$2, y: gps.$1, spatialReference: SpatialReference.wgs84), - scale: 10000, - ), + Viewpoint.fromCenter(ArcGISPoint(x: gps.$2, y: gps.$1, spatialReference: SpatialReference.wgs84), scale: 10000), ); if (mounted) { setState(() { @@ -1281,7 +1280,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (!mounted) return; ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } finally { - if (mounted) _isLocatingUser = false; + if (mounted) setState(() => _isLocatingUser = false); } } @@ -1928,6 +1927,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { child: EsriMapLocationFab( isDark: isDark, isLocationActive: _isLocationActive, + isLoading: _isLocatingUser, bearingToUser: bearing, mapRotation: _mapRotation, onRecenterOnUser: _recenterOnUser, From 521bf9fc3574e4a77f51ac9fe222e9e7144fd62c Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 17 Aug 2026 13:19:28 -0700 Subject: [PATCH 083/139] fixed the location on edge cases --- .../esrimap/esri_map_widgets/esrimap_fab.dart | 8 +- lib/ui/esrimap/esrimap.dart | 162 ++++++++++++------ 2 files changed, 115 insertions(+), 55 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index 36ad63ab2..20f2a216a 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -216,6 +216,7 @@ class _MapDisplaysIconPainter extends CustomPainter { class EsriMapLocationFab extends StatelessWidget { final bool isDark; final bool isLocationActive; + final bool isUserVisible; final bool isLoading; final double? bearingToUser; final double mapRotation; @@ -225,6 +226,7 @@ class EsriMapLocationFab extends StatelessWidget { Key? key, required this.isDark, this.isLocationActive = false, + this.isUserVisible = false, this.isLoading = false, this.bearingToUser, this.mapRotation = 0.0, @@ -248,7 +250,7 @@ class EsriMapLocationFab extends StatelessWidget { valueColor: AlwaysStoppedAnimation(Colors.blue[600]!), ), ); - } else if (isLocationActive || bearingToUser != null) { + } else if (isLocationActive || isUserVisible || bearingToUser != null) { double totalRotation = 0; if (!isLocationActive && bearingToUser != null) { final mapRotRad = mapRotation * math.pi / 180.0; @@ -264,8 +266,8 @@ class EsriMapLocationFab extends StatelessWidget { height: 30, decoration: BoxDecoration(shape: BoxShape.circle, color: activeBgColor), ), - // Directional Triangle (only if inactive) - if (!isLocationActive && bearingToUser != null) + // Directional Triangle (only if inactive and user is not visible) + if (!isLocationActive && !isUserVisible && bearingToUser != null) Transform.rotate( angle: totalRotation, child: Container( diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index be58f63a8..243c7d1b1 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -31,6 +31,7 @@ import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_s import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; +import 'package:hive/hive.dart'; import 'package:url_launcher/url_launcher.dart'; import 'dart:ui' as ui; @@ -101,8 +102,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { EsriSearchCategory? _activeCategory; // FAB & Viewpoint State - bool _isLocationDataSourceStarted = false; - bool _isStartingLocationDataSource = false; + // FAB & Viewpoint State bool _isLocatingUser = false; bool _isLocationActive = false; bool _isRecenterActive = false; @@ -111,6 +111,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { double _currentScale = 24000.0; bool _isDisposed = false; StreamSubscription? _viewpointChangedSubscription; + bool _hasNetworkError = false; // Routing State bool _isRouting = false; @@ -148,7 +149,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { (double lat, double lng)? _currentMapCenter; - final _mapReadyCompleter = Completer(); + var _mapReadyCompleter = Completer(); double _calculateBearing(double startLat, double startLng, double endLat, double endLng) { final startLatRad = startLat * math.pi / 180; @@ -196,18 +197,21 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _toFocusNode.addListener(_onToFocusChanged); } - /// Fetches remote configuration JSON before initializing the map. Future _fetchConfigThenInit() async { + setState(() => _hasNetworkError = false); + if (_mapReadyCompleter.isCompleted) { + _mapReadyCompleter = Completer(); + } try { final config = await EsriMapConfigService.instance.fetch(); - final isNotMounted = !mounted; - if (isNotMounted) return; + if (!mounted) return; setState(() => _config = config); _initMap(config); _fetchAllPoiClasses(); } catch (e) { debugPrint('Config fetch failed: $e'); - _mapReadyCompleter.completeError(e); + if (mounted) setState(() => _hasNetworkError = true); + if (!_mapReadyCompleter.isCompleted) _mapReadyCompleter.completeError(e); } } @@ -255,6 +259,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.locationDisplay.autoPanMode = LocationDisplayAutoPanMode.off; _startLocationDisplay(); + _mapViewController.locationDisplay.onLocationChanged.listen((event) { + final pos = event.position; + final wgs = GeometryEngine.project(pos, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; + if (wgs != null) { + _saveLocationToHive(wgs.y, wgs.x); + } + }); + _preloadAlternateBasemaps(); _preloadHeavyLayers(); @@ -347,43 +359,38 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // --------------------------------------------------------------------------- // Location & Basemaps Helpers // --------------------------------------------------------------------------- + bool _isStartingLocationDataSource = false; /// Starts the device location data source. Future _startLocationDisplay() async { if (!FeatureFlags.MAP_LOCATION_TRACKING_ENABLED) return; - if (_isLocationDataSourceStarted || _isStartingLocationDataSource) return; + if (_isStartingLocationDataSource) return; _isStartingLocationDataSource = true; - bool serviceEnabled = await Geolocator.isLocationServiceEnabled(); - if (!serviceEnabled) { - debugPrint('Location services are disabled.'); - _isStartingLocationDataSource = false; - return; - } + try { + bool serviceEnabled = await Geolocator.isLocationServiceEnabled(); + if (!serviceEnabled) { + debugPrint('Location services are disabled.'); + return; + } - LocationPermission permission = await Geolocator.checkPermission(); - if (permission == LocationPermission.denied) { - permission = await Geolocator.requestPermission(); + LocationPermission permission = await Geolocator.checkPermission(); if (permission == LocationPermission.denied) { - debugPrint('Location permissions are denied'); - _isStartingLocationDataSource = false; - return; + permission = await Geolocator.requestPermission(); + if (permission == LocationPermission.denied) { + debugPrint('Location permissions are denied'); + return; + } } - } - if (permission == LocationPermission.deniedForever) { - debugPrint('Location permissions are permanently denied'); - _isStartingLocationDataSource = false; - return; - } + if (permission == LocationPermission.deniedForever) { + debugPrint('Location permissions are permanently denied'); + return; + } - try { await _locationDataSource.start(); - _isLocationDataSourceStarted = true; - } on ArcGISException catch (e) { - debugPrint('Location error: ${e.message}'); - } catch (e) { - debugPrint('Location error: $e'); + } catch (_) { + // Ignore if already started } finally { _isStartingLocationDataSource = false; } @@ -397,7 +404,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { var gps = _getUserLatLng(); if (gps != null) return gps; - // 2. Fallback to Geolocator last known position + // 2. Try Fallback to Geolocator last known position try { final lastKnown = await Geolocator.getLastKnownPosition(); if (lastKnown != null) { @@ -405,7 +412,11 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } catch (_) {} - // 3. Fallback to a fresh fetch + // 3. Try Hive cached location + final hiveLocation = await _loadLocationFromHive(); + if (hiveLocation != null) return hiveLocation; + + // 4. Fallback to a fresh fetch try { final pos = await Geolocator.getCurrentPosition( locationSettings: const LocationSettings(timeLimit: Duration(seconds: 5)), @@ -1604,6 +1615,26 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return projected as Envelope?; } + Future _saveLocationToHive(double lat, double lng) async { + try { + final box = await Hive.openBox('mapLocationCache'); + await box.put('lat', lat); + await box.put('lng', lng); + } catch (_) {} + } + + Future<(double, double)?> _loadLocationFromHive() async { + try { + final box = await Hive.openBox('mapLocationCache'); + final lat = box.get('lat') as double?; + final lng = box.get('lng') as double?; + if (lat != null && lng != null) { + return (lat, lng); + } + } catch (_) {} + return null; + } + IconData _iconForResult(MapSearchResult result) { final isBuilding = result.source == MapSearchSource.building; return isBuilding ? Icons.business : Icons.place; @@ -1854,10 +1885,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final indexedStackIndex = isBuilding3dScene ? 1 : (isDroneViewScene ? 2 : 0); - final isFabVisible = !keyboardVisible && !_showLayersPanel; + final isFabVisible = !_hasNetworkError && !keyboardVisible && !_showLayersPanel; final isLayersPanelVisible = _showLayersPanel && _config != null; - final isSearchEnabledAndDefault = FeatureFlags.MAP_SEARCH_ENABLED && isDefaultScene; + final isSearchEnabledAndDefault = FeatureFlags.MAP_SEARCH_ENABLED && isDefaultScene && !_hasNetworkError; final shouldShowScaleBar = _sceneMode == 'default' && _selectedResult == null && !shouldShowCatListPanel; return Scaffold( @@ -1867,21 +1898,34 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Column( children: [ Expanded( - child: IndexedStack( - index: indexedStackIndex, - children: [ - Listener( - onPointerDown: _onMapPointerDown, - child: ArcGISMapView( - controllerProvider: () => _mapViewController, - onMapViewReady: _onMapViewReady, - onTap: _onMapTap, + child: _hasNetworkError + ? Center( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + const Icon(Icons.wifi_off, size: 48, color: Colors.grey), + const SizedBox(height: 16), + const Text('Network error. Please try again.', style: TextStyle(fontSize: 16)), + const SizedBox(height: 16), + ElevatedButton(onPressed: _fetchConfigThenInit, child: const Text('Reload')), + ], + ), + ) + : IndexedStack( + index: indexedStackIndex, + children: [ + Listener( + onPointerDown: _onMapPointerDown, + child: ArcGISMapView( + controllerProvider: () => _mapViewController, + onMapViewReady: _onMapViewReady, + onTap: _onMapTap, + ), + ), + _scene3DWidget ?? const SizedBox.shrink(), + _sceneDroneWidget ?? const SizedBox.shrink(), + ], ), - ), - _scene3DWidget ?? const SizedBox.shrink(), - _sceneDroneWidget ?? const SizedBox.shrink(), - ], - ), ), ], ), @@ -1909,6 +1953,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Builder( builder: (context) { double? bearing; + bool isUserVisible = false; if (!_isLocationActive && _currentMapCenter != null) { final userLoc = _getUserLatLng(); if (userLoc != null) { @@ -1916,8 +1961,20 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final mapLng = _currentMapCenter!.$2; final userLat = userLoc.$1; final userLng = userLoc.$2; - // Bearing pointing FROM map center TO user location - bearing = _calculateBearing(mapLat, mapLng, userLat, userLng); + + try { + final pos = _mapViewController.locationDisplay.location?.position; + final vp = _mapViewController.getCurrentViewpoint(ViewpointType.boundingGeometry); + final geom = vp?.targetGeometry; + if (pos != null && geom != null) { + isUserVisible = GeometryEngine.intersects(geometry1: pos, geometry2: geom); + } + } catch (_) {} + + if (!isUserVisible) { + // Bearing pointing FROM map center TO user location + bearing = _calculateBearing(mapLat, mapLng, userLat, userLng); + } } } @@ -1927,6 +1984,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { child: EsriMapLocationFab( isDark: isDark, isLocationActive: _isLocationActive, + isUserVisible: isUserVisible, isLoading: _isLocatingUser, bearingToUser: bearing, mapRotation: _mapRotation, From b7d969961af71c46cb6a4f005191dc675f839f36 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 17 Aug 2026 13:34:46 -0700 Subject: [PATCH 084/139] applied asynchronous animations --- .../esrimap/esri_map_widgets/esrimap_fab.dart | 2 +- lib/ui/esrimap/esrimap.dart | 53 +++++++++++++------ 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index 20f2a216a..0332c4deb 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -269,7 +269,7 @@ class EsriMapLocationFab extends StatelessWidget { // Directional Triangle (only if inactive and user is not visible) if (!isLocationActive && !isUserVisible && bearingToUser != null) Transform.rotate( - angle: totalRotation, + angle: totalRotation.isNaN ? 0.0 : totalRotation, child: Container( width: 30, height: 30, diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 243c7d1b1..5e09c7a87 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -73,7 +73,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Map State & Services // --------------------------------------------------------------------------- EsriMapConfig? _config; - final _locationDataSource = SystemLocationDataSource(); + var _locationDataSource = SystemLocationDataSource(); // Search State static const _MINIMUM_SEARCH_LOADING_DURATION = Duration(milliseconds: 400); @@ -257,6 +257,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Configure location display settings _mapViewController.locationDisplay.dataSource = _locationDataSource; _mapViewController.locationDisplay.autoPanMode = LocationDisplayAutoPanMode.off; + _mapViewController.locationDisplay.showLocation = true; _startLocationDisplay(); _mapViewController.locationDisplay.onLocationChanged.listen((event) { @@ -286,7 +287,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final centerPoint = vp.targetGeometry as ArcGISPoint?; setState(() { - _mapRotation = vp.rotation; + _mapRotation = vp.rotation.isNaN ? 0.0 : vp.rotation; _currentScale = scale; if (centerPoint != null) { final wgs84Point = centerPoint.spatialReference == SpatialReference.wgs84 @@ -294,7 +295,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { : (GeometryEngine.project(centerPoint, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?); final xVal = wgs84Point?.x ?? centerPoint.x; final yVal = wgs84Point?.y ?? centerPoint.y; - _currentMapCenter = (yVal, xVal); + if (!xVal.isNaN && !yVal.isNaN) { + _currentMapCenter = (yVal, xVal); + } } final shouldResetVP = !_ignoreViewpointReset && (_isLocationActive || _isRecenterActive); if (shouldResetVP) { @@ -388,9 +391,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return; } - await _locationDataSource.start(); - } catch (_) { - // Ignore if already started + await _locationDataSource.start().timeout(const Duration(seconds: 5)); + } catch (e) { + debugPrint('Location DataSource Start Error: $e'); + if (e is TimeoutException || e.toString().toLowerCase().contains('fail')) { + _locationDataSource = SystemLocationDataSource(); + _mapViewController.locationDisplay.dataSource = _locationDataSource; + _locationDataSource.start().catchError((_) {}); + } } finally { _isStartingLocationDataSource = false; } @@ -398,7 +406,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { /// Efficiently fetches device location falling back from fastest to slowest Future<(double, double)?> _getDeviceLocationEfficiently() async { - await _startLocationDisplay(); + _startLocationDisplay(); // 1. Try internal ArcGIS cached position first var gps = _getUserLatLng(); @@ -1274,18 +1282,27 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } return; } + debugPrint('\x1B[32m[Center on Me] Coordinates obtained: Lat: ${gps.$1}, Lng: ${gps.$2}\x1B[0m'); if (!mounted) return; _ignoreViewpointReset = true; setState(() => _isLocationActive = true); - await _mapViewController.setViewpointAnimated( - Viewpoint.fromCenter(ArcGISPoint(x: gps.$2, y: gps.$1, spatialReference: SpatialReference.wgs84), scale: 10000), - ); - if (mounted) { - setState(() { - _ignoreViewpointReset = false; - }); - } + + // Do not await the animation, as it can occasionally hang and stall the UI spinner + _mapViewController + .setViewpointAnimated( + Viewpoint.fromCenter( + ArcGISPoint(x: gps.$2, y: gps.$1, spatialReference: SpatialReference.wgs84), + scale: 10000, + ), + ) + .then((_) { + if (mounted) { + setState(() { + _ignoreViewpointReset = false; + }); + } + }); } catch (e) { debugPrint('Location error: $e'); if (!mounted) return; @@ -1297,7 +1314,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { void _recenterOnView() { _ignoreViewpointReset = true; - setState(() => _isRecenterActive = true); + setState(() { + _isRecenterActive = true; + _isLocationActive = false; + }); Future.delayed(const Duration(milliseconds: 600), () { if (mounted) { setState(() { @@ -1603,6 +1623,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final wgs = GeometryEngine.project(pos, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; final isWgsNull = wgs == null; if (isWgsNull) return null; + if (wgs.x.isNaN || wgs.y.isNaN) return null; return (wgs.y, wgs.x); } From 2c5f0467e1fdfbb76811389aee1bd7a5d0b96a24 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 17 Aug 2026 14:12:06 -0700 Subject: [PATCH 085/139] completed the UI/UX of the user location on the esri map --- .../esrimap/esri_map_widgets/esrimap_fab.dart | 3 +- lib/ui/esrimap/esrimap.dart | 755 +++++++++--------- 2 files changed, 374 insertions(+), 384 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index 0332c4deb..598c974f9 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -253,8 +253,7 @@ class EsriMapLocationFab extends StatelessWidget { } else if (isLocationActive || isUserVisible || bearingToUser != null) { double totalRotation = 0; if (!isLocationActive && bearingToUser != null) { - final mapRotRad = mapRotation * math.pi / 180.0; - totalRotation = bearingToUser! - mapRotRad; + totalRotation = bearingToUser!; } iconWidget = Stack( diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 5e09c7a87..758ae0e18 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -147,23 +147,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final _scene3DKey = GlobalKey(); final _sceneDroneKey = GlobalKey(); - (double lat, double lng)? _currentMapCenter; - var _mapReadyCompleter = Completer(); - double _calculateBearing(double startLat, double startLng, double endLat, double endLng) { - final startLatRad = startLat * math.pi / 180; - final startLngRad = startLng * math.pi / 180; - final endLatRad = endLat * math.pi / 180; - final endLngRad = endLng * math.pi / 180; - - final dLng = endLngRad - startLngRad; - final y = math.sin(dLng) * math.cos(endLatRad); - final x = - math.cos(startLatRad) * math.sin(endLatRad) - math.sin(startLatRad) * math.cos(endLatRad) * math.cos(dLng); - return math.atan2(y, x); - } - /// Returns list of mapped search categories constructed from server configuration. List get _categories { final isConfigNull = _config == null; @@ -263,7 +248,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.locationDisplay.onLocationChanged.listen((event) { final pos = event.position; final wgs = GeometryEngine.project(pos, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; - if (wgs != null) { + if (wgs != null && !wgs.x.isNaN && !wgs.y.isNaN) { _saveLocationToHive(wgs.y, wgs.x); } }); @@ -289,16 +274,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { setState(() { _mapRotation = vp.rotation.isNaN ? 0.0 : vp.rotation; _currentScale = scale; - if (centerPoint != null) { - final wgs84Point = centerPoint.spatialReference == SpatialReference.wgs84 - ? centerPoint - : (GeometryEngine.project(centerPoint, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?); - final xVal = wgs84Point?.x ?? centerPoint.x; - final yVal = wgs84Point?.y ?? centerPoint.y; - if (!xVal.isNaN && !yVal.isNaN) { - _currentMapCenter = (yVal, xVal); - } - } final shouldResetVP = !_ignoreViewpointReset && (_isLocationActive || _isRecenterActive); if (shouldResetVP) { _isLocationActive = false; @@ -1913,384 +1888,400 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final shouldShowScaleBar = _sceneMode == 'default' && _selectedResult == null && !shouldShowCatListPanel; return Scaffold( - body: Stack( - children: [ - // Map View Stack (2D Map View vs 3D Scene View) - Column( + body: LayoutBuilder( + builder: (context, constraints) { + return Stack( children: [ - Expanded( - child: _hasNetworkError - ? Center( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(Icons.wifi_off, size: 48, color: Colors.grey), - const SizedBox(height: 16), - const Text('Network error. Please try again.', style: TextStyle(fontSize: 16)), - const SizedBox(height: 16), - ElevatedButton(onPressed: _fetchConfigThenInit, child: const Text('Reload')), - ], - ), - ) - : IndexedStack( - index: indexedStackIndex, - children: [ - Listener( - onPointerDown: _onMapPointerDown, - child: ArcGISMapView( - controllerProvider: () => _mapViewController, - onMapViewReady: _onMapViewReady, - onTap: _onMapTap, + // Map View Stack (2D Map View vs 3D Scene View) + Column( + children: [ + Expanded( + child: _hasNetworkError + ? Center( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + const Icon(Icons.wifi_off, size: 48, color: Colors.grey), + const SizedBox(height: 16), + const Text('Network error. Please try again.', style: TextStyle(fontSize: 16)), + const SizedBox(height: 16), + ElevatedButton(onPressed: _fetchConfigThenInit, child: const Text('Reload')), + ], ), + ) + : IndexedStack( + index: indexedStackIndex, + children: [ + Listener( + onPointerDown: _onMapPointerDown, + child: ArcGISMapView( + controllerProvider: () => _mapViewController, + onMapViewReady: _onMapViewReady, + onTap: _onMapTap, + ), + ), + _scene3DWidget ?? const SizedBox.shrink(), + _sceneDroneWidget ?? const SizedBox.shrink(), + ], ), - _scene3DWidget ?? const SizedBox.shrink(), - _sceneDroneWidget ?? const SizedBox.shrink(), - ], - ), - ), - ], - ), - - // Map controls stay behind search and slide-over panels. - if (isFabVisible) - Positioned( - top: MediaQuery.of(context).padding.top + 68, - right: 16, - child: EsriMapFabCluster( - isDark: isDark, - is3D: _sceneMode != 'default', - mapRotation: _mapRotation, - isLocationActive: _isLocationActive, - isRecenterActive: _isRecenterActive, - onShowLayersPanel: () => setState(() => _showLayersPanel = true), - onRecenterOnView: _recenterOnView, - onRecenterOnUser: _recenterOnUser, - onSnapToNorth: _snapToNorth, + ), + ], ), - ), - // Bottom-right center-on-me button - if (isFabVisible && _sceneMode == 'default') - Builder( - builder: (context) { - double? bearing; - bool isUserVisible = false; - if (!_isLocationActive && _currentMapCenter != null) { - final userLoc = _getUserLatLng(); - if (userLoc != null) { - final mapLat = _currentMapCenter!.$1; - final mapLng = _currentMapCenter!.$2; - final userLat = userLoc.$1; - final userLng = userLoc.$2; - - try { - final pos = _mapViewController.locationDisplay.location?.position; - final vp = _mapViewController.getCurrentViewpoint(ViewpointType.boundingGeometry); - final geom = vp?.targetGeometry; - if (pos != null && geom != null) { - isUserVisible = GeometryEngine.intersects(geometry1: pos, geometry2: geom); - } - } catch (_) {} - - if (!isUserVisible) { - // Bearing pointing FROM map center TO user location - bearing = _calculateBearing(mapLat, mapLng, userLat, userLng); - } - } - } - - return Positioned( - bottom: 100, + // Map controls stay behind search and slide-over panels. + if (isFabVisible) + Positioned( + top: MediaQuery.of(context).padding.top + 68, right: 16, - child: EsriMapLocationFab( + child: EsriMapFabCluster( isDark: isDark, - isLocationActive: _isLocationActive, - isUserVisible: isUserVisible, - isLoading: _isLocatingUser, - bearingToUser: bearing, + is3D: _sceneMode != 'default', mapRotation: _mapRotation, + isLocationActive: _isLocationActive, + isRecenterActive: _isRecenterActive, + onShowLayersPanel: () => setState(() => _showLayersPanel = true), + onRecenterOnView: _recenterOnView, onRecenterOnUser: _recenterOnUser, + onSnapToNorth: _snapToNorth, ), - ); - }, - ), + ), + + // Bottom-right center-on-me button + if (isFabVisible && _sceneMode == 'default') + Builder( + builder: (context) { + double? screenAngle; + bool isUserVisible = false; + + if (!_isLocationActive) { + try { + final pos = _mapViewController.locationDisplay.location?.position; + final vp = _mapViewController.getCurrentViewpoint(ViewpointType.boundingGeometry); + final geom = vp?.targetGeometry; + if (pos != null && geom != null) { + final projectedPos = GeometryEngine.project( + pos, + outputSpatialReference: geom.spatialReference!, + ); + if (projectedPos != null) { + isUserVisible = GeometryEngine.intersects(geometry1: projectedPos, geometry2: geom); + + if (!isUserVisible) { + final screenPoint = _mapViewController.locationToScreen( + mapPoint: projectedPos as ArcGISPoint, + ); + // FAB center is bottom: 100, right: 16, size: 48x48 -> center is 24px inwards + final fabX = constraints.maxWidth - 16 - 24; + final fabY = constraints.maxHeight - 100 - 24; + + final dx = screenPoint.dx - fabX; + final dy = screenPoint.dy - fabY; + // angle from UP (negative Y) + screenAngle = math.atan2(dx, -dy); + } + } + } + } catch (_) {} + } - // Floating top search bar & suggestion panel - if (isSearchEnabledAndDefault) - Positioned( - top: 8, - left: 12, - right: 12, - child: Column( - children: [ - EsriMapSearchBar( - config: _config, - showRouteFields: _showRouteFields, - searchController: _searchController, - focusNode: _focusNode, - fromController: _fromController, - fromFocusNode: _fromFocusNode, - toController: _toController, - toFocusNode: _toFocusNode, - showSuggestions: _showSuggestions, - showResults: _showResults, - isSearching: _isSearching, - searchResults: _searchResults, - matchingPoiClasses: _matchingPoiClasses, - onPerformSearch: _queueSearch, - onPerformClassSearch: _performClassSearch, - onSelectResult: _selectResult, - onClearSearch: _clearSearch, - onClearRoute: _clearRoute, - onSwapRouteFields: () { - final tmpText = _fromController.text; - final tmpLatLng = _fromLatLng; - _fromController.text = _toController.text; - _toController.text = tmpText; - setState(() { - final hasRouteDestination = _routeDestination != null; - _fromLatLng = hasRouteDestination - ? (_routeDestination!.latitude, _routeDestination!.longitude) - : null; - final hasTmpLatLng = tmpLatLng != null; - _routeDestination = hasTmpLatLng - ? MapSearchResult( - name: tmpText, - subtitle: '', - latitude: tmpLatLng.$1, - longitude: tmpLatLng.$2, - source: MapSearchSource.building, - ) - : null; - }); - final canSolveRoute = _routeDestination != null && _fromLatLng != null; - if (canSolveRoute) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); - }, - onTapSearchField: () { - final hasSelectedResult = _selectedResult != null; - if (hasSelectedResult) setState(() => _selectedResult = null); - final isSearchTextEmpty = _searchController.text.isEmpty; - if (isSearchTextEmpty) { - setState(() { - _showSuggestions = true; - _showResults = false; - }); - } - }, - onTapFromField: () { - setState(() { - _activeRouteField = 'from'; - _showSuggestions = true; - _showResults = false; - }); - }, - onTapToField: () { - setState(() { - _activeRouteField = 'to'; - _showSuggestions = true; - _showResults = false; - }); - }, - onChangedFromField: (text) { - _fromLatLng = null; - final isLongEnough = text.length >= 3; - final isTextEmpty = text.isEmpty; - if (isLongEnough) { - _queueSearch(text); - } else if (isTextEmpty) { - _cancelPendingSearch(); - setState(() { - _isSearching = false; - _showResults = false; - _showSuggestions = true; - }); - } else { - _cancelPendingSearch(); - setState(() { - _isSearching = false; - _showResults = false; - _showSuggestions = false; - }); - } - }, - onChangedToField: (text) { - final isLongEnough = text.length >= 3; - final isTextEmpty = text.isEmpty; - if (isLongEnough) { - _queueSearch(text); - } else if (isTextEmpty) { - _cancelPendingSearch(); - setState(() { - _isSearching = false; - _showResults = false; - _showSuggestions = true; - }); - } else { - _cancelPendingSearch(); - setState(() { - _isSearching = false; - _showResults = false; - _showSuggestions = false; - }); - } - }, - onClearFromField: () { - _cancelPendingSearch(); - _fromController.clear(); - _fromLatLng = null; - setState(() { - _isSearching = false; - _showResults = false; - _showSuggestions = true; - }); - }, - onClearToField: () { - _cancelPendingSearch(); - _toController.clear(); - setState(() { - _isSearching = false; - _showResults = false; - _showSuggestions = true; - }); - }, - onOpenAiSearch: () => showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (_) => EsriAiSearchSheet( - userLat: _getUserLatLng()?.$1, - userLon: _getUserLatLng()?.$2, - onLocationSelected: _onAiLocationSelected, - onRouteRequested: _onAiRouteRequested, + return Positioned( + bottom: 100, + right: 16, + child: EsriMapLocationFab( + isDark: isDark, + isLocationActive: _isLocationActive, + isUserVisible: isUserVisible, + isLoading: _isLocatingUser, + bearingToUser: screenAngle, + mapRotation: _mapRotation, + onRecenterOnUser: _recenterOnUser, ), - ), - iconForClass: _iconForClass, - labelForClass: _labelForClass, - iconForResult: _iconForResult, - ), - - // Suggestions panel (Category icons + Recent Search History) - if (_showSuggestions && !_showResults) - Padding( - padding: const EdgeInsets.only(top: 4), - child: EsriMapSuggestionsPanel( - categories: _categories, - recentSearches: _recentSearches, + ); + }, + ), + + // Floating top search bar & suggestion panel + if (isSearchEnabledAndDefault) + Positioned( + top: 8, + left: 12, + right: 12, + child: Column( + children: [ + EsriMapSearchBar( + config: _config, showRouteFields: _showRouteFields, - activeRouteField: _activeRouteField, - onSelectCurrentLocation: () async { - (double, double)? gps = await _getDeviceLocationEfficiently(); - if (gps == null) { - if (mounted) { - ScaffoldMessenger.of( - context, - ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); - } - return; + searchController: _searchController, + focusNode: _focusNode, + fromController: _fromController, + fromFocusNode: _fromFocusNode, + toController: _toController, + toFocusNode: _toFocusNode, + showSuggestions: _showSuggestions, + showResults: _showResults, + isSearching: _isSearching, + searchResults: _searchResults, + matchingPoiClasses: _matchingPoiClasses, + onPerformSearch: _queueSearch, + onPerformClassSearch: _performClassSearch, + onSelectResult: _selectResult, + onClearSearch: _clearSearch, + onClearRoute: _clearRoute, + onSwapRouteFields: () { + final tmpText = _fromController.text; + final tmpLatLng = _fromLatLng; + _fromController.text = _toController.text; + _toController.text = tmpText; + setState(() { + final hasRouteDestination = _routeDestination != null; + _fromLatLng = hasRouteDestination + ? (_routeDestination!.latitude, _routeDestination!.longitude) + : null; + final hasTmpLatLng = tmpLatLng != null; + _routeDestination = hasTmpLatLng + ? MapSearchResult( + name: tmpText, + subtitle: '', + latitude: tmpLatLng.$1, + longitude: tmpLatLng.$2, + source: MapSearchSource.building, + ) + : null; + }); + final canSolveRoute = _routeDestination != null && _fromLatLng != null; + if (canSolveRoute) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + }, + onTapSearchField: () { + final hasSelectedResult = _selectedResult != null; + if (hasSelectedResult) setState(() => _selectedResult = null); + final isSearchTextEmpty = _searchController.text.isEmpty; + if (isSearchTextEmpty) { + setState(() { + _showSuggestions = true; + _showResults = false; + }); } - _fromController.text = 'My Location'; - _fromLatLng = gps; - if (mounted) { + }, + onTapFromField: () { + setState(() { + _activeRouteField = 'from'; + _showSuggestions = true; + _showResults = false; + }); + }, + onTapToField: () { + setState(() { + _activeRouteField = 'to'; + _showSuggestions = true; + _showResults = false; + }); + }, + onChangedFromField: (text) { + _fromLatLng = null; + final isLongEnough = text.length >= 3; + final isTextEmpty = text.isEmpty; + if (isLongEnough) { + _queueSearch(text); + } else if (isTextEmpty) { + _cancelPendingSearch(); + setState(() { + _isSearching = false; + _showResults = false; + _showSuggestions = true; + }); + } else { + _cancelPendingSearch(); setState(() { + _isSearching = false; + _showResults = false; _showSuggestions = false; + }); + } + }, + onChangedToField: (text) { + final isLongEnough = text.length >= 3; + final isTextEmpty = text.isEmpty; + if (isLongEnough) { + _queueSearch(text); + } else if (isTextEmpty) { + _cancelPendingSearch(); + setState(() { + _isSearching = false; + _showResults = false; + _showSuggestions = true; + }); + } else { + _cancelPendingSearch(); + setState(() { + _isSearching = false; _showResults = false; + _showSuggestions = false; }); } - _fromFocusNode.unfocus(); - final hasRouteDestination = _routeDestination != null; - if (hasRouteDestination) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); }, - onSelectCategory: _performCategorySearch, - onSelectRecent: _selectResult, - onRemoveRecent: _removeFromRecentSearches, - onClearRecent: _clearRecentSearches, + onClearFromField: () { + _cancelPendingSearch(); + _fromController.clear(); + _fromLatLng = null; + setState(() { + _isSearching = false; + _showResults = false; + _showSuggestions = true; + }); + }, + onClearToField: () { + _cancelPendingSearch(); + _toController.clear(); + setState(() { + _isSearching = false; + _showResults = false; + _showSuggestions = true; + }); + }, + onOpenAiSearch: () => showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (_) => EsriAiSearchSheet( + userLat: _getUserLatLng()?.$1, + userLon: _getUserLatLng()?.$2, + onLocationSelected: _onAiLocationSelected, + onRouteRequested: _onAiRouteRequested, + ), + ), + iconForClass: _iconForClass, + labelForClass: _labelForClass, + iconForResult: _iconForResult, ), - ), - ], - ), - ), - - // Category results list panel - if (shouldShowCatListPanel) - EsriMapCategoryListPanel( - controller: _categorySheetController, - activeCategory: _activeCategory, - allCategoryResults: _allCategoryResults, - viewportResults: EsriMapSearchService.filterToViewport(_allCategoryResults, _getViewportEnvelopeWGS84()), - userLocation: _getUserLatLng(), - onClearSearch: _clearSearch, - onSeeAllResults: _seeAllCategoryResults, - onSelectResult: _selectResultFromList, - iconForResult: _iconForResult, - ), - - // Dynamic Google Maps-style Scale Bar Indicator - if (shouldShowScaleBar) - Positioned( - bottom: 24, - right: 16, - child: EsriMapScaleBar(scale: _currentScale, isDark: isDark), - ), - - // Transit Legend - if (_layerVisible['tritonTransit'] == true) Positioned(bottom: 24, left: 16, child: _buildTransitLegend()), - - // Selected Result Detail Slide-over - if (_selectedResult != null) - LayoutBuilder( - builder: (context, constraints) => EsriMapDetailSlideOver( - minimizedNotifier: _detailSheetMinimized, - availableHeight: constraints.maxHeight, - result: _selectedResult!, - resultIcon: _iconForResult(_selectedResult!), - isRoutingMode: _isRouting, - hasRoute: _hasRoute, - routeFailed: _routeFailed, - travelMode: _travelMode, - routeTravelTimeMinutes: _routeTravelTimeMinutes, - routeManeuvers: _routeManeuvers, - fromLatLng: _fromLatLng, - onGetDirections: (res) { - final gps = _getUserLatLng(); - final hasGps = gps != null; - _fromController.text = hasGps ? 'My Location' : ''; - _toController.text = res.name; - _routeDestination = res; - _graphicsOverlay.graphics.clear(); - setState(() { - _showRouteFields = true; - _mappedResults = []; - _allCategoryResults = []; - _showCategoryList = false; - _activeCategory = null; - }); - _solveRoute(res); - }, - onTravelModeChanged: (mode) { - final hasSelectedResult = _selectedResult != null; - if (hasSelectedResult) _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); - }, - onLaunchWebsite: _launchWebsite, - onClose: _closeDetail, - onClearRoute: _clearRoute, - ), - ), - // Basemap & Operational Layer Selector Panel - if (isLayersPanelVisible) - EsriMapLayersPanel( - config: _config!, - currentBasemapType: _currentBasemapType, - currentSceneKey: _sceneMode, - layerVisible: _layerVisible, - layerLoading: _layerLoading, - hideSceneSwitcher: _selectedResult != null || _showCategoryList, - onSwitchBasemap: _switchBasemap, - onSetSceneMode: _setSceneMode, - onToggleLayer: _toggleLayer, - onClose: () => setState(() => _showLayersPanel = false), - ), - ], + // Suggestions panel (Category icons + Recent Search History) + if (_showSuggestions && !_showResults) + Padding( + padding: const EdgeInsets.only(top: 4), + child: EsriMapSuggestionsPanel( + categories: _categories, + recentSearches: _recentSearches, + showRouteFields: _showRouteFields, + activeRouteField: _activeRouteField, + onSelectCurrentLocation: () async { + (double, double)? gps = await _getDeviceLocationEfficiently(); + if (gps == null) { + if (mounted) { + ScaffoldMessenger.of( + context, + ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + } + return; + } + _fromController.text = 'My Location'; + _fromLatLng = gps; + if (mounted) { + setState(() { + _showSuggestions = false; + _showResults = false; + }); + } + _fromFocusNode.unfocus(); + final hasRouteDestination = _routeDestination != null; + if (hasRouteDestination) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + }, + onSelectCategory: _performCategorySearch, + onSelectRecent: _selectResult, + onRemoveRecent: _removeFromRecentSearches, + onClearRecent: _clearRecentSearches, + ), + ), + ], + ), + ), + + // Category results list panel + if (shouldShowCatListPanel) + EsriMapCategoryListPanel( + controller: _categorySheetController, + activeCategory: _activeCategory, + allCategoryResults: _allCategoryResults, + viewportResults: EsriMapSearchService.filterToViewport( + _allCategoryResults, + _getViewportEnvelopeWGS84(), + ), + userLocation: _getUserLatLng(), + onClearSearch: _clearSearch, + onSeeAllResults: _seeAllCategoryResults, + onSelectResult: _selectResultFromList, + iconForResult: _iconForResult, + ), + + // Dynamic Google Maps-style Scale Bar Indicator + if (shouldShowScaleBar) + Positioned( + bottom: 24, + right: 16, + child: EsriMapScaleBar(scale: _currentScale, isDark: isDark), + ), + + // Transit Legend + if (_layerVisible['tritonTransit'] == true) + Positioned(bottom: 24, left: 16, child: _buildTransitLegend()), + + // Selected Result Detail Slide-over + if (_selectedResult != null) + LayoutBuilder( + builder: (context, constraints) => EsriMapDetailSlideOver( + minimizedNotifier: _detailSheetMinimized, + availableHeight: constraints.maxHeight, + result: _selectedResult!, + resultIcon: _iconForResult(_selectedResult!), + isRoutingMode: _isRouting, + hasRoute: _hasRoute, + routeFailed: _routeFailed, + travelMode: _travelMode, + routeTravelTimeMinutes: _routeTravelTimeMinutes, + routeManeuvers: _routeManeuvers, + fromLatLng: _fromLatLng, + onGetDirections: (res) { + final gps = _getUserLatLng(); + final hasGps = gps != null; + _fromController.text = hasGps ? 'My Location' : ''; + _toController.text = res.name; + _routeDestination = res; + _graphicsOverlay.graphics.clear(); + setState(() { + _showRouteFields = true; + _mappedResults = []; + _allCategoryResults = []; + _showCategoryList = false; + _activeCategory = null; + }); + _solveRoute(res); + }, + onTravelModeChanged: (mode) { + final hasSelectedResult = _selectedResult != null; + if (hasSelectedResult) _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); + }, + onLaunchWebsite: _launchWebsite, + onClose: _closeDetail, + onClearRoute: _clearRoute, + ), + ), + + // Basemap & Operational Layer Selector Panel + if (isLayersPanelVisible) + EsriMapLayersPanel( + config: _config!, + currentBasemapType: _currentBasemapType, + currentSceneKey: _sceneMode, + layerVisible: _layerVisible, + layerLoading: _layerLoading, + hideSceneSwitcher: _selectedResult != null || _showCategoryList, + onSwitchBasemap: _switchBasemap, + onSetSceneMode: _setSceneMode, + onToggleLayer: _toggleLayer, + onClose: () => setState(() => _showLayersPanel = false), + ), + ], + ); + }, ), ); } From 90ddd271de6d5fb6859060037d72323fafad994b Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Mon, 17 Aug 2026 21:15:53 +0000 Subject: [PATCH 086/139] style: auto fix formatting violations --- lib/core/providers/classes.dart | 8 +++-- lib/core/providers/notifications.dart | 10 +++--- lib/main.dart | 10 +++--- lib/ui/classes/classes_list.dart | 5 ++- .../esrimap/esri_map_widgets/esrimap_fab.dart | 4 +-- lib/ui/esrimap/esrimap.dart | 35 ++++++------------- lib/ui/navigator/top.dart | 5 ++- lib/ui/news/news_list.dart | 7 ++-- .../notifications_list_view.dart | 10 +++--- .../parking/circular_parking_indicator.dart | 12 +++---- lib/ui/parking/spot_types_view.dart | 6 ++-- 11 files changed, 44 insertions(+), 68 deletions(-) diff --git a/lib/core/providers/classes.dart b/lib/core/providers/classes.dart index 3399cc820..c34facb66 100644 --- a/lib/core/providers/classes.dart +++ b/lib/core/providers/classes.dart @@ -216,9 +216,11 @@ class ClassScheduleDataProvider extends ChangeNotifier { /// if no classes are scheduled for today then find the next day with classes var daysToAdd = 1; while (_enrolledClasses[today]!.isEmpty && daysToAdd <= 7) { - today = DateFormat( - 'EEEE', - ).format(DateTime.now().add(Duration(days: daysToAdd))).toString().toUpperCase().substring(0, 2); + today = DateFormat('EEEE') + .format(DateTime.now().add(Duration(days: daysToAdd))) + .toString() + .toUpperCase() + .substring(0, 2); nextDayWithClass = DateFormat('EEEE').format(DateTime.now().add(Duration(days: daysToAdd))); daysToAdd += 1; } diff --git a/lib/core/providers/notifications.dart b/lib/core/providers/notifications.dart index e5a42fec2..c0bb85eea 100644 --- a/lib/core/providers/notifications.dart +++ b/lib/core/providers/notifications.dart @@ -144,9 +144,8 @@ class PushNotificationDataProvider extends ChangeNotifier { NavigatorConstants.NOTIFICATIONS_TAB; /// Navigate to Notifications tab - Navigator.of( - context, - ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of(context) + .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); }); } on PlatformException { _error = 'Failed to get platform info.'; @@ -160,9 +159,8 @@ class PushNotificationDataProvider extends ChangeNotifier { Provider.of(this.context, listen: false).fetchMessages(true); /// Navigate to Notifications tab - Navigator.of( - this.context, - ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of(this.context) + .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); /// Set tab bar index to the Notifications tab Provider.of(this.context, listen: false).currentIndex = diff --git a/lib/main.dart b/lib/main.dart index afe2cbc35..5621483f8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -117,9 +117,8 @@ class CampusMobile extends StatelessWidget { iconTheme: lightIconTheme, appBarTheme: lightAppBarTheme, listTileTheme: lightListTileTheme, - colorScheme: ColorScheme.fromSwatch( - primarySwatch: ColorPrimary, - ).copyWith(surface: lightButtonColor, brightness: Brightness.light), + colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) + .copyWith(surface: lightButtonColor, brightness: Brightness.light), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconLightColor, selectedItemColor: Colors.white, @@ -145,9 +144,8 @@ class CampusMobile extends StatelessWidget { appBarTheme: darkAppBarTheme, unselectedWidgetColor: darkAccentColor, listTileTheme: darkListTileTheme, - colorScheme: ColorScheme.fromSwatch( - primarySwatch: ColorPrimary, - ).copyWith(surface: darkButtonColor, brightness: Brightness.dark), + colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) + .copyWith(surface: darkButtonColor, brightness: Brightness.dark), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconDarkColor, selectedItemColor: Colors.white, diff --git a/lib/ui/classes/classes_list.dart b/lib/ui/classes/classes_list.dart index 37a4ba82c..c2f997023 100644 --- a/lib/ui/classes/classes_list.dart +++ b/lib/ui/classes/classes_list.dart @@ -13,9 +13,8 @@ class ClassList extends StatelessWidget { Widget buildSchedule(BuildContext context) { List list = []; - Provider.of( - context, - ).enrolledClasses.addAll(Provider.of(context).midterms); + Provider.of(context).enrolledClasses + .addAll(Provider.of(context).midterms); Provider.of(context).enrolledClasses.keys.forEach((key) { final bool hasClasses = Provider.of(context).enrolledClasses[key]!.isNotEmpty; if (hasClasses) { diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index 598c974f9..0dee896a3 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -252,9 +252,7 @@ class EsriMapLocationFab extends StatelessWidget { ); } else if (isLocationActive || isUserVisible || bearingToUser != null) { double totalRotation = 0; - if (!isLocationActive && bearingToUser != null) { - totalRotation = bearingToUser!; - } + if (!isLocationActive && bearingToUser != null) totalRotation = bearingToUser!; iconWidget = Stack( alignment: Alignment.center, diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 758ae0e18..6a18bbc01 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -184,9 +184,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Future _fetchConfigThenInit() async { setState(() => _hasNetworkError = false); - if (_mapReadyCompleter.isCompleted) { - _mapReadyCompleter = Completer(); - } + if (_mapReadyCompleter.isCompleted) _mapReadyCompleter = Completer(); try { final config = await EsriMapConfigService.instance.fetch(); if (!mounted) return; @@ -248,9 +246,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.locationDisplay.onLocationChanged.listen((event) { final pos = event.position; final wgs = GeometryEngine.project(pos, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; - if (wgs != null && !wgs.x.isNaN && !wgs.y.isNaN) { - _saveLocationToHive(wgs.y, wgs.x); - } + if (wgs != null && !wgs.x.isNaN && !wgs.y.isNaN) _saveLocationToHive(wgs.y, wgs.x); }); _preloadAlternateBasemaps(); @@ -390,9 +386,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // 2. Try Fallback to Geolocator last known position try { final lastKnown = await Geolocator.getLastKnownPosition(); - if (lastKnown != null) { - return (lastKnown.latitude, lastKnown.longitude); - } + if (lastKnown != null) return (lastKnown.latitude, lastKnown.longitude); } catch (_) {} // 3. Try Hive cached location @@ -890,9 +884,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); if (allResults.isEmpty) { - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); } } catch (e) { debugPrint('Category search error: $e'); @@ -904,9 +897,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _allCategoryResults = []; _isSearching = false; }); - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); } } @@ -1251,9 +1243,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final gps = await _getDeviceLocationEfficiently(); if (gps == null) { if (mounted) { - ScaffoldMessenger.of( - context, - ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + ScaffoldMessenger.of(context) + .showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } @@ -1453,9 +1444,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); var userLatLng = originLatLng; - if (userLatLng == null) { - userLatLng = await _getDeviceLocationEfficiently(); - } + if (userLatLng == null) userLatLng = await _getDeviceLocationEfficiently(); final isUserLatLngNull = userLatLng == null; if (isUserLatLngNull) { @@ -1624,9 +1613,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final box = await Hive.openBox('mapLocationCache'); final lat = box.get('lat') as double?; final lng = box.get('lng') as double?; - if (lat != null && lng != null) { - return (lat, lng); - } + if (lat != null && lng != null) return (lat, lng); } catch (_) {} return null; } diff --git a/lib/ui/navigator/top.dart b/lib/ui/navigator/top.dart index f4792bbf7..180d4f1fb 100644 --- a/lib/ui/navigator/top.dart +++ b/lib/ui/navigator/top.dart @@ -27,9 +27,8 @@ class CMAppBar extends StatelessWidget { Provider.of(context, listen: false).currentIndex = NavigatorConstants.HOME_TAB; // Navigate to Home tab - Navigator.of( - context, - ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of(context) + .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); // change the appBar title to the ucsd logo Provider.of(context, listen: false).changeTitle(CustomAppBar().appBar.title); }, diff --git a/lib/ui/news/news_list.dart b/lib/ui/news/news_list.dart index a756b475c..3ab74c34a 100644 --- a/lib/ui/news/news_list.dart +++ b/lib/ui/news/news_list.dart @@ -106,11 +106,8 @@ class NewsList extends StatelessWidget { ), TextSpan( text: ' - ', - style: Theme.of(context).textTheme.headlineMedium!.copyWith( - height: 1.42, - fontSize: 16.0, - decoration: TextDecoration.none, - ), + style: Theme.of(context).textTheme.headlineMedium! + .copyWith(height: 1.42, fontSize: 16.0, decoration: TextDecoration.none), ), TextSpan( text: newsItem.title, diff --git a/lib/ui/notifications/notifications_list_view.dart b/lib/ui/notifications/notifications_list_view.dart index 54e301058..4b96562b4 100644 --- a/lib/ui/notifications/notifications_list_view.dart +++ b/lib/ui/notifications/notifications_list_view.dart @@ -183,9 +183,8 @@ class _NotificationsListViewState extends State { } }, options: LinkifyOptions(humanize: false), - style: Theme.of( - context, - ).textTheme.bodySmall?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), + style: Theme.of(context).textTheme.bodySmall + ?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), ), freefoodProvider.isFreeFood(data.messageId) ? FreeFoodNotification(messageId: data.messageId) : Container(), ], @@ -198,9 +197,8 @@ class _NotificationsListViewState extends State { padding: const EdgeInsets.only(top: 6.0), child: Text( _readTimestamp(data.timestamp), - style: Theme.of( - context, - ).textTheme.bodySmall?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), + style: Theme.of(context).textTheme.bodySmall + ?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), ), ), ], diff --git a/lib/ui/parking/circular_parking_indicator.dart b/lib/ui/parking/circular_parking_indicator.dart index d3001d352..90deb068c 100644 --- a/lib/ui/parking/circular_parking_indicator.dart +++ b/lib/ui/parking/circular_parking_indicator.dart @@ -217,12 +217,12 @@ class CircularParkingIndicators extends StatelessWidget { } Widget buildSpotsAvailableText(BuildContext context) { - final openSpots = Provider.of( - context, - ).getApproxNumOfOpenSpots(model.locationName)["Open"].toString(); - final totalSpots = Provider.of( - context, - ).getApproxNumOfOpenSpots(model.locationName)["Total"].toString(); + final openSpots = Provider.of(context) + .getApproxNumOfOpenSpots(model.locationName)["Open"] + .toString(); + final totalSpots = Provider.of(context) + .getApproxNumOfOpenSpots(model.locationName)["Total"] + .toString(); final visualText = "~$openSpots of $totalSpots Spots Available"; final semanticText = "Approximately $openSpots of $totalSpots Spots Available"; diff --git a/lib/ui/parking/spot_types_view.dart b/lib/ui/parking/spot_types_view.dart index 4e2c5bb0f..0704a3d62 100644 --- a/lib/ui/parking/spot_types_view.dart +++ b/lib/ui/parking/spot_types_view.dart @@ -46,9 +46,9 @@ class _SpotTypesViewState extends State { ); List createList(BuildContext context) { - var selectedSpots = Provider.of( - context, - ).spotTypesState.values.where((selected) => selected == true).length; + var selectedSpots = Provider.of(context).spotTypesState.values + .where((selected) => selected == true) + .length; List list = []; From 53cf3d642cdb6b3dc5b1a5f64252dc8aaae04ed6 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 17 Aug 2026 14:50:26 -0700 Subject: [PATCH 087/139] Added a very basic tooltip for buildings. Improving on it now --- .../esrimap_search_service.dart | 60 +++++++++++++++++++ lib/ui/esrimap/esrimap.dart | 32 ++++++---- 2 files changed, 80 insertions(+), 12 deletions(-) diff --git a/lib/core/services/esri_map_services/esrimap_search_service.dart b/lib/core/services/esri_map_services/esrimap_search_service.dart index 9fa357f83..44153884e 100644 --- a/lib/core/services/esri_map_services/esrimap_search_service.dart +++ b/lib/core/services/esri_map_services/esrimap_search_service.dart @@ -112,6 +112,66 @@ class EsriMapSearchService { .toList(); } + /// Identifies a building by performing a spatial intersection query at the given WGS84 coordinate. + static Future identifyBuildingAtCoordinate(double lat, double lng) async { + try { + final uri = Uri.parse('https://admin-enterprise-gis.ucsd.edu/server/rest/services/Buildings/Buildings_Campus_Map/MapServer/2/query'); + final response = await http.get(uri.replace(queryParameters: { + 'geometry': '$lng,$lat', + 'geometryType': 'esriGeometryPoint', + 'inSR': '4326', + 'spatialRel': 'esriSpatialRelIntersects', + 'distance': '15', + 'units': 'esriSRUnit_Foot', + 'outFields': '*', + 'returnGeometry': 'true', + 'outSR': '4326', + 'f': 'json', + })); + + if (response.statusCode == 200) { + final data = jsonDecode(response.body); + final features = data['features'] as List?; + if (features != null && features.isNotEmpty) { + final attr = features.first['attributes'] as Map; + + final longName = attr['GIS.facTririgaBuildingInfo.FacilityLongName'] as String?; + final shortName = attr['GIS.facTririgaBuildingInfo.FacilityShortName'] as String?; + final name = (longName != null && longName.isNotEmpty) ? longName : (shortName ?? 'Unknown Building'); + + final address = attr['GIS.facTririgaBuildingInfo.StreetAddress'] as String? ?? ''; + + // Try to extract center of geometry if it's returned, otherwise fallback to tap location + double resLat = lat; + double resLng = lng; + final geom = features.first['geometry'] as Map?; + if (geom != null) { + final rings = geom['rings'] as List?; + if (rings != null && rings.isNotEmpty) { + final firstRing = rings.first as List?; + if (firstRing != null && firstRing.isNotEmpty) { + resLng = firstRing.first[0] as double; + resLat = firstRing.first[1] as double; + } + } + } + + return MapSearchResult( + name: name, + subtitle: 'Building', + latitude: resLat, + longitude: resLng, + source: MapSearchSource.building, + address: address, + ); + } + } + } catch (e) { + debugPrint('Failed to identify building at coordinate: $e'); + } + return null; + } + // --------------------------------------------------------------------------- // Viewport & Geographic Helpers // --------------------------------------------------------------------------- diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 6a18bbc01..76f3877e0 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1060,14 +1060,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return; } - final isMappedResultsEmpty = _mappedResults.isEmpty; - if (isMappedResultsEmpty) { - _dismissCallout(); - final isSelectedResultNotNull = _selectedResult != null; - if (isSelectedResultNotNull) _closeDetail(); - return; - } - try { final identifyResult = await _mapViewController.identifyGraphicsOverlay( _graphicsOverlay, @@ -1082,14 +1074,30 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final index = tappedGraphic.attributes['resultIndex'] as int?; final isValidResultIndex = index != null && index >= 0 && index < _mappedResults.length; if (isValidResultIndex) _handlePinTap(_mappedResults[index], tappedGraphic); - } else { - _dismissCallout(); - final isSelectedResultNotNull = _selectedResult != null; - if (isSelectedResultNotNull) _closeDetail(); + return; } } catch (e) { debugPrint('Identify error: $e'); } + + final mapPoint = _mapViewController.screenToLocation(screen: screenPoint); + if (mapPoint != null) { + final wgs84Point = GeometryEngine.project(mapPoint, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; + if (wgs84Point != null && !wgs84Point.x.isNaN && !wgs84Point.y.isNaN) { + final buildingResult = await EsriMapSearchService.identifyBuildingAtCoordinate(wgs84Point.y, wgs84Point.x); + if (buildingResult != null) { + _plotResultsOnMap([buildingResult]); + if (_graphicsOverlay.graphics.isNotEmpty) { + _handlePinTap(buildingResult, _graphicsOverlay.graphics.last); + } + return; + } + } + } + + _dismissCallout(); + final isSelectedResultNotNull = _selectedResult != null; + if (isSelectedResultNotNull) _closeDetail(); } /// Shows a place name above a plotted map pin without changing the search. From de32dc022397ea6ebe0eab4f6aed271496eac4fa Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 15:30:38 -0700 Subject: [PATCH 088/139] added loading and highlighting animations --- .../esri_map_models/map_search_result.dart | 4 ++ .../esrimap_search_service.dart | 59 ++++++++++++++++++- lib/ui/esrimap/esrimap.dart | 52 +++++++++++++++- 3 files changed, 109 insertions(+), 6 deletions(-) diff --git a/lib/core/models/esri_map_models/map_search_result.dart b/lib/core/models/esri_map_models/map_search_result.dart index c1f1213f1..bf37906c6 100644 --- a/lib/core/models/esri_map_models/map_search_result.dart +++ b/lib/core/models/esri_map_models/map_search_result.dart @@ -40,6 +40,9 @@ class MapSearchResult { /// Optional website URL associated with this location. final String? websiteUrl; + /// Optional polygon geometry for the building footprint. Not serialized to JSON. + final dynamic footprint; + /// Constructs a [MapSearchResult] instance. const MapSearchResult({ required this.name, @@ -50,6 +53,7 @@ class MapSearchResult { this.address = '', this.description = '', this.websiteUrl, + this.footprint, }); /// Serializes the search result into a JSON-compatible map for storage in SharedPreferences. diff --git a/lib/core/services/esri_map_services/esrimap_search_service.dart b/lib/core/services/esri_map_services/esrimap_search_service.dart index 44153884e..7d4bb2556 100644 --- a/lib/core/services/esri_map_services/esrimap_search_service.dart +++ b/lib/core/services/esri_map_services/esrimap_search_service.dart @@ -137,13 +137,14 @@ class EsriMapSearchService { final longName = attr['GIS.facTririgaBuildingInfo.FacilityLongName'] as String?; final shortName = attr['GIS.facTririgaBuildingInfo.FacilityShortName'] as String?; - final name = (longName != null && longName.isNotEmpty) ? longName : (shortName ?? 'Unknown Building'); - - final address = attr['GIS.facTririgaBuildingInfo.StreetAddress'] as String? ?? ''; + String name = (longName != null && longName.isNotEmpty) ? longName : (shortName ?? 'Unknown Building'); + String address = attr['GIS.facTririgaBuildingInfo.StreetAddress'] as String? ?? ''; // Try to extract center of geometry if it's returned, otherwise fallback to tap location double resLat = lat; double resLng = lng; + Polygon? footprintPolygon; + final geom = features.first['geometry'] as Map?; if (geom != null) { final rings = geom['rings'] as List?; @@ -153,8 +154,59 @@ class EsriMapSearchService { resLng = firstRing.first[0] as double; resLat = firstRing.first[1] as double; } + + try { + final builder = PolygonBuilder(spatialReference: SpatialReference.wgs84); + for (final ring in rings) { + final part = MutablePart(spatialReference: SpatialReference.wgs84); + final ringPoints = ring as List; + for (final point in ringPoints) { + final coords = point as List; + part.addPointXY(x: (coords[0] as num).toDouble(), y: (coords[1] as num).toDouble()); + } + builder.parts.addPart(part); + } + footprintPolygon = builder.toGeometry() as Polygon?; + } catch (e) { + debugPrint('Failed to parse polygon geometry: $e'); + } } } + + if (name == 'Unknown Building') { + final fallbackUrl = Uri.parse('https://admin-enterprise-gis.ucsd.edu/server/rest/services/Buildings/Buildings_Campus_Map/MapServer/0/query'); + try { + final fallbackRes = await http.get(fallbackUrl.replace(queryParameters: { + 'geometry': '$resLng,$resLat', + 'geometryType': 'esriGeometryPoint', + 'inSR': '4326', + 'spatialRel': 'esriSpatialRelIntersects', + 'distance': '100', // 100 feet from center of footprint + 'units': 'esriSRUnit_Foot', + 'outFields': '*', + 'returnGeometry': 'false', + 'f': 'json', + })); + if (fallbackRes.statusCode == 200) { + final fallbackData = jsonDecode(fallbackRes.body); + final fallbackFeatures = fallbackData['features'] as List?; + if (fallbackFeatures != null && fallbackFeatures.isNotEmpty) { + final fbAttr = fallbackFeatures.first['attributes'] as Map; + final fbLong = fbAttr['GIS.facTririgaBuildingInfo.FacilityLongName'] as String?; + final fbShort = fbAttr['GIS.facTririgaBuildingInfo.FacilityShortName'] as String?; + if (fbLong != null && fbLong.isNotEmpty) { + name = fbLong; + } else if (fbShort != null && fbShort.isNotEmpty) { + name = fbShort; + } + final fbAddr = fbAttr['GIS.facTririgaBuildingInfo.StreetAddress'] as String?; + if (fbAddr != null && fbAddr.isNotEmpty) { + address = fbAddr; + } + } + } + } catch (_) {} + } return MapSearchResult( name: name, @@ -163,6 +215,7 @@ class EsriMapSearchService { longitude: resLng, source: MapSearchSource.building, address: address, + footprint: footprintPolygon, ); } } diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 76f3877e0..ee1804b09 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -921,8 +921,26 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mappedResults = results; for (int i = 0; i < results.length; i++) { final result = results[i]; - final point = ArcGISPoint(x: result.longitude, y: result.latitude, spatialReference: SpatialReference.wgs84); final isBuilding = result.source == MapSearchSource.building; + + if (result.footprint is Polygon) { + final footprintGraphic = Graphic( + geometry: result.footprint as Polygon, + symbol: SimpleFillSymbol( + style: SimpleFillSymbolStyle.solid, + color: Colors.blue.withOpacity(0.3), + outline: SimpleLineSymbol( + style: SimpleLineSymbolStyle.solid, + color: Colors.blue, + width: 2, + ), + ), + ); + footprintGraphic.attributes['resultIndex'] = i; + _graphicsOverlay.graphics.add(footprintGraphic); + } + + final point = ArcGISPoint(x: result.longitude, y: result.latitude, spatialReference: SpatialReference.wgs84); final graphic = Graphic( geometry: point, symbol: SimpleMarkerSymbol( @@ -1060,6 +1078,33 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return; } + final mapPoint = _mapViewController.screenToLocation(screen: screenPoint); + + // Show the loading callout immediately to provide instant feedback + if (mapPoint != null) { + final isDark = Theme.of(context).brightness == Brightness.dark; + _mapViewController.callout.showAt( + mapPoint, + leaderPosition: LeaderPosition.bottom, + style: CalloutStyle( + backgroundColor: isDark ? const Color(0xFF242424) : Colors.white, + borderColor: isDark ? Colors.white24 : Colors.black26, + borderRadius: 12, + borderWidth: 0.5, + contentPadding: const EdgeInsets.all(12), + offset: const Offset(0, -10), + ), + contentBuilder: (_, __) => SizedBox( + width: 20, + height: 20, + child: CircularProgressIndicator( + strokeWidth: 2, + color: isDark ? Colors.white : null, + ), + ), + ); + } + try { final identifyResult = await _mapViewController.identifyGraphicsOverlay( _graphicsOverlay, @@ -1080,7 +1125,6 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { debugPrint('Identify error: $e'); } - final mapPoint = _mapViewController.screenToLocation(screen: screenPoint); if (mapPoint != null) { final wgs84Point = GeometryEngine.project(mapPoint, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; if (wgs84Point != null && !wgs84Point.x.isNaN && !wgs84Point.y.isNaN) { @@ -1091,6 +1135,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _handlePinTap(buildingResult, _graphicsOverlay.graphics.last); } return; + } else { + _dismissCallout(); } } } @@ -1104,7 +1150,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { void _showCalloutForGraphic(MapSearchResult result, Graphic graphic) { final isBuilding = result.source == MapSearchSource.building; - final detail = isBuilding ? 'Building' : result.subtitle; + final detail = (isBuilding && result.address.isNotEmpty) ? result.address : result.subtitle; final isDark = Theme.of(context).brightness == Brightness.dark; _graphicsOverlay.clearSelection(); From 353827f5c87bf6c5edad2a9e9794d771011cb235 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 15:56:22 -0700 Subject: [PATCH 089/139] improved loading circle --- lib/ui/esrimap/esrimap.dart | 55 ++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index ee1804b09..a8efbd8f8 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -124,6 +124,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { String? _activeRouteField; (double, double)? _fromLatLng; MapSearchResult? _routeDestination; + Offset? _loadingPoint; // Basemaps & Operational Layers State BasemapType _currentBasemapType = BasemapType.defaultMap; @@ -1079,31 +1080,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } final mapPoint = _mapViewController.screenToLocation(screen: screenPoint); - - // Show the loading callout immediately to provide instant feedback - if (mapPoint != null) { - final isDark = Theme.of(context).brightness == Brightness.dark; - _mapViewController.callout.showAt( - mapPoint, - leaderPosition: LeaderPosition.bottom, - style: CalloutStyle( - backgroundColor: isDark ? const Color(0xFF242424) : Colors.white, - borderColor: isDark ? Colors.white24 : Colors.black26, - borderRadius: 12, - borderWidth: 0.5, - contentPadding: const EdgeInsets.all(12), - offset: const Offset(0, -10), - ), - contentBuilder: (_, __) => SizedBox( - width: 20, - height: 20, - child: CircularProgressIndicator( - strokeWidth: 2, - color: isDark ? Colors.white : null, - ), - ), - ); - } + // Show the loading indicator immediately as a Flutter overlay + setState(() { + _loadingPoint = screenPoint; + }); try { final identifyResult = await _mapViewController.identifyGraphicsOverlay( @@ -1115,6 +1095,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final hasGraphics = identifyResult.graphics.isNotEmpty; if (hasGraphics) { + if (mounted) setState(() { _loadingPoint = null; }); final tappedGraphic = identifyResult.graphics.first; final index = tappedGraphic.attributes['resultIndex'] as int?; final isValidResultIndex = index != null && index >= 0 && index < _mappedResults.length; @@ -1129,6 +1110,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final wgs84Point = GeometryEngine.project(mapPoint, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; if (wgs84Point != null && !wgs84Point.x.isNaN && !wgs84Point.y.isNaN) { final buildingResult = await EsriMapSearchService.identifyBuildingAtCoordinate(wgs84Point.y, wgs84Point.x); + if (mounted) setState(() { _loadingPoint = null; }); if (buildingResult != null) { _plotResultsOnMap([buildingResult]); if (_graphicsOverlay.graphics.isNotEmpty) { @@ -1141,6 +1123,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } + if (mounted) setState(() { _loadingPoint = null; }); _dismissCallout(); final isSelectedResultNotNull = _selectedResult != null; if (isSelectedResultNotNull) _closeDetail(); @@ -2041,6 +2024,28 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }, ), + if (_loadingPoint != null) + Positioned( + left: _loadingPoint!.dx - 12, + top: _loadingPoint!.dy - 12, + child: Container( + width: 24, + height: 24, + decoration: BoxDecoration( + color: isDark ? const Color(0xFF242424) : Colors.white, + shape: BoxShape.circle, + boxShadow: const [ + BoxShadow(color: Colors.black26, blurRadius: 4, offset: Offset(0, 2)), + ], + ), + padding: const EdgeInsets.all(4), + child: CircularProgressIndicator( + strokeWidth: 2, + color: isDark ? Colors.white : Theme.of(context).primaryColor, + ), + ), + ), + // Floating top search bar & suggestion panel if (isSearchEnabledAndDefault) Positioned( From 3cb1eae6f13828a93fcfc8db434a76cac975cc7f Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 15:57:52 -0700 Subject: [PATCH 090/139] fixed fallback --- .../esri_map_services/esrimap_search_service.dart | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/core/services/esri_map_services/esrimap_search_service.dart b/lib/core/services/esri_map_services/esrimap_search_service.dart index 7d4bb2556..851402aaa 100644 --- a/lib/core/services/esri_map_services/esrimap_search_service.dart +++ b/lib/core/services/esri_map_services/esrimap_search_service.dart @@ -151,8 +151,19 @@ class EsriMapSearchService { if (rings != null && rings.isNotEmpty) { final firstRing = rings.first as List?; if (firstRing != null && firstRing.isNotEmpty) { - resLng = firstRing.first[0] as double; - resLat = firstRing.first[1] as double; + double minX = double.infinity, maxX = double.negativeInfinity; + double minY = double.infinity, maxY = double.negativeInfinity; + for (final point in firstRing) { + final coords = point as List; + final x = (coords[0] as num).toDouble(); + final y = (coords[1] as num).toDouble(); + if (x < minX) minX = x; + if (x > maxX) maxX = x; + if (y < minY) minY = y; + if (y > maxY) maxY = y; + } + resLng = (minX + maxX) / 2; + resLat = (minY + maxY) / 2; } try { From 2771f38029ed07b48f3ef41799c7a9324f134afc Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 16:08:33 -0700 Subject: [PATCH 091/139] completely integrated building tooltips --- lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index b68d17fbe..93a32d278 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -507,7 +507,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { ); }, childCount: routeManeuvers.length), ), - const SliverToBoxAdapter(child: SizedBox(height: 80)), + const SliverToBoxAdapter(child: SizedBox(height: 16)), ], ), ); From 78d74d782f228c21ecabe8e1f103cc577d6e655c Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Tue, 18 Aug 2026 23:11:09 +0000 Subject: [PATCH 092/139] style: auto fix formatting violations --- .../esrimap_search_service.dart | 76 +++++++++++-------- lib/ui/esrimap/esrimap.dart | 32 ++++---- 2 files changed, 60 insertions(+), 48 deletions(-) diff --git a/lib/core/services/esri_map_services/esrimap_search_service.dart b/lib/core/services/esri_map_services/esrimap_search_service.dart index 851402aaa..ee43b4b33 100644 --- a/lib/core/services/esri_map_services/esrimap_search_service.dart +++ b/lib/core/services/esri_map_services/esrimap_search_service.dart @@ -115,36 +115,42 @@ class EsriMapSearchService { /// Identifies a building by performing a spatial intersection query at the given WGS84 coordinate. static Future identifyBuildingAtCoordinate(double lat, double lng) async { try { - final uri = Uri.parse('https://admin-enterprise-gis.ucsd.edu/server/rest/services/Buildings/Buildings_Campus_Map/MapServer/2/query'); - final response = await http.get(uri.replace(queryParameters: { - 'geometry': '$lng,$lat', - 'geometryType': 'esriGeometryPoint', - 'inSR': '4326', - 'spatialRel': 'esriSpatialRelIntersects', - 'distance': '15', - 'units': 'esriSRUnit_Foot', - 'outFields': '*', - 'returnGeometry': 'true', - 'outSR': '4326', - 'f': 'json', - })); + final uri = Uri.parse( + 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/Buildings/Buildings_Campus_Map/MapServer/2/query', + ); + final response = await http.get( + uri.replace( + queryParameters: { + 'geometry': '$lng,$lat', + 'geometryType': 'esriGeometryPoint', + 'inSR': '4326', + 'spatialRel': 'esriSpatialRelIntersects', + 'distance': '15', + 'units': 'esriSRUnit_Foot', + 'outFields': '*', + 'returnGeometry': 'true', + 'outSR': '4326', + 'f': 'json', + }, + ), + ); if (response.statusCode == 200) { final data = jsonDecode(response.body); final features = data['features'] as List?; if (features != null && features.isNotEmpty) { final attr = features.first['attributes'] as Map; - + final longName = attr['GIS.facTririgaBuildingInfo.FacilityLongName'] as String?; final shortName = attr['GIS.facTririgaBuildingInfo.FacilityShortName'] as String?; String name = (longName != null && longName.isNotEmpty) ? longName : (shortName ?? 'Unknown Building'); String address = attr['GIS.facTririgaBuildingInfo.StreetAddress'] as String? ?? ''; - + // Try to extract center of geometry if it's returned, otherwise fallback to tap location double resLat = lat; double resLng = lng; Polygon? footprintPolygon; - + final geom = features.first['geometry'] as Map?; if (geom != null) { final rings = geom['rings'] as List?; @@ -165,7 +171,7 @@ class EsriMapSearchService { resLng = (minX + maxX) / 2; resLat = (minY + maxY) / 2; } - + try { final builder = PolygonBuilder(spatialReference: SpatialReference.wgs84); for (final ring in rings) { @@ -183,21 +189,27 @@ class EsriMapSearchService { } } } - + if (name == 'Unknown Building') { - final fallbackUrl = Uri.parse('https://admin-enterprise-gis.ucsd.edu/server/rest/services/Buildings/Buildings_Campus_Map/MapServer/0/query'); + final fallbackUrl = Uri.parse( + 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/Buildings/Buildings_Campus_Map/MapServer/0/query', + ); try { - final fallbackRes = await http.get(fallbackUrl.replace(queryParameters: { - 'geometry': '$resLng,$resLat', - 'geometryType': 'esriGeometryPoint', - 'inSR': '4326', - 'spatialRel': 'esriSpatialRelIntersects', - 'distance': '100', // 100 feet from center of footprint - 'units': 'esriSRUnit_Foot', - 'outFields': '*', - 'returnGeometry': 'false', - 'f': 'json', - })); + final fallbackRes = await http.get( + fallbackUrl.replace( + queryParameters: { + 'geometry': '$resLng,$resLat', + 'geometryType': 'esriGeometryPoint', + 'inSR': '4326', + 'spatialRel': 'esriSpatialRelIntersects', + 'distance': '100', // 100 feet from center of footprint + 'units': 'esriSRUnit_Foot', + 'outFields': '*', + 'returnGeometry': 'false', + 'f': 'json', + }, + ), + ); if (fallbackRes.statusCode == 200) { final fallbackData = jsonDecode(fallbackRes.body); final fallbackFeatures = fallbackData['features'] as List?; @@ -211,9 +223,7 @@ class EsriMapSearchService { name = fbShort; } final fbAddr = fbAttr['GIS.facTririgaBuildingInfo.StreetAddress'] as String?; - if (fbAddr != null && fbAddr.isNotEmpty) { - address = fbAddr; - } + if (fbAddr != null && fbAddr.isNotEmpty) address = fbAddr; } } } catch (_) {} diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index a8efbd8f8..a1c2b6aa1 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -930,11 +930,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { symbol: SimpleFillSymbol( style: SimpleFillSymbolStyle.solid, color: Colors.blue.withOpacity(0.3), - outline: SimpleLineSymbol( - style: SimpleLineSymbolStyle.solid, - color: Colors.blue, - width: 2, - ), + outline: SimpleLineSymbol(style: SimpleLineSymbolStyle.solid, color: Colors.blue, width: 2), ), ); footprintGraphic.attributes['resultIndex'] = i; @@ -1095,7 +1091,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final hasGraphics = identifyResult.graphics.isNotEmpty; if (hasGraphics) { - if (mounted) setState(() { _loadingPoint = null; }); + if (mounted) + setState(() { + _loadingPoint = null; + }); final tappedGraphic = identifyResult.graphics.first; final index = tappedGraphic.attributes['resultIndex'] as int?; final isValidResultIndex = index != null && index >= 0 && index < _mappedResults.length; @@ -1107,15 +1106,17 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } if (mapPoint != null) { - final wgs84Point = GeometryEngine.project(mapPoint, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; + final wgs84Point = + GeometryEngine.project(mapPoint, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; if (wgs84Point != null && !wgs84Point.x.isNaN && !wgs84Point.y.isNaN) { final buildingResult = await EsriMapSearchService.identifyBuildingAtCoordinate(wgs84Point.y, wgs84Point.x); - if (mounted) setState(() { _loadingPoint = null; }); + if (mounted) + setState(() { + _loadingPoint = null; + }); if (buildingResult != null) { _plotResultsOnMap([buildingResult]); - if (_graphicsOverlay.graphics.isNotEmpty) { - _handlePinTap(buildingResult, _graphicsOverlay.graphics.last); - } + if (_graphicsOverlay.graphics.isNotEmpty) _handlePinTap(buildingResult, _graphicsOverlay.graphics.last); return; } else { _dismissCallout(); @@ -1123,7 +1124,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } - if (mounted) setState(() { _loadingPoint = null; }); + if (mounted) + setState(() { + _loadingPoint = null; + }); _dismissCallout(); final isSelectedResultNotNull = _selectedResult != null; if (isSelectedResultNotNull) _closeDetail(); @@ -2034,9 +2038,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { decoration: BoxDecoration( color: isDark ? const Color(0xFF242424) : Colors.white, shape: BoxShape.circle, - boxShadow: const [ - BoxShadow(color: Colors.black26, blurRadius: 4, offset: Offset(0, 2)), - ], + boxShadow: const [BoxShadow(color: Colors.black26, blurRadius: 4, offset: Offset(0, 2))], ), padding: const EdgeInsets.all(4), child: CircularProgressIndicator( From 900af314e5cc41b8fc15f62dde0942848e7d3a7f Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 18:59:29 -0700 Subject: [PATCH 093/139] added a consistent search results (bottom) --- .../esrimap_category_list_panel.dart | 9 ++-- lib/ui/esrimap/esrimap.dart | 45 ++++++++++++++++--- 2 files changed, 44 insertions(+), 10 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart index 0ee5b3018..9bf019ce4 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart @@ -147,11 +147,12 @@ class EsriMapCategoryListPanel extends StatelessWidget { r.longitude, ) : null; - final distLabel = dist == null + final distFeet = dist != null ? dist * 3.28084 : null; + final distLabel = distFeet == null ? null - : dist < 1000 - ? '${dist.round()} m away' - : '${(dist / 1000).toStringAsFixed(1)} km away'; + : distFeet < 1000 + ? '${distFeet.round()} ft away' + : '${(distFeet / 5280).toStringAsFixed(1)} mi away'; final isNotLastResult = index < results.length - 1; return Column( children: [ diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index a1c2b6aa1..7bd61a946 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -804,7 +804,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { setState(() { _isSearching = true; - _showResults = true; + _showResults = _showRouteFields; _showSuggestions = false; _selectedResult = null; _matchingPoiClasses = matched; @@ -823,10 +823,40 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { await _waitForMinimumSearchLoadingTime(loadingStopwatch); final isStale = !mounted || requestId != _searchRequestId; if (isStale) return; - setState(() { - _searchResults = merged; - _isSearching = false; - }); + + if (_showRouteFields) { + setState(() { + _searchResults = merged; + _isSearching = false; + }); + } else { + final userLoc = _getUserLatLng(); + if (userLoc != null) { + merged.sort((a, b) { + final distA = EsriMapSearchService.distanceMeters(userLoc.$1, userLoc.$2, a.latitude, a.longitude); + final distB = EsriMapSearchService.distanceMeters(userLoc.$1, userLoc.$2, b.latitude, b.longitude); + return distA.compareTo(distB); + }); + } else { + merged.sort((a, b) => a.name.compareTo(b.name)); + } + + _plotResultsOnMap(merged); + + setState(() { + _searchResults = []; + _allCategoryResults = merged; + _showCategoryList = merged.isNotEmpty; + _showResults = false; + _activeCategory = null; + _isSearching = false; + }); + + if (merged.isEmpty && query.isNotEmpty) { + ScaffoldMessenger.of(context) + .showSnackBar(const SnackBar(content: Text('No locations found.'))); + } + } } /// Category search: queries matching locations and plots pins on the map. @@ -1065,11 +1095,13 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } Future _onMapTap(Offset screenPoint) async { - final isDropdownVisible = _showSuggestions || _showResults; + final hasClassMatches = _matchingPoiClasses.isNotEmpty && _searchController.text.isNotEmpty; + final isDropdownVisible = _showSuggestions || _showResults || hasClassMatches; if (isDropdownVisible) { setState(() { _showSuggestions = false; _showResults = false; + _matchingPoiClasses = []; }); _focusNode.unfocus(); return; @@ -1815,6 +1847,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { setState(() { _showSuggestions = false; _showResults = false; + _matchingPoiClasses = []; }); } From a22a5dc0fbc8992acf685a9d370e61c6a1b821ab Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 19:12:33 -0700 Subject: [PATCH 094/139] cleaned up --- .../esri_map_widgets/esrimap_detail_slide_over.dart | 8 ++++++++ lib/ui/esrimap/esrimap.dart | 11 ++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index 93a32d278..a87cb41e2 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -174,6 +174,14 @@ Widget buildDetailSlideOverContent({ padding: const EdgeInsets.fromLTRB(20, 16, 20, 16), child: Row( children: [ + GestureDetector( + onTap: onClose, + behavior: HitTestBehavior.opaque, + child: Padding( + padding: const EdgeInsets.only(right: 12, top: 4, bottom: 4), + child: Icon(Icons.arrow_back, size: 24, color: isDark ? Colors.white70 : Colors.grey[800]), + ), + ), if (hasHeaderIcon) ...[ Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), const SizedBox(width: 8), diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 7bd61a946..fad00ba3d 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1147,6 +1147,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _loadingPoint = null; }); if (buildingResult != null) { + if (_allCategoryResults.isNotEmpty) { + _clearSearch(); + } _plotResultsOnMap([buildingResult]); if (_graphicsOverlay.graphics.isNotEmpty) _handlePinTap(buildingResult, _graphicsOverlay.graphics.last); return; @@ -1227,7 +1230,13 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return; } - _showCalloutForGraphic(result, graphic); + if (_allCategoryResults.isEmpty) { + _showCalloutForGraphic(result, graphic); + } else { + // Ensure any existing callout is dismissed if we're in a list context + _dismissCallout(); + } + _selectResultFromPin(result, updateSearchText: false); } From 714fbbeb04a0be0eff001988b1ee224d84256716 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 19:19:42 -0700 Subject: [PATCH 095/139] fixed driving directions --- .../esrimap_detail_slide_over.dart | 82 ++++++++++--------- 1 file changed, 45 insertions(+), 37 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index a87cb41e2..03fc7dfc5 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -168,45 +168,53 @@ Widget buildDetailSlideOverContent({ if (isMinimized) onToggle(); } }, - child: InkWell( - onTap: onToggle, - child: Padding( - padding: const EdgeInsets.fromLTRB(20, 16, 20, 16), - child: Row( - children: [ - GestureDetector( - onTap: onClose, - behavior: HitTestBehavior.opaque, + child: Padding( + padding: const EdgeInsets.fromLTRB(8, 8, 8, 8), + child: Row( + children: [ + IconButton( + icon: const Icon(Icons.arrow_back), + color: isDark ? Colors.white70 : Colors.grey[800], + onPressed: onClose, + tooltip: 'Back', + ), + Expanded( + child: InkWell( + onTap: onToggle, + borderRadius: BorderRadius.circular(8), child: Padding( - padding: const EdgeInsets.only(right: 12, top: 4, bottom: 4), - child: Icon(Icons.arrow_back, size: 24, color: isDark ? Colors.white70 : Colors.grey[800]), - ), - ), - if (hasHeaderIcon) ...[ - Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), - const SizedBox(width: 8), - ], - Expanded( - child: Text( - headerTitle, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - color: isDark ? Colors.white : Colors.grey[900], + padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 12), + child: Row( + children: [ + if (hasHeaderIcon) ...[ + Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), + const SizedBox(width: 8), + ], + Expanded( + child: Text( + headerTitle, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + color: isDark ? Colors.white : Colors.grey[900], + ), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ), + if (hasTrailing && !isMinimized) trailing, + const SizedBox(width: 8), + Icon( + isMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, + size: 24, + color: isDark ? Colors.white70 : Colors.grey[700], + ), + ], ), - maxLines: 1, - overflow: TextOverflow.ellipsis, ), ), - if (hasTrailing && !isMinimized) trailing, - const SizedBox(width: 8), - Icon( - isMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, - size: 24, - color: isDark ? Colors.white70 : Colors.grey[700], - ), - ], - ), + ), + ], ), ), ), @@ -302,7 +310,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { onLaunchWebsite( 'https://www.google.com/maps/dir/?api=1' '&destination=${result.latitude},${result.longitude}' - '&travelmode=walking' + '&travelmode=walking&dirflg=w' '$originParam', ); }, @@ -362,7 +370,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { onLaunchWebsite( 'https://www.google.com/maps/dir/?api=1' '&destination=${result.latitude},${result.longitude}' - '&travelmode=driving' + '&travelmode=driving&dirflg=d' '$originParam', ); }, From 1b79ef49845a68da5973ece499511253204b5ac1 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 19:37:41 -0700 Subject: [PATCH 096/139] added cached tooltips --- .../esri_map_models/map_search_result.dart | 6 ++ .../esrimap_search_service.dart | 77 ++++++++++++++++++- lib/ui/esrimap/esrimap.dart | 40 ++++++---- test_geom.dart | 1 + 4 files changed, 109 insertions(+), 15 deletions(-) create mode 100644 test_geom.dart diff --git a/lib/core/models/esri_map_models/map_search_result.dart b/lib/core/models/esri_map_models/map_search_result.dart index bf37906c6..ee986d851 100644 --- a/lib/core/models/esri_map_models/map_search_result.dart +++ b/lib/core/models/esri_map_models/map_search_result.dart @@ -43,6 +43,9 @@ class MapSearchResult { /// Optional polygon geometry for the building footprint. Not serialized to JSON. final dynamic footprint; + /// Optional raw geometry dictionary for regenerating the footprint. + final Map? rawGeometry; + /// Constructs a [MapSearchResult] instance. const MapSearchResult({ required this.name, @@ -54,6 +57,7 @@ class MapSearchResult { this.description = '', this.websiteUrl, this.footprint, + this.rawGeometry, }); /// Serializes the search result into a JSON-compatible map for storage in SharedPreferences. @@ -66,6 +70,7 @@ class MapSearchResult { 'address': address, 'description': description, 'websiteUrl': websiteUrl, + if (rawGeometry != null) 'rawGeometry': rawGeometry, }; /// Factory constructor to deserialize a [MapSearchResult] from a JSON map. @@ -79,6 +84,7 @@ class MapSearchResult { address: json['address'] as String? ?? '', description: json['description'] as String? ?? '', websiteUrl: json['websiteUrl'] as String?, + rawGeometry: json['rawGeometry'] as Map?, ); } } diff --git a/lib/core/services/esri_map_services/esrimap_search_service.dart b/lib/core/services/esri_map_services/esrimap_search_service.dart index ee43b4b33..e1f5a7ccf 100644 --- a/lib/core/services/esri_map_services/esrimap_search_service.dart +++ b/lib/core/services/esri_map_services/esrimap_search_service.dart @@ -21,6 +21,12 @@ class EsriMapSearchService { /// SharedPreferences key used to persist recent searches. static const String RECENT_SEARCHES_KEY = 'esri_map_recent_searches'; + /// SharedPreferences key used to persist cached building footprints. + static const String _cachedBuildingsKey = 'esrimap_cached_buildings'; + + static List _searches = []; + static List _cachedBuildings = []; + /// Maximum number of recent searches retained. static const int MAX_RECENT_SEARCHES = 5; @@ -112,9 +118,72 @@ class EsriMapSearchService { .toList(); } + /// Loads cached building footprints from SharedPreferences. + static Future loadCachedBuildings() async { + final prefs = await SharedPreferences.getInstance(); + final jsonStr = prefs.getString(_cachedBuildingsKey); + if (jsonStr != null) { + try { + final list = jsonDecode(jsonStr) as List; + _cachedBuildings = list.map((e) { + final result = MapSearchResult.fromJson(e as Map); + // Reconstruct the Polygon footprint if rawGeometry is available + dynamic footprintPolygon; + if (result.rawGeometry != null) { + final rings = result.rawGeometry!['rings'] as List?; + if (rings != null) { + try { + final builder = PolygonBuilder(spatialReference: SpatialReference.wgs84); + for (final ring in rings) { + final part = MutablePart(spatialReference: SpatialReference.wgs84); + for (final point in (ring as List)) { + final coords = point as List; + part.addPointXY(x: (coords[0] as num).toDouble(), y: (coords[1] as num).toDouble()); + } + builder.parts.addPart(part); + } + footprintPolygon = builder.toGeometry(); + } catch (_) {} + } + } + return MapSearchResult( + name: result.name, + subtitle: result.subtitle, + latitude: result.latitude, + longitude: result.longitude, + source: result.source, + address: result.address, + description: result.description, + websiteUrl: result.websiteUrl, + footprint: footprintPolygon, + rawGeometry: result.rawGeometry, + ); + }).toList(); + } catch (e) { + debugPrint('Failed to load cached buildings: $e'); + } + } + } + + /// Saves the current list of cached buildings to SharedPreferences. + static Future _saveCachedBuildings() async { + final prefs = await SharedPreferences.getInstance(); + final jsonList = _cachedBuildings.map((c) => c.toJson()).toList(); + await prefs.setString(_cachedBuildingsKey, jsonEncode(jsonList)); + } + /// Identifies a building by performing a spatial intersection query at the given WGS84 coordinate. static Future identifyBuildingAtCoordinate(double lat, double lng) async { try { + final point = ArcGISPoint(x: lng, y: lat, spatialReference: SpatialReference.wgs84); + for (final cached in _cachedBuildings) { + if (cached.footprint != null) { + if (GeometryEngine.intersects(geometry1: point, geometry2: cached.footprint as Geometry)) { + return cached; + } + } + } + final uri = Uri.parse( 'https://admin-enterprise-gis.ucsd.edu/server/rest/services/Buildings/Buildings_Campus_Map/MapServer/2/query', ); @@ -229,7 +298,7 @@ class EsriMapSearchService { } catch (_) {} } - return MapSearchResult( + final newResult = MapSearchResult( name: name, subtitle: 'Building', latitude: resLat, @@ -237,7 +306,13 @@ class EsriMapSearchService { source: MapSearchSource.building, address: address, footprint: footprintPolygon, + rawGeometry: geom, ); + + _cachedBuildings.add(newResult); + _saveCachedBuildings(); + + return newResult; } } } catch (e) { diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index fad00ba3d..55c20365b 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -742,6 +742,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // --------------------------------------------------------------------------- Future _loadRecentSearches() async { + await EsriMapSearchService.loadCachedBuildings(); final searches = await EsriMapSearchService.loadRecentSearches(); if (mounted) setState(() => _recentSearches = searches); } @@ -840,7 +841,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } else { merged.sort((a, b) => a.name.compareTo(b.name)); } - + _plotResultsOnMap(merged); setState(() { @@ -851,10 +852,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _activeCategory = null; _isSearching = false; }); - + if (merged.isEmpty && query.isNotEmpty) { - ScaffoldMessenger.of(context) - .showSnackBar(const SnackBar(content: Text('No locations found.'))); + ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('No locations found.'))); } } } @@ -915,8 +915,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); if (allResults.isEmpty) { - ScaffoldMessenger.of(context) - .showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); } } catch (e) { debugPrint('Category search error: $e'); @@ -928,8 +929,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _allCategoryResults = []; _isSearching = false; }); - ScaffoldMessenger.of(context) - .showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); } } @@ -1108,9 +1110,15 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } final mapPoint = _mapViewController.screenToLocation(screen: screenPoint); - // Show the loading indicator immediately as a Flutter overlay - setState(() { - _loadingPoint = screenPoint; + + // Delay the loading indicator so fast responses (like empty taps) don't flash it + bool isRequestFinished = false; + Future.delayed(const Duration(milliseconds: 350), () { + if (!isRequestFinished && mounted) { + setState(() { + _loadingPoint = screenPoint; + }); + } }); try { @@ -1123,6 +1131,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final hasGraphics = identifyResult.graphics.isNotEmpty; if (hasGraphics) { + isRequestFinished = true; if (mounted) setState(() { _loadingPoint = null; @@ -1142,6 +1151,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { GeometryEngine.project(mapPoint, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; if (wgs84Point != null && !wgs84Point.x.isNaN && !wgs84Point.y.isNaN) { final buildingResult = await EsriMapSearchService.identifyBuildingAtCoordinate(wgs84Point.y, wgs84Point.x); + isRequestFinished = true; if (mounted) setState(() { _loadingPoint = null; @@ -1159,6 +1169,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } + isRequestFinished = true; if (mounted) setState(() { _loadingPoint = null; @@ -1236,7 +1247,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Ensure any existing callout is dismissed if we're in a list context _dismissCallout(); } - + _selectResultFromPin(result, updateSearchText: false); } @@ -1325,8 +1336,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final gps = await _getDeviceLocationEfficiently(); if (gps == null) { if (mounted) { - ScaffoldMessenger.of(context) - .showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + ScaffoldMessenger.of( + context, + ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } diff --git a/test_geom.dart b/test_geom.dart new file mode 100644 index 000000000..f409898ac --- /dev/null +++ b/test_geom.dart @@ -0,0 +1 @@ +import 'package:arcgis_maps/arcgis_maps.dart'; void main() { print(Geometry.fromJsonString); } From 1f91991865bd1216a6779dd06a0d96343878558e Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 19:39:00 -0700 Subject: [PATCH 097/139] added a Time-To-Live to the cached data --- .../esri_map_models/map_search_result.dart | 6 ++++++ .../esrimap_search_service.dart | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/core/models/esri_map_models/map_search_result.dart b/lib/core/models/esri_map_models/map_search_result.dart index ee986d851..b70f12dd4 100644 --- a/lib/core/models/esri_map_models/map_search_result.dart +++ b/lib/core/models/esri_map_models/map_search_result.dart @@ -46,6 +46,9 @@ class MapSearchResult { /// Optional raw geometry dictionary for regenerating the footprint. final Map? rawGeometry; + /// Optional timestamp (milliseconds since epoch) indicating when this result was fetched. + final int? fetchedAt; + /// Constructs a [MapSearchResult] instance. const MapSearchResult({ required this.name, @@ -58,6 +61,7 @@ class MapSearchResult { this.websiteUrl, this.footprint, this.rawGeometry, + this.fetchedAt, }); /// Serializes the search result into a JSON-compatible map for storage in SharedPreferences. @@ -71,6 +75,7 @@ class MapSearchResult { 'description': description, 'websiteUrl': websiteUrl, if (rawGeometry != null) 'rawGeometry': rawGeometry, + if (fetchedAt != null) 'fetchedAt': fetchedAt, }; /// Factory constructor to deserialize a [MapSearchResult] from a JSON map. @@ -85,6 +90,7 @@ class MapSearchResult { description: json['description'] as String? ?? '', websiteUrl: json['websiteUrl'] as String?, rawGeometry: json['rawGeometry'] as Map?, + fetchedAt: json['fetchedAt'] as int?, ); } } diff --git a/lib/core/services/esri_map_services/esrimap_search_service.dart b/lib/core/services/esri_map_services/esrimap_search_service.dart index e1f5a7ccf..5065f71ea 100644 --- a/lib/core/services/esri_map_services/esrimap_search_service.dart +++ b/lib/core/services/esri_map_services/esrimap_search_service.dart @@ -176,10 +176,21 @@ class EsriMapSearchService { static Future identifyBuildingAtCoordinate(double lat, double lng) async { try { final point = ArcGISPoint(x: lng, y: lat, spatialReference: SpatialReference.wgs84); - for (final cached in _cachedBuildings) { + final now = DateTime.now().millisecondsSinceEpoch; + + for (int i = 0; i < _cachedBuildings.length; i++) { + final cached = _cachedBuildings[i]; if (cached.footprint != null) { if (GeometryEngine.intersects(geometry1: point, geometry2: cached.footprint as Geometry)) { - return cached; + // Check if cache is older than 30 days (30L * 24 * 60 * 60 * 1000) + final isExpired = cached.fetchedAt == null || (now - cached.fetchedAt!) > 2592000000; + if (!isExpired) { + return cached; + } else { + // Expired, remove it so we fetch a fresh one + _cachedBuildings.removeAt(i); + break; + } } } } @@ -307,6 +318,7 @@ class EsriMapSearchService { address: address, footprint: footprintPolygon, rawGeometry: geom, + fetchedAt: DateTime.now().millisecondsSinceEpoch, ); _cachedBuildings.add(newResult); From 792d1d55044dce215224002fe006b4c1e9b6b7c1 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 19:44:51 -0700 Subject: [PATCH 098/139] smoothed out the user experience --- .../esrimap_category_list_panel.dart | 14 +++++--------- lib/ui/esrimap/esrimap.dart | 3 ++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart index 9bf019ce4..bb247da81 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart @@ -73,19 +73,15 @@ class EsriMapCategoryListPanel extends StatelessWidget { } // Content-aware sizing calculation - final screenHeight = MediaQuery.of(context).size.height; - final contentHeight = 80.0 + (results.length * 56.0).clamp(56.0, 600.0); - final contentFraction = (contentHeight / screenHeight).clamp(0.15, 0.80); - final initialSize = contentFraction < 0.45 ? contentFraction : 0.45; - final maxSize = contentFraction < 0.80 ? contentFraction.clamp(0.45, 0.80) : 0.80; - final snaps = [0.15]; - final isInitialSizeLarger = initialSize > 0.15 + 0.01; - if (isInitialSizeLarger) snaps.add(initialSize); + final initialSize = 0.45; + final minSize = 0.15; + final maxSize = 0.90; + final snaps = [minSize, initialSize, maxSize]; return DraggableScrollableSheet( controller: controller, initialChildSize: initialSize, - minChildSize: 0.15, + minChildSize: minSize, maxChildSize: maxSize, snap: true, snapSizes: snaps, diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 55c20365b..2cfe56a40 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1113,7 +1113,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Delay the loading indicator so fast responses (like empty taps) don't flash it bool isRequestFinished = false; - Future.delayed(const Duration(milliseconds: 350), () { + Future.delayed(const Duration(milliseconds: 200), () { if (!isRequestFinished && mounted) { setState(() { _loadingPoint = screenPoint; @@ -2300,6 +2300,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Category results list panel if (shouldShowCatListPanel) EsriMapCategoryListPanel( + key: const Key('category_list_panel'), controller: _categorySheetController, activeCategory: _activeCategory, allCategoryResults: _allCategoryResults, From 7f6d8f22481b6fd2a34bc821f996d5a5566a9641 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 20:09:31 -0700 Subject: [PATCH 099/139] fixed the default zoom level and issues with closing buttons --- .../esrimap_auth_handler.dart | 46 ++++++---- .../esrimap_category_list_panel.dart | 9 ++ .../esrimap_detail_slide_over.dart | 90 ++++++++++--------- lib/ui/esrimap/esrimap.dart | 29 +++--- 4 files changed, 101 insertions(+), 73 deletions(-) diff --git a/lib/core/services/esri_map_services/esrimap_auth_handler.dart b/lib/core/services/esri_map_services/esrimap_auth_handler.dart index 49c0f3aff..46e39b8c8 100644 --- a/lib/core/services/esri_map_services/esrimap_auth_handler.dart +++ b/lib/core/services/esri_map_services/esrimap_auth_handler.dart @@ -67,25 +67,37 @@ class AgeAuthChallengeHandler implements ArcGISAuthenticationChallengeHandler { /// Handles incoming ArcGIS authentication challenges by attaching pregenerated token credentials. @override Future handleArcGISAuthenticationChallenge(ArcGISAuthenticationChallenge challenge) async { - try { - final host = challenge.requestUri.host; - final (token, expiry) = await _getTokenForHost(host); - if (token == null || expiry == null) { - challenge.continueAndFail(); - return; - } + final host = challenge.requestUri.host; + int maxRetries = 5; + int retryDelaySeconds = 2; - final tokenInfo = TokenInfo.create(accessToken: token, expirationDate: expiry, isSslRequired: true); - if (tokenInfo == null) { - challenge.continueAndFail(); - return; - } + for (int attempt = 1; attempt <= maxRetries; attempt++) { + try { + final (token, expiry) = await _getTokenForHost(host); + if (token == null || expiry == null) { + challenge.continueAndFail(); + return; + } - final credential = PregeneratedTokenCredential(uri: challenge.requestUri, tokenInfo: tokenInfo, referer: ''); - challenge.continueWithCredential(credential); - } catch (e) { - debugPrint('Auth challenge failed: $e'); - challenge.continueAndFail(); + final tokenInfo = TokenInfo.create(accessToken: token, expirationDate: expiry, isSslRequired: true); + if (tokenInfo == null) { + challenge.continueAndFail(); + return; + } + + final credential = PregeneratedTokenCredential(uri: challenge.requestUri, tokenInfo: tokenInfo, referer: ''); + challenge.continueWithCredential(credential); + return; // Success, exit the loop + } catch (e) { + debugPrint('Auth challenge failed on attempt $attempt: $e'); + if (attempt == maxRetries) { + challenge.continueAndFail(); + return; + } + // Wait before retrying (exponential backoff) + await Future.delayed(Duration(seconds: retryDelaySeconds)); + retryDelaySeconds *= 2; + } } } } diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart index bb247da81..1f4fea021 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart @@ -96,6 +96,15 @@ class EsriMapCategoryListPanel extends StatelessWidget { headerTitle: headerTitle, headerIcon: activeCategory?.icon ?? Icons.place, onClose: onClearSearch, + onHeaderTap: () { + if (controller.isAttached) { + if (controller.size < 0.85) { + controller.animateTo(maxSize, duration: const Duration(milliseconds: 300), curve: Curves.easeOutCubic); + } else { + controller.animateTo(initialSize, duration: const Duration(milliseconds: 300), curve: Curves.easeOutCubic); + } + } + }, trailing: hasMoreTotalResults ? TextButton.icon( icon: Icon(Icons.layers_outlined, size: 16, color: isDark ? Colors.white54 : Colors.grey[600]), diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index 03fc7dfc5..3ac923adc 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -9,6 +9,7 @@ Widget buildSlideOverContent({ required String headerTitle, IconData? headerIcon, required VoidCallback onClose, + VoidCallback? onHeaderTap, Widget? trailing, required List sliverBody, double headerHeight = 80.0, @@ -31,54 +32,61 @@ Widget buildSlideOverContent({ delegate: SlideOverHeaderDelegate( height: headerHeight, backgroundColor: bgColor, - child: Column( - children: [ - Padding( - padding: const EdgeInsets.only(top: 10, bottom: 4), - child: Container( - width: 36, - height: 4, - decoration: BoxDecoration( - color: isDark ? Colors.grey[700] : Colors.grey[300], - borderRadius: BorderRadius.circular(2), + child: InkWell( + onTap: onHeaderTap, + child: Column( + children: [ + Padding( + padding: const EdgeInsets.only(top: 10, bottom: 4), + child: Container( + width: 36, + height: 4, + decoration: BoxDecoration( + color: isDark ? Colors.grey[700] : Colors.grey[300], + borderRadius: BorderRadius.circular(2), + ), ), ), - ), - Padding( - padding: const EdgeInsets.fromLTRB(20, 6, 20, 8), - child: Row( - children: [ - if (hasHeaderIcon) ...[ - Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), - const SizedBox(width: 8), - ], - Expanded( - child: Text( - headerTitle, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - color: isDark ? Colors.white : Colors.grey[900], + Padding( + padding: const EdgeInsets.fromLTRB(20, 6, 20, 8), + child: Row( + children: [ + if (hasHeaderIcon) ...[ + Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), + const SizedBox(width: 8), + ], + Expanded( + child: Text( + headerTitle, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: isDark ? Colors.white : Colors.grey[900], + ), ), ), - ), - if (hasTrailing) trailing, - GestureDetector( - onTap: onClose, - child: Container( - width: 34, - height: 34, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: isDark ? Colors.grey[800] : Colors.grey[200], + if (hasTrailing) trailing, + Material( + color: Colors.transparent, + child: InkWell( + onTap: onClose, + customBorder: const CircleBorder(), + child: Container( + width: 34, + height: 34, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: isDark ? Colors.grey[800] : Colors.grey[200], + ), + child: Icon(Icons.close, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), + ), ), - child: Icon(Icons.close, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), ), - ), - ], + ], + ), ), - ), - ], + ], + ), ), ), ), diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 2cfe56a40..40f004c55 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -901,7 +901,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final closest = allResults.first; final p = ArcGISPoint(x: closest.longitude, y: closest.latitude, spatialReference: SpatialReference.wgs84); _showCalloutForGraphic(closest, _graphicsOverlay.graphics.first); - _mapViewController.setViewpointAnimated(Viewpoint.fromCenter(p, scale: 5000)); + _mapViewController.setViewpointAnimated(Viewpoint.fromCenter(p, scale: 18000)); } } else { allResults.sort((a, b) => a.name.compareTo(b.name)); @@ -993,26 +993,25 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.setViewpointAnimated( Viewpoint.fromCenter( ArcGISPoint(x: r.longitude, y: r.latitude, spatialReference: SpatialReference.wgs84), - scale: 5000, + scale: 18000, ), ); return; } - double minLat = results.map((r) => r.latitude).reduce((a, b) => a < b ? a : b); - double maxLat = results.map((r) => r.latitude).reduce((a, b) => a > b ? a : b); - double minLng = results.map((r) => r.longitude).reduce((a, b) => a < b ? a : b); - double maxLng = results.map((r) => r.longitude).reduce((a, b) => a > b ? a : b); - - const padding = 0.005; - final envelope = Envelope.fromXY( - xMin: minLng - padding, - yMin: minLat - padding, - xMax: maxLng + padding, - yMax: maxLat + padding, - spatialReference: SpatialReference.wgs84, + // Find the median coordinate to locate the densest cluster, ignoring outliers + final lats = results.map((r) => r.latitude).toList()..sort(); + final lngs = results.map((r) => r.longitude).toList()..sort(); + + final medianLat = lats[lats.length ~/ 2]; + final medianLng = lngs[lngs.length ~/ 2]; + + _mapViewController.setViewpointAnimated( + Viewpoint.fromCenter( + ArcGISPoint(x: medianLng, y: medianLat, spatialReference: SpatialReference.wgs84), + scale: 24000, + ), ); - _mapViewController.setViewpointAnimated(Viewpoint.fromTargetExtent(envelope)); } /// Dismisses the active map pin callout, if any. From 61855a50908c726c3438486b70a9f3419745c690 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 20:12:26 -0700 Subject: [PATCH 100/139] added an errorBuilder fallback to all unprotected network images: Events Card: It will now gracefully display the default generic 'UCSD Mobile' pattern image instead of failing with a red screen. Dining Menus & Location Details: Fallback to a grey circular restaurant icon if a vendor's logo fails to download. Student ID Card: Will fall back to a generic grey placeholder silhouette if the profile photo fails to fetch. --- lib/ui/dining/dining_detail_view.dart | 7 +++++++ lib/ui/dining/dining_list.dart | 13 ++++++++++++- lib/ui/events/event_tile.dart | 8 ++++++++ lib/ui/student_id/student_id_card.dart | 8 ++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/lib/ui/dining/dining_detail_view.dart b/lib/ui/dining/dining_detail_view.dart index c0608a438..dcda3b13f 100644 --- a/lib/ui/dining/dining_detail_view.dart +++ b/lib/ui/dining/dining_detail_view.dart @@ -88,6 +88,13 @@ class _DiningDetailViewState extends State { width: 80, height: 80, semanticLabel: 'Location logo', + errorBuilder: (context, error, stackTrace) { + return Icon( + Icons.restaurant, + size: 56, + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + ); + }, ), ) : Icon( diff --git a/lib/ui/dining/dining_list.dart b/lib/ui/dining/dining_list.dart index 6b56e828b..97b745a66 100644 --- a/lib/ui/dining/dining_list.dart +++ b/lib/ui/dining/dining_list.dart @@ -171,7 +171,18 @@ class DiningList extends StatelessWidget { decoration: Theme.of(context).brightness == Brightness.dark ? BoxDecoration(color: lightTextColor, borderRadius: BorderRadius.circular(8)) : null, - child: Image.network(data.vendorLogo!, width: 48, height: 48), + child: Image.network( + data.vendorLogo!, + width: 48, + height: 48, + errorBuilder: (context, error, stackTrace) { + return Icon( + Icons.restaurant, + size: 32, + color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + ); + }, + ), ) : Icon( Icons.restaurant, diff --git a/lib/ui/events/event_tile.dart b/lib/ui/events/event_tile.dart index 428a7b637..3ba428117 100644 --- a/lib/ui/events/event_tile.dart +++ b/lib/ui/events/event_tile.dart @@ -138,6 +138,14 @@ Widget _eventImageLoader(String? url) { ), ); }, + errorBuilder: (context, error, stackTrace) { + return Image.asset( + 'assets/images/UCSDMobile_sharp.png', + height: 150, + width: EventTile.TILE_WIDTH, + fit: BoxFit.cover, + ); + }, height: 150, width: EventTile.TILE_WIDTH, fit: BoxFit.cover, diff --git a/lib/ui/student_id/student_id_card.dart b/lib/ui/student_id/student_id_card.dart index 84e99f98d..db689b3a5 100644 --- a/lib/ui/student_id/student_id_card.dart +++ b/lib/ui/student_id/student_id_card.dart @@ -89,6 +89,14 @@ class _StudentIdCardState extends State { photoModel.photoUrl, fit: BoxFit.contain, height: ScalingUtility.verticalSafeBlock * 21, + errorBuilder: (context, error, stackTrace) { + return Container( + height: ScalingUtility.verticalSafeBlock * 21, + width: ScalingUtility.verticalSafeBlock * 21 * 0.75, // approximate aspect ratio + color: Colors.grey[300], + child: Icon(Icons.person, size: 50, color: Colors.grey[600]), + ); + }, ), ), SizedBox(width: cardMargin * 1.5), From 76b40aae4acfb779d7b6bca0f9cdcde44091a345 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 20:38:07 -0700 Subject: [PATCH 101/139] improved recreation results --- lib/ui/esrimap/esrimap.dart | 78 ++++++++++++++++++++++++++++++++++--- 1 file changed, 73 insertions(+), 5 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 40f004c55..b21d121ff 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -880,11 +880,79 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { try { var isRec = category.poiClassValue == 'Recreation Facilities'; - final searches = >>[ - EsriMapSearchService.queryPOIsByClass(category.poiClassValue), - if (isRec) EsriMapSearchService.queryBuildings('gym'), - ]; - final allResults = (await Future.wait(searches)).expand((results) => results).toList(); + var allResults = []; + + if (isRec) { + final baseSearch = EsriMapSearchService.queryPOIsByClass(category.poiClassValue); + final extraSearches = >>[ + EsriMapSearchService.queryBuildings('gym'), + EsriMapSearchService.queryBuildings('rimac'), + EsriMapSearchService.queryBuildings('track'), + EsriMapSearchService.queryBuildings('canyonview'), + EsriMapSearchService.queryBuildings('pool'), + EsriMapSearchService.queryBuildings('natatorium'), + EsriMapSearchService.queryPOIs('park'), + EsriMapSearchService.queryPOIs('beach'), + EsriMapSearchService.queryPOIs('amphitheater'), + EsriMapSearchService.queryPOIs('amphitheatre'), + EsriMapSearchService.queryBuildings('amphitheater'), + EsriMapSearchService.queryBuildings('arena'), + EsriMapSearchService.queryPOIs('field'), + EsriMapSearchService.queryPOIs('court'), + EsriMapSearchService.queryBuildings('fitness'), + EsriMapSearchService.queryBuildings('athletic'), + EsriMapSearchService.queryBuildings('aquatic'), + EsriMapSearchService.queryBuildings('rec'), + EsriMapSearchService.queryBuildings('theater'), + EsriMapSearchService.queryPOIs('theater'), + EsriMapSearchService.queryBuildings('theatre'), + EsriMapSearchService.queryPOIs('theatre'), + EsriMapSearchService.queryBuildings('wellness'), + ]; + + final baseResults = await baseSearch; + final extraResultsLists = await Future.wait(extraSearches); + + final validTerms = [ + 'gym', 'rimac', 'track', 'canyonview', 'pool', 'natatorium', + 'park', 'beach', 'amphitheater', 'amphitheatre', 'arena', 'field', + 'court', 'fitness', 'athletic', 'aquatic', 'rec', 'theater', 'theatre', 'wellness' + ]; + + final validExtraResults = extraResultsLists.expand((r) => r).where((r) { + final textLower = '${r.name} ${r.subtitle} ${r.description}'.toLowerCase(); + for (final term in validTerms) { + // Match word boundary to avoid substring matches (e.g. field in Gusfield) + if (RegExp(r'\b' + term).hasMatch(textLower)) return true; + } + return false; + }); + + allResults = [...baseResults, ...validExtraResults]; + } else { + allResults = await EsriMapSearchService.queryPOIsByClass(category.poiClassValue); + } + + // Deduplicate results by name to avoid showing the same place twice + final uniqueNames = {}; + allResults = allResults.where((r) { + if (!uniqueNames.add(r.name)) return false; + + // Filter out false positives for Recreation + if (isRec) { + final textLower = '${r.name} ${r.subtitle} ${r.description}'.toLowerCase(); + final excluded = [ + 'emergency', 'restroom', 'parking', 'call box', 'office', + 'elevator', 'atm ', ' atm', 'conference', 'room ', ' room', + 'reception', 'director', 'academic', 'admin', 'lecture', 'institute' + ]; + for (final term in excluded) { + if (textLower.contains(term)) return false; + } + } + return true; + }).toList(); + await _waitForMinimumSearchLoadingTime(loadingStopwatch); final isStale = !mounted || requestId != _searchRequestId; if (isStale) return; From 6f09154dfdf1b6d7e69eb90b4394c7543669ac01 Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Wed, 19 Aug 2026 03:40:52 +0000 Subject: [PATCH 102/139] style: auto fix formatting violations --- .../esrimap_search_service.dart | 2 +- lib/ui/dining/dining_detail_view.dart | 4 +- .../esrimap_category_list_panel.dart | 6 +- lib/ui/esrimap/esrimap.dart | 81 ++++++++++++------- 4 files changed, 62 insertions(+), 31 deletions(-) diff --git a/lib/core/services/esri_map_services/esrimap_search_service.dart b/lib/core/services/esri_map_services/esrimap_search_service.dart index 5065f71ea..8eac70d3e 100644 --- a/lib/core/services/esri_map_services/esrimap_search_service.dart +++ b/lib/core/services/esri_map_services/esrimap_search_service.dart @@ -177,7 +177,7 @@ class EsriMapSearchService { try { final point = ArcGISPoint(x: lng, y: lat, spatialReference: SpatialReference.wgs84); final now = DateTime.now().millisecondsSinceEpoch; - + for (int i = 0; i < _cachedBuildings.length; i++) { final cached = _cachedBuildings[i]; if (cached.footprint != null) { diff --git a/lib/ui/dining/dining_detail_view.dart b/lib/ui/dining/dining_detail_view.dart index dcda3b13f..9d9a7f660 100644 --- a/lib/ui/dining/dining_detail_view.dart +++ b/lib/ui/dining/dining_detail_view.dart @@ -92,7 +92,9 @@ class _DiningDetailViewState extends State { return Icon( Icons.restaurant, size: 56, - color: Theme.of(context).brightness == Brightness.light ? lightPrimaryColor : darkPrimaryColor2, + color: Theme.of(context).brightness == Brightness.light + ? lightPrimaryColor + : darkPrimaryColor2, ); }, ), diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart index 1f4fea021..16f8d698a 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart @@ -101,7 +101,11 @@ class EsriMapCategoryListPanel extends StatelessWidget { if (controller.size < 0.85) { controller.animateTo(maxSize, duration: const Duration(milliseconds: 300), curve: Curves.easeOutCubic); } else { - controller.animateTo(initialSize, duration: const Duration(milliseconds: 300), curve: Curves.easeOutCubic); + controller.animateTo( + initialSize, + duration: const Duration(milliseconds: 300), + curve: Curves.easeOutCubic, + ); } } }, diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index b21d121ff..92e5deb7d 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -853,9 +853,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); - if (merged.isEmpty && query.isNotEmpty) { + if (merged.isEmpty && query.isNotEmpty) ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('No locations found.'))); - } } } @@ -881,7 +880,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { try { var isRec = category.poiClassValue == 'Recreation Facilities'; var allResults = []; - + if (isRec) { final baseSearch = EsriMapSearchService.queryPOIsByClass(category.poiClassValue); final extraSearches = >>[ @@ -909,16 +908,33 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { EsriMapSearchService.queryPOIs('theatre'), EsriMapSearchService.queryBuildings('wellness'), ]; - + final baseResults = await baseSearch; final extraResultsLists = await Future.wait(extraSearches); - + final validTerms = [ - 'gym', 'rimac', 'track', 'canyonview', 'pool', 'natatorium', - 'park', 'beach', 'amphitheater', 'amphitheatre', 'arena', 'field', - 'court', 'fitness', 'athletic', 'aquatic', 'rec', 'theater', 'theatre', 'wellness' + 'gym', + 'rimac', + 'track', + 'canyonview', + 'pool', + 'natatorium', + 'park', + 'beach', + 'amphitheater', + 'amphitheatre', + 'arena', + 'field', + 'court', + 'fitness', + 'athletic', + 'aquatic', + 'rec', + 'theater', + 'theatre', + 'wellness', ]; - + final validExtraResults = extraResultsLists.expand((r) => r).where((r) { final textLower = '${r.name} ${r.subtitle} ${r.description}'.toLowerCase(); for (final term in validTerms) { @@ -927,24 +943,38 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } return false; }); - + allResults = [...baseResults, ...validExtraResults]; } else { allResults = await EsriMapSearchService.queryPOIsByClass(category.poiClassValue); } - + // Deduplicate results by name to avoid showing the same place twice final uniqueNames = {}; allResults = allResults.where((r) { if (!uniqueNames.add(r.name)) return false; - + // Filter out false positives for Recreation if (isRec) { final textLower = '${r.name} ${r.subtitle} ${r.description}'.toLowerCase(); final excluded = [ - 'emergency', 'restroom', 'parking', 'call box', 'office', - 'elevator', 'atm ', ' atm', 'conference', 'room ', ' room', - 'reception', 'director', 'academic', 'admin', 'lecture', 'institute' + 'emergency', + 'restroom', + 'parking', + 'call box', + 'office', + 'elevator', + 'atm ', + ' atm', + 'conference', + 'room ', + ' room', + 'reception', + 'director', + 'academic', + 'admin', + 'lecture', + 'institute', ]; for (final term in excluded) { if (textLower.contains(term)) return false; @@ -952,7 +982,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } return true; }).toList(); - + await _waitForMinimumSearchLoadingTime(loadingStopwatch); final isStale = !mounted || requestId != _searchRequestId; if (isStale) return; @@ -983,9 +1013,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); if (allResults.isEmpty) { - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); } } catch (e) { debugPrint('Category search error: $e'); @@ -997,9 +1026,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _allCategoryResults = []; _isSearching = false; }); - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); } } @@ -1224,9 +1252,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _loadingPoint = null; }); if (buildingResult != null) { - if (_allCategoryResults.isNotEmpty) { - _clearSearch(); - } + if (_allCategoryResults.isNotEmpty) _clearSearch(); _plotResultsOnMap([buildingResult]); if (_graphicsOverlay.graphics.isNotEmpty) _handlePinTap(buildingResult, _graphicsOverlay.graphics.last); return; @@ -1403,9 +1429,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final gps = await _getDeviceLocationEfficiently(); if (gps == null) { if (mounted) { - ScaffoldMessenger.of( - context, - ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + ScaffoldMessenger.of(context) + .showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } From 0dc2f1f234b1210549c53b6d474a64ee31ad4ee7 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Tue, 18 Aug 2026 20:47:05 -0700 Subject: [PATCH 103/139] fixed violations --- .../esrimap_search_service.dart | 30 ++++++++++++------- lib/ui/esrimap/esrimap.dart | 18 +++++++---- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/lib/core/services/esri_map_services/esrimap_search_service.dart b/lib/core/services/esri_map_services/esrimap_search_service.dart index 8eac70d3e..8c9ec9f4b 100644 --- a/lib/core/services/esri_map_services/esrimap_search_service.dart +++ b/lib/core/services/esri_map_services/esrimap_search_service.dart @@ -22,7 +22,7 @@ class EsriMapSearchService { static const String RECENT_SEARCHES_KEY = 'esri_map_recent_searches'; /// SharedPreferences key used to persist cached building footprints. - static const String _cachedBuildingsKey = 'esrimap_cached_buildings'; + static const String _CACHED_BUILDINGS_KEY = 'esrimap_cached_buildings'; static List _searches = []; static List _cachedBuildings = []; @@ -121,7 +121,7 @@ class EsriMapSearchService { /// Loads cached building footprints from SharedPreferences. static Future loadCachedBuildings() async { final prefs = await SharedPreferences.getInstance(); - final jsonStr = prefs.getString(_cachedBuildingsKey); + final jsonStr = prefs.getString(_CACHED_BUILDINGS_KEY); if (jsonStr != null) { try { final list = jsonDecode(jsonStr) as List; @@ -169,7 +169,7 @@ class EsriMapSearchService { static Future _saveCachedBuildings() async { final prefs = await SharedPreferences.getInstance(); final jsonList = _cachedBuildings.map((c) => c.toJson()).toList(); - await prefs.setString(_cachedBuildingsKey, jsonEncode(jsonList)); + await prefs.setString(_CACHED_BUILDINGS_KEY, jsonEncode(jsonList)); } /// Identifies a building by performing a spatial intersection query at the given WGS84 coordinate. @@ -181,7 +181,8 @@ class EsriMapSearchService { for (int i = 0; i < _cachedBuildings.length; i++) { final cached = _cachedBuildings[i]; if (cached.footprint != null) { - if (GeometryEngine.intersects(geometry1: point, geometry2: cached.footprint as Geometry)) { + final intersects = GeometryEngine.intersects(geometry1: point, geometry2: cached.footprint as Geometry); + if (intersects) { // Check if cache is older than 30 days (30L * 24 * 60 * 60 * 1000) final isExpired = cached.fetchedAt == null || (now - cached.fetchedAt!) > 2592000000; if (!isExpired) { @@ -218,7 +219,8 @@ class EsriMapSearchService { if (response.statusCode == 200) { final data = jsonDecode(response.body); final features = data['features'] as List?; - if (features != null && features.isNotEmpty) { + final hasFeatures = features != null && features.isNotEmpty; + if (hasFeatures) { final attr = features.first['attributes'] as Map; final longName = attr['GIS.facTririgaBuildingInfo.FacilityLongName'] as String?; @@ -234,9 +236,11 @@ class EsriMapSearchService { final geom = features.first['geometry'] as Map?; if (geom != null) { final rings = geom['rings'] as List?; - if (rings != null && rings.isNotEmpty) { + final hasRings = rings != null && rings.isNotEmpty; + if (hasRings) { final firstRing = rings.first as List?; - if (firstRing != null && firstRing.isNotEmpty) { + final hasFirstRing = firstRing != null && firstRing.isNotEmpty; + if (hasFirstRing) { double minX = double.infinity, maxX = double.negativeInfinity; double minY = double.infinity, maxY = double.negativeInfinity; for (final point in firstRing) { @@ -293,17 +297,21 @@ class EsriMapSearchService { if (fallbackRes.statusCode == 200) { final fallbackData = jsonDecode(fallbackRes.body); final fallbackFeatures = fallbackData['features'] as List?; - if (fallbackFeatures != null && fallbackFeatures.isNotEmpty) { + final hasFallbackFeatures = fallbackFeatures != null && fallbackFeatures.isNotEmpty; + if (hasFallbackFeatures) { final fbAttr = fallbackFeatures.first['attributes'] as Map; final fbLong = fbAttr['GIS.facTririgaBuildingInfo.FacilityLongName'] as String?; final fbShort = fbAttr['GIS.facTririgaBuildingInfo.FacilityShortName'] as String?; - if (fbLong != null && fbLong.isNotEmpty) { + final hasFbLong = fbLong != null && fbLong.isNotEmpty; + final hasFbShort = fbShort != null && fbShort.isNotEmpty; + if (hasFbLong) { name = fbLong; - } else if (fbShort != null && fbShort.isNotEmpty) { + } else if (hasFbShort) { name = fbShort; } final fbAddr = fbAttr['GIS.facTririgaBuildingInfo.StreetAddress'] as String?; - if (fbAddr != null && fbAddr.isNotEmpty) address = fbAddr; + final hasFbAddr = fbAddr != null && fbAddr.isNotEmpty; + if (hasFbAddr) address = fbAddr; } } } catch (_) {} diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 92e5deb7d..e04be8d16 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -247,7 +247,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.locationDisplay.onLocationChanged.listen((event) { final pos = event.position; final wgs = GeometryEngine.project(pos, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; - if (wgs != null && !wgs.x.isNaN && !wgs.y.isNaN) _saveLocationToHive(wgs.y, wgs.x); + final isValidWgs = wgs != null && !wgs.x.isNaN && !wgs.y.isNaN; + if (isValidWgs) _saveLocationToHive(wgs.y, wgs.x); }); _preloadAlternateBasemaps(); @@ -366,7 +367,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { await _locationDataSource.start().timeout(const Duration(seconds: 5)); } catch (e) { debugPrint('Location DataSource Start Error: $e'); - if (e is TimeoutException || e.toString().toLowerCase().contains('fail')) { + final isTimeoutOrFail = e is TimeoutException || e.toString().toLowerCase().contains('fail'); + if (isTimeoutOrFail) { _locationDataSource = SystemLocationDataSource(); _mapViewController.locationDisplay.dataSource = _locationDataSource; _locationDataSource.start().catchError((_) {}); @@ -853,7 +855,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); - if (merged.isEmpty && query.isNotEmpty) + final isSearchEmpty = merged.isEmpty && query.isNotEmpty; + if (isSearchEmpty) ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('No locations found.'))); } } @@ -1244,7 +1247,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (mapPoint != null) { final wgs84Point = GeometryEngine.project(mapPoint, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; - if (wgs84Point != null && !wgs84Point.x.isNaN && !wgs84Point.y.isNaN) { + final isValidPoint = wgs84Point != null && !wgs84Point.x.isNaN && !wgs84Point.y.isNaN; + if (isValidPoint) { final buildingResult = await EsriMapSearchService.identifyBuildingAtCoordinate(wgs84Point.y, wgs84Point.x); isRequestFinished = true; if (mounted) @@ -1254,7 +1258,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (buildingResult != null) { if (_allCategoryResults.isNotEmpty) _clearSearch(); _plotResultsOnMap([buildingResult]); - if (_graphicsOverlay.graphics.isNotEmpty) _handlePinTap(buildingResult, _graphicsOverlay.graphics.last); + final hasGraphics = _graphicsOverlay.graphics.isNotEmpty; + if (hasGraphics) _handlePinTap(buildingResult, _graphicsOverlay.graphics.last); return; } else { _dismissCallout(); @@ -1773,7 +1778,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final wgs = GeometryEngine.project(pos, outputSpatialReference: SpatialReference.wgs84) as ArcGISPoint?; final isWgsNull = wgs == null; if (isWgsNull) return null; - if (wgs.x.isNaN || wgs.y.isNaN) return null; + final isWgsNaN = wgs.x.isNaN || wgs.y.isNaN; + if (isWgsNaN) return null; return (wgs.y, wgs.x); } From 7a7e342574b88154b3b8d6a99b50b601afc6a995 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 19 Aug 2026 16:18:21 -0700 Subject: [PATCH 104/139] Added useful data to map pins --- .../esrimap_callout_content.dart | 323 ++++++++++++++++++ lib/ui/esrimap/esrimap.dart | 58 ++-- 2 files changed, 343 insertions(+), 38 deletions(-) create mode 100644 lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart new file mode 100644 index 000000000..2f592a993 --- /dev/null +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart @@ -0,0 +1,323 @@ +import 'package:campus_mobile_experimental/core/models/availability.dart'; +import 'package:campus_mobile_experimental/core/models/dining.dart'; +import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; +import 'package:campus_mobile_experimental/core/models/parking.dart'; +import 'package:flutter/material.dart'; + +class EsriMapCalloutContent extends StatelessWidget { + final MapSearchResult result; + final String detail; + final bool isDark; + + final List diningModels; + final List parkingModels; + final List availabilityModels; + + const EsriMapCalloutContent({ + Key? key, + required this.result, + required this.detail, + required this.isDark, + required this.diningModels, + required this.parkingModels, + required this.availabilityModels, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + + final String queryName = result.name.toLowerCase().trim(); + + // 1. Try to match Dining + final diningMatch = _findDiningMatch(queryName, diningModels); + if (diningMatch != null) { + return _buildCalloutContainer( + context, + child: _buildDiningContent(context, diningMatch), + ); + } + + // 2. Try to match Parking + final parkingMatch = _findParkingMatch(queryName, parkingModels); + if (parkingMatch != null) { + return _buildCalloutContainer( + context, + child: _buildParkingContent(context, parkingMatch), + ); + } + + // 3. Try to match Availability + final availabilityMatch = _findAvailabilityMatch(queryName, availabilityModels); + if (availabilityMatch != null) { + return _buildCalloutContainer( + context, + child: _buildAvailabilityContent(context, availabilityMatch), + ); + } + + // 4. Fallback to generic subtitle if no contextual data is found + return _buildCalloutContainer( + context, + child: _buildFallbackContent(context), + ); + } + + // --- Matching Logic --- + + DiningModel? _findDiningMatch(String query, List models) { + if (query.isEmpty) return null; + for (var model in models) { + final name = model.name.toLowerCase().trim(); + if (name == query || query.contains(name) || name.contains(query)) { + return model; + } + } + return null; + } + + ParkingModel? _findParkingMatch(String query, List models) { + if (query.isEmpty) return null; + for (var model in models) { + final locName = model.locationName.toLowerCase().trim(); + // Use bidirectional containment to catch cases where the map says "Gilman Parking Structure" but the model says "Gilman" + if (locName == query || query.contains(locName) || locName.contains(query)) { + return model; + } + } + return null; + } + + SubLocations? _findAvailabilityMatch(String query, List models) { + if (query.isEmpty) return null; + for (var model in models) { + if (model != null) { + for (var sub in model.subLocations) { + final subName = sub.name.toLowerCase().trim(); + if (subName == query || query.contains(subName) || subName.contains(query)) { + return sub; + } + } + } + } + return null; + } + + // --- UI Builders --- + + Widget _buildCalloutContainer(BuildContext context, {required Widget child}) { + // Exclude semantics here so we can provide a combined label if needed, + // or just let the children handle it. + return Semantics( + label: detail.isEmpty ? result.name : '${result.name}. $detail', + excludeSemantics: true, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + result.name, + maxLines: 2, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center, + style: TextStyle( + color: isDark ? Colors.white : Colors.black87, + fontSize: 15, + fontWeight: FontWeight.w600, + height: 1.15, + ), + ), + const SizedBox(height: 4), + child, + ], + ), + ); + } + + Widget _buildFallbackContent(BuildContext context) { + if (detail.isEmpty) return const SizedBox.shrink(); + return Text( + detail, + maxLines: 1, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center, + style: TextStyle( + color: isDark ? Colors.white70 : Colors.black54, + fontSize: 12, + height: 1.15, + ), + ); + } + + // --- Dining Content --- + + Widget _buildDiningContent(BuildContext context, DiningModel dining) { + try { + final isOpen = _isDiningOpen(dining.regularHours); + final statusColor = isOpen ? Colors.green : Colors.red; + final statusText = isOpen ? "Open" : "Closed"; + + return Row( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + width: 8, + height: 8, + decoration: BoxDecoration( + color: statusColor, + shape: BoxShape.circle, + ), + ), + const SizedBox(width: 4), + Text( + statusText, + style: TextStyle( + color: isDark ? Colors.white70 : Colors.black87, + fontSize: 12, + fontWeight: FontWeight.w500, + ), + ), + if (dining.distance != null) ...[ + const SizedBox(width: 6), + Container( + width: 4, + height: 4, + decoration: BoxDecoration( + color: isDark ? Colors.white30 : Colors.black26, + shape: BoxShape.circle, + ), + ), + const SizedBox(width: 6), + Text( + "${dining.distance!.toStringAsFixed(1)} mi", + style: TextStyle( + color: isDark ? Colors.white70 : Colors.black54, + fontSize: 12, + ), + ), + ], + ], + ); + } catch (e) { + return _buildFallbackContent(context); + } + } + + bool _isDiningOpen(RegularHours hours) { + int weekday = DateTime.now().weekday; + String? dayHours; + switch (weekday) { + case 1: dayHours = hours.mon; break; + case 2: dayHours = hours.tue; break; + case 3: dayHours = hours.wed; break; + case 4: dayHours = hours.thu; break; + case 5: dayHours = hours.fri; break; + case 6: dayHours = hours.sat; break; + case 7: dayHours = hours.sun; break; + } + + if (dayHours == null || dayHours == 'Closed-Closed' || dayHours == 'Invalid Date-Invalid Date') { + return false; + } + + return true; + } + + // --- Parking Content --- + + Widget _buildParkingContent(BuildContext context, ParkingModel parking) { + try { + int totalOpen = 0; + int totalCapacity = 0; + + for (var spotData in parking.availability.values) { + if (spotData == null || spotData is! Map) continue; + + int open = spotData["Open"] is String + ? (int.tryParse(spotData["Open"]) ?? 0) + : (spotData["Open"] ?? 0); + + int total = spotData["Total"] is String + ? (int.tryParse(spotData["Total"]) ?? 0) + : (spotData["Total"] ?? 0); + + totalOpen += open; + totalCapacity += total; + } + + if (totalCapacity == 0) { + return Text( + "No space data", + style: TextStyle(color: isDark ? Colors.white70 : Colors.black54, fontSize: 12), + ); + } + + double percent = totalOpen / totalCapacity; + if (percent.isNaN) percent = 0.0; + + Color progressColor = Colors.green; + if (percent < 0.25) progressColor = Colors.red; + else if (percent < 0.75) progressColor = Colors.orange; + + return Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "$totalOpen / $totalCapacity Spaces", + style: TextStyle(color: isDark ? Colors.white70 : Colors.black87, fontSize: 12), + ), + const SizedBox(height: 4), + SizedBox( + width: 100, + child: ClipRRect( + borderRadius: BorderRadius.circular(4), + child: LinearProgressIndicator( + value: percent, + backgroundColor: isDark ? Colors.white24 : Colors.black12, + valueColor: AlwaysStoppedAnimation(progressColor), + ), + ), + ), + ], + ); + } catch (e) { + return _buildFallbackContent(context); + } + } + + // --- Availability Content --- + + Widget _buildAvailabilityContent(BuildContext context, SubLocations subLocation) { + try { + double percent = subLocation.percentage; + + Color progressColor = Color(0xFF109B00); // Green + if (percent >= 0.75) progressColor = Color(0xFFBD1900); // Red + else if (percent >= 0.25) progressColor = Color(0xFFFC8900); // Orange + + return Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "${(percent * 100).toInt()}% Busy", + style: TextStyle(color: isDark ? Colors.white70 : Colors.black87, fontSize: 12), + ), + const SizedBox(height: 4), + SizedBox( + width: 100, + child: ClipRRect( + borderRadius: BorderRadius.circular(4), + child: LinearProgressIndicator( + value: percent <= 0.01 ? 0.01 : percent, + backgroundColor: isDark ? Colors.white24 : Colors.black12, + valueColor: AlwaysStoppedAnimation(progressColor), + ), + ), + ), + ], + ); + } catch (e) { + return _buildFallbackContent(context); + } + } +} diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index e04be8d16..27fa522cd 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -29,7 +29,12 @@ import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_s import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_scene.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart'; +import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; +import 'package:campus_mobile_experimental/core/providers/dining.dart'; +import 'package:campus_mobile_experimental/core/providers/parking.dart'; +import 'package:campus_mobile_experimental/core/providers/availability.dart'; import 'package:geolocator/geolocator.dart'; import 'package:hive/hive.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -1284,6 +1289,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final detail = (isBuilding && result.address.isNotEmpty) ? result.address : result.subtitle; final isDark = Theme.of(context).brightness == Brightness.dark; + final diningProvider = Provider.of(context, listen: false); + final parkingProvider = Provider.of(context, listen: false); + final availabilityProvider = Provider.of(context, listen: false); + _graphicsOverlay.clearSelection(); graphic.isSelected = true; _mapViewController.callout.showCalloutForGeoElement( @@ -1296,39 +1305,16 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { borderWidth: 0.5, contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 9), minWidth: 96, - maxWidth: 220, + // Removed maxWidth to allow the callout to size dynamically based on contextual data without clipping offset: const Offset(0, -10), ), - contentBuilder: (_, __) => Semantics( - label: detail.isEmpty ? result.name : '${result.name}. $detail', - excludeSemantics: true, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - result.name, - maxLines: 2, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.center, - style: TextStyle( - color: isDark ? Colors.white : Colors.black87, - fontSize: 15, - fontWeight: FontWeight.w600, - height: 1.15, - ), - ), - if (detail.isNotEmpty) ...[ - const SizedBox(height: 3), - Text( - detail, - maxLines: 1, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.center, - style: TextStyle(color: isDark ? Colors.white70 : Colors.black54, fontSize: 12, height: 1.15), - ), - ], - ], - ), + contentBuilder: (_, __) => EsriMapCalloutContent( + result: result, + detail: detail, + isDark: isDark, + diningModels: diningProvider.diningModels, + parkingModels: parkingProvider.parkingModels, + availabilityModels: availabilityProvider.availabilityModels, ), ); } @@ -1339,13 +1325,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return; } - if (_allCategoryResults.isEmpty) { - _showCalloutForGraphic(result, graphic); - } else { - // Ensure any existing callout is dismissed if we're in a list context - _dismissCallout(); - } - + // Always show the callout when a pin is tapped, even if multiple results exist + _showCalloutForGraphic(result, graphic); + _selectResultFromPin(result, updateSearchText: false); } From 217ffe4d93c96b6c54d20890d643b19cf8f4fd89 Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Wed, 19 Aug 2026 23:34:17 +0000 Subject: [PATCH 105/139] style: auto fix formatting violations --- .../esrimap_callout_content.dart | 129 +++++++----------- lib/ui/esrimap/esrimap.dart | 2 +- 2 files changed, 54 insertions(+), 77 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart index 2f592a993..330dcd411 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart @@ -25,41 +25,28 @@ class EsriMapCalloutContent extends StatelessWidget { @override Widget build(BuildContext context) { - final String queryName = result.name.toLowerCase().trim(); // 1. Try to match Dining final diningMatch = _findDiningMatch(queryName, diningModels); if (diningMatch != null) { - return _buildCalloutContainer( - context, - child: _buildDiningContent(context, diningMatch), - ); + return _buildCalloutContainer(context, child: _buildDiningContent(context, diningMatch)); } // 2. Try to match Parking final parkingMatch = _findParkingMatch(queryName, parkingModels); if (parkingMatch != null) { - return _buildCalloutContainer( - context, - child: _buildParkingContent(context, parkingMatch), - ); + return _buildCalloutContainer(context, child: _buildParkingContent(context, parkingMatch)); } // 3. Try to match Availability final availabilityMatch = _findAvailabilityMatch(queryName, availabilityModels); if (availabilityMatch != null) { - return _buildCalloutContainer( - context, - child: _buildAvailabilityContent(context, availabilityMatch), - ); + return _buildCalloutContainer(context, child: _buildAvailabilityContent(context, availabilityMatch)); } // 4. Fallback to generic subtitle if no contextual data is found - return _buildCalloutContainer( - context, - child: _buildFallbackContent(context), - ); + return _buildCalloutContainer(context, child: _buildFallbackContent(context)); } // --- Matching Logic --- @@ -68,9 +55,7 @@ class EsriMapCalloutContent extends StatelessWidget { if (query.isEmpty) return null; for (var model in models) { final name = model.name.toLowerCase().trim(); - if (name == query || query.contains(name) || name.contains(query)) { - return model; - } + if (name == query || query.contains(name) || name.contains(query)) return model; } return null; } @@ -80,9 +65,7 @@ class EsriMapCalloutContent extends StatelessWidget { for (var model in models) { final locName = model.locationName.toLowerCase().trim(); // Use bidirectional containment to catch cases where the map says "Gilman Parking Structure" but the model says "Gilman" - if (locName == query || query.contains(locName) || locName.contains(query)) { - return model; - } + if (locName == query || query.contains(locName) || locName.contains(query)) return model; } return null; } @@ -93,9 +76,7 @@ class EsriMapCalloutContent extends StatelessWidget { if (model != null) { for (var sub in model.subLocations) { final subName = sub.name.toLowerCase().trim(); - if (subName == query || query.contains(subName) || subName.contains(query)) { - return sub; - } + if (subName == query || query.contains(subName) || subName.contains(query)) return sub; } } } @@ -105,7 +86,7 @@ class EsriMapCalloutContent extends StatelessWidget { // --- UI Builders --- Widget _buildCalloutContainer(BuildContext context, {required Widget child}) { - // Exclude semantics here so we can provide a combined label if needed, + // Exclude semantics here so we can provide a combined label if needed, // or just let the children handle it. return Semantics( label: detail.isEmpty ? result.name : '${result.name}. $detail', @@ -139,11 +120,7 @@ class EsriMapCalloutContent extends StatelessWidget { maxLines: 1, overflow: TextOverflow.ellipsis, textAlign: TextAlign.center, - style: TextStyle( - color: isDark ? Colors.white70 : Colors.black54, - fontSize: 12, - height: 1.15, - ), + style: TextStyle(color: isDark ? Colors.white70 : Colors.black54, fontSize: 12, height: 1.15), ); } @@ -154,17 +131,14 @@ class EsriMapCalloutContent extends StatelessWidget { final isOpen = _isDiningOpen(dining.regularHours); final statusColor = isOpen ? Colors.green : Colors.red; final statusText = isOpen ? "Open" : "Closed"; - + return Row( mainAxisSize: MainAxisSize.min, children: [ Container( width: 8, height: 8, - decoration: BoxDecoration( - color: statusColor, - shape: BoxShape.circle, - ), + decoration: BoxDecoration(color: statusColor, shape: BoxShape.circle), ), const SizedBox(width: 4), Text( @@ -180,18 +154,12 @@ class EsriMapCalloutContent extends StatelessWidget { Container( width: 4, height: 4, - decoration: BoxDecoration( - color: isDark ? Colors.white30 : Colors.black26, - shape: BoxShape.circle, - ), + decoration: BoxDecoration(color: isDark ? Colors.white30 : Colors.black26, shape: BoxShape.circle), ), const SizedBox(width: 6), Text( "${dining.distance!.toStringAsFixed(1)} mi", - style: TextStyle( - color: isDark ? Colors.white70 : Colors.black54, - fontSize: 12, - ), + style: TextStyle(color: isDark ? Colors.white70 : Colors.black54, fontSize: 12), ), ], ], @@ -205,20 +173,32 @@ class EsriMapCalloutContent extends StatelessWidget { int weekday = DateTime.now().weekday; String? dayHours; switch (weekday) { - case 1: dayHours = hours.mon; break; - case 2: dayHours = hours.tue; break; - case 3: dayHours = hours.wed; break; - case 4: dayHours = hours.thu; break; - case 5: dayHours = hours.fri; break; - case 6: dayHours = hours.sat; break; - case 7: dayHours = hours.sun; break; - } - - if (dayHours == null || dayHours == 'Closed-Closed' || dayHours == 'Invalid Date-Invalid Date') { - return false; + case 1: + dayHours = hours.mon; + break; + case 2: + dayHours = hours.tue; + break; + case 3: + dayHours = hours.wed; + break; + case 4: + dayHours = hours.thu; + break; + case 5: + dayHours = hours.fri; + break; + case 6: + dayHours = hours.sat; + break; + case 7: + dayHours = hours.sun; + break; } - - return true; + + if (dayHours == null || dayHours == 'Closed-Closed' || dayHours == 'Invalid Date-Invalid Date') return false; + + return true; } // --- Parking Content --- @@ -230,32 +210,27 @@ class EsriMapCalloutContent extends StatelessWidget { for (var spotData in parking.availability.values) { if (spotData == null || spotData is! Map) continue; - - int open = spotData["Open"] is String - ? (int.tryParse(spotData["Open"]) ?? 0) - : (spotData["Open"] ?? 0); - - int total = spotData["Total"] is String - ? (int.tryParse(spotData["Total"]) ?? 0) - : (spotData["Total"] ?? 0); - + + int open = spotData["Open"] is String ? (int.tryParse(spotData["Open"]) ?? 0) : (spotData["Open"] ?? 0); + + int total = spotData["Total"] is String ? (int.tryParse(spotData["Total"]) ?? 0) : (spotData["Total"] ?? 0); + totalOpen += open; totalCapacity += total; } if (totalCapacity == 0) { - return Text( - "No space data", - style: TextStyle(color: isDark ? Colors.white70 : Colors.black54, fontSize: 12), - ); + return Text("No space data", style: TextStyle(color: isDark ? Colors.white70 : Colors.black54, fontSize: 12)); } double percent = totalOpen / totalCapacity; if (percent.isNaN) percent = 0.0; Color progressColor = Colors.green; - if (percent < 0.25) progressColor = Colors.red; - else if (percent < 0.75) progressColor = Colors.orange; + if (percent < 0.25) + progressColor = Colors.red; + else if (percent < 0.75) + progressColor = Colors.orange; return Column( mainAxisSize: MainAxisSize.min, @@ -289,10 +264,12 @@ class EsriMapCalloutContent extends StatelessWidget { Widget _buildAvailabilityContent(BuildContext context, SubLocations subLocation) { try { double percent = subLocation.percentage; - + Color progressColor = Color(0xFF109B00); // Green - if (percent >= 0.75) progressColor = Color(0xFFBD1900); // Red - else if (percent >= 0.25) progressColor = Color(0xFFFC8900); // Orange + if (percent >= 0.75) + progressColor = Color(0xFFBD1900); // Red + else if (percent >= 0.25) + progressColor = Color(0xFFFC8900); // Orange return Column( mainAxisSize: MainAxisSize.min, diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 27fa522cd..a62d6a755 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1327,7 +1327,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Always show the callout when a pin is tapped, even if multiple results exist _showCalloutForGraphic(result, graphic); - + _selectResultFromPin(result, updateSearchText: false); } From 00616f801bee9436f035bb6b687668a2c205917c Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Wed, 19 Aug 2026 23:36:13 +0000 Subject: [PATCH 106/139] style: auto fix formatting violations --- .../esri_map_widgets/esrimap_callout_content.dart | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart index 330dcd411..518b2027e 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart @@ -29,21 +29,17 @@ class EsriMapCalloutContent extends StatelessWidget { // 1. Try to match Dining final diningMatch = _findDiningMatch(queryName, diningModels); - if (diningMatch != null) { - return _buildCalloutContainer(context, child: _buildDiningContent(context, diningMatch)); - } + if (diningMatch != null) return _buildCalloutContainer(context, child: _buildDiningContent(context, diningMatch)); // 2. Try to match Parking final parkingMatch = _findParkingMatch(queryName, parkingModels); - if (parkingMatch != null) { + if (parkingMatch != null) return _buildCalloutContainer(context, child: _buildParkingContent(context, parkingMatch)); - } // 3. Try to match Availability final availabilityMatch = _findAvailabilityMatch(queryName, availabilityModels); - if (availabilityMatch != null) { + if (availabilityMatch != null) return _buildCalloutContainer(context, child: _buildAvailabilityContent(context, availabilityMatch)); - } // 4. Fallback to generic subtitle if no contextual data is found return _buildCalloutContainer(context, child: _buildFallbackContent(context)); @@ -219,9 +215,8 @@ class EsriMapCalloutContent extends StatelessWidget { totalCapacity += total; } - if (totalCapacity == 0) { + if (totalCapacity == 0) return Text("No space data", style: TextStyle(color: isDark ? Colors.white70 : Colors.black54, fontSize: 12)); - } double percent = totalOpen / totalCapacity; if (percent.isNaN) percent = 0.0; From e32567c8dcce54c3118c33dfca6e757cae29021b Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 19 Aug 2026 16:37:13 -0700 Subject: [PATCH 107/139] fixed violations --- .../esrimap_callout_content.dart | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart index 330dcd411..43e413f79 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart @@ -55,7 +55,10 @@ class EsriMapCalloutContent extends StatelessWidget { if (query.isEmpty) return null; for (var model in models) { final name = model.name.toLowerCase().trim(); - if (name == query || query.contains(name) || name.contains(query)) return model; + final isExactMatch = name == query; + final queryContainsName = query.contains(name); + final nameContainsQuery = name.contains(query); + if (isExactMatch || queryContainsName || nameContainsQuery) return model; } return null; } @@ -65,7 +68,10 @@ class EsriMapCalloutContent extends StatelessWidget { for (var model in models) { final locName = model.locationName.toLowerCase().trim(); // Use bidirectional containment to catch cases where the map says "Gilman Parking Structure" but the model says "Gilman" - if (locName == query || query.contains(locName) || locName.contains(query)) return model; + final isExactMatch = locName == query; + final queryContainsLocName = query.contains(locName); + final locNameContainsQuery = locName.contains(query); + if (isExactMatch || queryContainsLocName || locNameContainsQuery) return model; } return null; } @@ -76,7 +82,10 @@ class EsriMapCalloutContent extends StatelessWidget { if (model != null) { for (var sub in model.subLocations) { final subName = sub.name.toLowerCase().trim(); - if (subName == query || query.contains(subName) || subName.contains(query)) return sub; + final isExactMatch = subName == query; + final queryContainsSubName = query.contains(subName); + final subNameContainsQuery = subName.contains(query); + if (isExactMatch || queryContainsSubName || subNameContainsQuery) return sub; } } } @@ -196,7 +205,10 @@ class EsriMapCalloutContent extends StatelessWidget { break; } - if (dayHours == null || dayHours == 'Closed-Closed' || dayHours == 'Invalid Date-Invalid Date') return false; + final isNull = dayHours == null; + final isClosed = dayHours == 'Closed-Closed'; + final isInvalid = dayHours == 'Invalid Date-Invalid Date'; + if (isNull || isClosed || isInvalid) return false; return true; } From 1686c580d0326a06611a58701322e9ed94bff561 Mon Sep 17 00:00:00 2001 From: Albert Hoang Date: Thu, 20 Aug 2026 10:34:44 +0700 Subject: [PATCH 108/139] color contrast issues --- lib/app_styles.dart | 4 ++-- lib/core/providers/classes.dart | 8 +++----- lib/core/providers/notifications.dart | 10 ++++++---- lib/main.dart | 12 +++++++----- lib/ui/classes/classes_list.dart | 5 +++-- lib/ui/esrimap/esrimap.dart | 15 +++++++++------ lib/ui/navigator/top.dart | 5 +++-- lib/ui/news/news_list.dart | 7 +++++-- lib/ui/notifications/notifications_list_view.dart | 10 ++++++---- lib/ui/parking/circular_parking_indicator.dart | 12 ++++++------ lib/ui/parking/spot_types_view.dart | 6 +++--- 11 files changed, 53 insertions(+), 41 deletions(-) diff --git a/lib/app_styles.dart b/lib/app_styles.dart index 5abe3fcbc..26e35b1ea 100644 --- a/lib/app_styles.dart +++ b/lib/app_styles.dart @@ -304,7 +304,7 @@ const IconThemeData darkIconTheme = IconThemeData(color: darkPrimaryColor2); // Unselected / inactive colors const Color unselectedIconLightColor = Color(0xFF6A6B6D); -const Color unselectedIconDarkColor = Color(0xFF6A6B6D); +const Color unselectedIconDarkColor = Color(0xFF909193); const noArrivalsFoundColor = "#747678"; // Colors for text on buttons using light theme @@ -351,7 +351,7 @@ const Color c3 = Color.fromARGB(255, 0, 0, 255); // List Tile Theme Data const lightListTileTheme = ListTileThemeData(selectedColor: const Color(0xFF00629B)); -const darkListTileTheme = ListTileThemeData(selectedColor: const Color(0xFF00C6D7)); +const darkListTileTheme = ListTileThemeData(selectedColor: secondaryColorDark); // New Onboarding Screen Colors const lightOnboardingScreen = Color.fromARGB(255, 245, 240, 228); diff --git a/lib/core/providers/classes.dart b/lib/core/providers/classes.dart index c34facb66..3399cc820 100644 --- a/lib/core/providers/classes.dart +++ b/lib/core/providers/classes.dart @@ -216,11 +216,9 @@ class ClassScheduleDataProvider extends ChangeNotifier { /// if no classes are scheduled for today then find the next day with classes var daysToAdd = 1; while (_enrolledClasses[today]!.isEmpty && daysToAdd <= 7) { - today = DateFormat('EEEE') - .format(DateTime.now().add(Duration(days: daysToAdd))) - .toString() - .toUpperCase() - .substring(0, 2); + today = DateFormat( + 'EEEE', + ).format(DateTime.now().add(Duration(days: daysToAdd))).toString().toUpperCase().substring(0, 2); nextDayWithClass = DateFormat('EEEE').format(DateTime.now().add(Duration(days: daysToAdd))); daysToAdd += 1; } diff --git a/lib/core/providers/notifications.dart b/lib/core/providers/notifications.dart index c0bb85eea..e5a42fec2 100644 --- a/lib/core/providers/notifications.dart +++ b/lib/core/providers/notifications.dart @@ -144,8 +144,9 @@ class PushNotificationDataProvider extends ChangeNotifier { NavigatorConstants.NOTIFICATIONS_TAB; /// Navigate to Notifications tab - Navigator.of(context) - .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of( + context, + ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); }); } on PlatformException { _error = 'Failed to get platform info.'; @@ -159,8 +160,9 @@ class PushNotificationDataProvider extends ChangeNotifier { Provider.of(this.context, listen: false).fetchMessages(true); /// Navigate to Notifications tab - Navigator.of(this.context) - .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of( + this.context, + ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); /// Set tab bar index to the Notifications tab Provider.of(this.context, listen: false).currentIndex = diff --git a/lib/main.dart b/lib/main.dart index 5621483f8..c3394b05c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -117,8 +117,9 @@ class CampusMobile extends StatelessWidget { iconTheme: lightIconTheme, appBarTheme: lightAppBarTheme, listTileTheme: lightListTileTheme, - colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) - .copyWith(surface: lightButtonColor, brightness: Brightness.light), + colorScheme: ColorScheme.fromSwatch( + primarySwatch: ColorPrimary, + ).copyWith(surface: lightButtonColor, brightness: Brightness.light), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconLightColor, selectedItemColor: Colors.white, @@ -144,11 +145,12 @@ class CampusMobile extends StatelessWidget { appBarTheme: darkAppBarTheme, unselectedWidgetColor: darkAccentColor, listTileTheme: darkListTileTheme, - colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) - .copyWith(surface: darkButtonColor, brightness: Brightness.dark), + colorScheme: ColorScheme.fromSwatch( + primarySwatch: ColorPrimary, + ).copyWith(surface: darkButtonColor, brightness: Brightness.dark), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconDarkColor, - selectedItemColor: Colors.white, + selectedItemColor: bottomTabBarColorDark, backgroundColor: bottomTabBarColorDark, ), snackBarTheme: const SnackBarThemeData( diff --git a/lib/ui/classes/classes_list.dart b/lib/ui/classes/classes_list.dart index c2f997023..37a4ba82c 100644 --- a/lib/ui/classes/classes_list.dart +++ b/lib/ui/classes/classes_list.dart @@ -13,8 +13,9 @@ class ClassList extends StatelessWidget { Widget buildSchedule(BuildContext context) { List list = []; - Provider.of(context).enrolledClasses - .addAll(Provider.of(context).midterms); + Provider.of( + context, + ).enrolledClasses.addAll(Provider.of(context).midterms); Provider.of(context).enrolledClasses.keys.forEach((key) { final bool hasClasses = Provider.of(context).enrolledClasses[key]!.isNotEmpty; if (hasClasses) { diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index a62d6a755..f877b45a8 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1021,8 +1021,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); if (allResults.isEmpty) { - ScaffoldMessenger.of(context) - .showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); } } catch (e) { debugPrint('Category search error: $e'); @@ -1034,8 +1035,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _allCategoryResults = []; _isSearching = false; }); - ScaffoldMessenger.of(context) - .showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); } } @@ -1416,8 +1418,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final gps = await _getDeviceLocationEfficiently(); if (gps == null) { if (mounted) { - ScaffoldMessenger.of(context) - .showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + ScaffoldMessenger.of( + context, + ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } diff --git a/lib/ui/navigator/top.dart b/lib/ui/navigator/top.dart index 180d4f1fb..f4792bbf7 100644 --- a/lib/ui/navigator/top.dart +++ b/lib/ui/navigator/top.dart @@ -27,8 +27,9 @@ class CMAppBar extends StatelessWidget { Provider.of(context, listen: false).currentIndex = NavigatorConstants.HOME_TAB; // Navigate to Home tab - Navigator.of(context) - .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of( + context, + ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); // change the appBar title to the ucsd logo Provider.of(context, listen: false).changeTitle(CustomAppBar().appBar.title); }, diff --git a/lib/ui/news/news_list.dart b/lib/ui/news/news_list.dart index 3ab74c34a..a756b475c 100644 --- a/lib/ui/news/news_list.dart +++ b/lib/ui/news/news_list.dart @@ -106,8 +106,11 @@ class NewsList extends StatelessWidget { ), TextSpan( text: ' - ', - style: Theme.of(context).textTheme.headlineMedium! - .copyWith(height: 1.42, fontSize: 16.0, decoration: TextDecoration.none), + style: Theme.of(context).textTheme.headlineMedium!.copyWith( + height: 1.42, + fontSize: 16.0, + decoration: TextDecoration.none, + ), ), TextSpan( text: newsItem.title, diff --git a/lib/ui/notifications/notifications_list_view.dart b/lib/ui/notifications/notifications_list_view.dart index 4b96562b4..54e301058 100644 --- a/lib/ui/notifications/notifications_list_view.dart +++ b/lib/ui/notifications/notifications_list_view.dart @@ -183,8 +183,9 @@ class _NotificationsListViewState extends State { } }, options: LinkifyOptions(humanize: false), - style: Theme.of(context).textTheme.bodySmall - ?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), + style: Theme.of( + context, + ).textTheme.bodySmall?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), ), freefoodProvider.isFreeFood(data.messageId) ? FreeFoodNotification(messageId: data.messageId) : Container(), ], @@ -197,8 +198,9 @@ class _NotificationsListViewState extends State { padding: const EdgeInsets.only(top: 6.0), child: Text( _readTimestamp(data.timestamp), - style: Theme.of(context).textTheme.bodySmall - ?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), + style: Theme.of( + context, + ).textTheme.bodySmall?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), ), ), ], diff --git a/lib/ui/parking/circular_parking_indicator.dart b/lib/ui/parking/circular_parking_indicator.dart index 90deb068c..d3001d352 100644 --- a/lib/ui/parking/circular_parking_indicator.dart +++ b/lib/ui/parking/circular_parking_indicator.dart @@ -217,12 +217,12 @@ class CircularParkingIndicators extends StatelessWidget { } Widget buildSpotsAvailableText(BuildContext context) { - final openSpots = Provider.of(context) - .getApproxNumOfOpenSpots(model.locationName)["Open"] - .toString(); - final totalSpots = Provider.of(context) - .getApproxNumOfOpenSpots(model.locationName)["Total"] - .toString(); + final openSpots = Provider.of( + context, + ).getApproxNumOfOpenSpots(model.locationName)["Open"].toString(); + final totalSpots = Provider.of( + context, + ).getApproxNumOfOpenSpots(model.locationName)["Total"].toString(); final visualText = "~$openSpots of $totalSpots Spots Available"; final semanticText = "Approximately $openSpots of $totalSpots Spots Available"; diff --git a/lib/ui/parking/spot_types_view.dart b/lib/ui/parking/spot_types_view.dart index 0704a3d62..4e2c5bb0f 100644 --- a/lib/ui/parking/spot_types_view.dart +++ b/lib/ui/parking/spot_types_view.dart @@ -46,9 +46,9 @@ class _SpotTypesViewState extends State { ); List createList(BuildContext context) { - var selectedSpots = Provider.of(context).spotTypesState.values - .where((selected) => selected == true) - .length; + var selectedSpots = Provider.of( + context, + ).spotTypesState.values.where((selected) => selected == true).length; List list = []; From 47fbb3808a7efd0966ed480e9f82d9f301477892 Mon Sep 17 00:00:00 2001 From: alberthoangg <115964431+alberthoangg@users.noreply.github.com> Date: Thu, 20 Aug 2026 03:41:00 +0000 Subject: [PATCH 109/139] style: auto fix formatting violations --- lib/core/providers/classes.dart | 8 +++++--- lib/core/providers/notifications.dart | 10 ++++------ lib/main.dart | 10 ++++------ lib/ui/classes/classes_list.dart | 5 ++--- lib/ui/esrimap/esrimap.dart | 15 ++++++--------- lib/ui/navigator/top.dart | 5 ++--- lib/ui/news/news_list.dart | 7 ++----- lib/ui/notifications/notifications_list_view.dart | 10 ++++------ lib/ui/parking/circular_parking_indicator.dart | 12 ++++++------ lib/ui/parking/spot_types_view.dart | 6 +++--- 10 files changed, 38 insertions(+), 50 deletions(-) diff --git a/lib/core/providers/classes.dart b/lib/core/providers/classes.dart index 3399cc820..c34facb66 100644 --- a/lib/core/providers/classes.dart +++ b/lib/core/providers/classes.dart @@ -216,9 +216,11 @@ class ClassScheduleDataProvider extends ChangeNotifier { /// if no classes are scheduled for today then find the next day with classes var daysToAdd = 1; while (_enrolledClasses[today]!.isEmpty && daysToAdd <= 7) { - today = DateFormat( - 'EEEE', - ).format(DateTime.now().add(Duration(days: daysToAdd))).toString().toUpperCase().substring(0, 2); + today = DateFormat('EEEE') + .format(DateTime.now().add(Duration(days: daysToAdd))) + .toString() + .toUpperCase() + .substring(0, 2); nextDayWithClass = DateFormat('EEEE').format(DateTime.now().add(Duration(days: daysToAdd))); daysToAdd += 1; } diff --git a/lib/core/providers/notifications.dart b/lib/core/providers/notifications.dart index e5a42fec2..c0bb85eea 100644 --- a/lib/core/providers/notifications.dart +++ b/lib/core/providers/notifications.dart @@ -144,9 +144,8 @@ class PushNotificationDataProvider extends ChangeNotifier { NavigatorConstants.NOTIFICATIONS_TAB; /// Navigate to Notifications tab - Navigator.of( - context, - ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of(context) + .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); }); } on PlatformException { _error = 'Failed to get platform info.'; @@ -160,9 +159,8 @@ class PushNotificationDataProvider extends ChangeNotifier { Provider.of(this.context, listen: false).fetchMessages(true); /// Navigate to Notifications tab - Navigator.of( - this.context, - ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of(this.context) + .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); /// Set tab bar index to the Notifications tab Provider.of(this.context, listen: false).currentIndex = diff --git a/lib/main.dart b/lib/main.dart index c3394b05c..d79d732d8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -117,9 +117,8 @@ class CampusMobile extends StatelessWidget { iconTheme: lightIconTheme, appBarTheme: lightAppBarTheme, listTileTheme: lightListTileTheme, - colorScheme: ColorScheme.fromSwatch( - primarySwatch: ColorPrimary, - ).copyWith(surface: lightButtonColor, brightness: Brightness.light), + colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) + .copyWith(surface: lightButtonColor, brightness: Brightness.light), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconLightColor, selectedItemColor: Colors.white, @@ -145,9 +144,8 @@ class CampusMobile extends StatelessWidget { appBarTheme: darkAppBarTheme, unselectedWidgetColor: darkAccentColor, listTileTheme: darkListTileTheme, - colorScheme: ColorScheme.fromSwatch( - primarySwatch: ColorPrimary, - ).copyWith(surface: darkButtonColor, brightness: Brightness.dark), + colorScheme: ColorScheme.fromSwatch(primarySwatch: ColorPrimary) + .copyWith(surface: darkButtonColor, brightness: Brightness.dark), bottomNavigationBarTheme: BottomNavigationBarThemeData( unselectedItemColor: unselectedIconDarkColor, selectedItemColor: bottomTabBarColorDark, diff --git a/lib/ui/classes/classes_list.dart b/lib/ui/classes/classes_list.dart index 37a4ba82c..c2f997023 100644 --- a/lib/ui/classes/classes_list.dart +++ b/lib/ui/classes/classes_list.dart @@ -13,9 +13,8 @@ class ClassList extends StatelessWidget { Widget buildSchedule(BuildContext context) { List list = []; - Provider.of( - context, - ).enrolledClasses.addAll(Provider.of(context).midterms); + Provider.of(context).enrolledClasses + .addAll(Provider.of(context).midterms); Provider.of(context).enrolledClasses.keys.forEach((key) { final bool hasClasses = Provider.of(context).enrolledClasses[key]!.isNotEmpty; if (hasClasses) { diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index f877b45a8..a62d6a755 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1021,9 +1021,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); if (allResults.isEmpty) { - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); } } catch (e) { debugPrint('Category search error: $e'); @@ -1035,9 +1034,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _allCategoryResults = []; _isSearching = false; }); - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); } } @@ -1418,9 +1416,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final gps = await _getDeviceLocationEfficiently(); if (gps == null) { if (mounted) { - ScaffoldMessenger.of( - context, - ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + ScaffoldMessenger.of(context) + .showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } diff --git a/lib/ui/navigator/top.dart b/lib/ui/navigator/top.dart index f4792bbf7..180d4f1fb 100644 --- a/lib/ui/navigator/top.dart +++ b/lib/ui/navigator/top.dart @@ -27,9 +27,8 @@ class CMAppBar extends StatelessWidget { Provider.of(context, listen: false).currentIndex = NavigatorConstants.HOME_TAB; // Navigate to Home tab - Navigator.of( - context, - ).pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); + Navigator.of(context) + .pushNamedAndRemoveUntil(RoutePaths.BOTTOM_NAVIGATION_BAR, (Route route) => false); // change the appBar title to the ucsd logo Provider.of(context, listen: false).changeTitle(CustomAppBar().appBar.title); }, diff --git a/lib/ui/news/news_list.dart b/lib/ui/news/news_list.dart index a756b475c..3ab74c34a 100644 --- a/lib/ui/news/news_list.dart +++ b/lib/ui/news/news_list.dart @@ -106,11 +106,8 @@ class NewsList extends StatelessWidget { ), TextSpan( text: ' - ', - style: Theme.of(context).textTheme.headlineMedium!.copyWith( - height: 1.42, - fontSize: 16.0, - decoration: TextDecoration.none, - ), + style: Theme.of(context).textTheme.headlineMedium! + .copyWith(height: 1.42, fontSize: 16.0, decoration: TextDecoration.none), ), TextSpan( text: newsItem.title, diff --git a/lib/ui/notifications/notifications_list_view.dart b/lib/ui/notifications/notifications_list_view.dart index 54e301058..4b96562b4 100644 --- a/lib/ui/notifications/notifications_list_view.dart +++ b/lib/ui/notifications/notifications_list_view.dart @@ -183,9 +183,8 @@ class _NotificationsListViewState extends State { } }, options: LinkifyOptions(humanize: false), - style: Theme.of( - context, - ).textTheme.bodySmall?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), + style: Theme.of(context).textTheme.bodySmall + ?.copyWith(fontSize: 16, height: 1.41, fontWeight: FontWeight.w400), ), freefoodProvider.isFreeFood(data.messageId) ? FreeFoodNotification(messageId: data.messageId) : Container(), ], @@ -198,9 +197,8 @@ class _NotificationsListViewState extends State { padding: const EdgeInsets.only(top: 6.0), child: Text( _readTimestamp(data.timestamp), - style: Theme.of( - context, - ).textTheme.bodySmall?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), + style: Theme.of(context).textTheme.bodySmall + ?.copyWith(fontSize: 12, height: 1.41, fontWeight: FontWeight.w700), ), ), ], diff --git a/lib/ui/parking/circular_parking_indicator.dart b/lib/ui/parking/circular_parking_indicator.dart index d3001d352..90deb068c 100644 --- a/lib/ui/parking/circular_parking_indicator.dart +++ b/lib/ui/parking/circular_parking_indicator.dart @@ -217,12 +217,12 @@ class CircularParkingIndicators extends StatelessWidget { } Widget buildSpotsAvailableText(BuildContext context) { - final openSpots = Provider.of( - context, - ).getApproxNumOfOpenSpots(model.locationName)["Open"].toString(); - final totalSpots = Provider.of( - context, - ).getApproxNumOfOpenSpots(model.locationName)["Total"].toString(); + final openSpots = Provider.of(context) + .getApproxNumOfOpenSpots(model.locationName)["Open"] + .toString(); + final totalSpots = Provider.of(context) + .getApproxNumOfOpenSpots(model.locationName)["Total"] + .toString(); final visualText = "~$openSpots of $totalSpots Spots Available"; final semanticText = "Approximately $openSpots of $totalSpots Spots Available"; diff --git a/lib/ui/parking/spot_types_view.dart b/lib/ui/parking/spot_types_view.dart index 4e2c5bb0f..0704a3d62 100644 --- a/lib/ui/parking/spot_types_view.dart +++ b/lib/ui/parking/spot_types_view.dart @@ -46,9 +46,9 @@ class _SpotTypesViewState extends State { ); List createList(BuildContext context) { - var selectedSpots = Provider.of( - context, - ).spotTypesState.values.where((selected) => selected == true).length; + var selectedSpots = Provider.of(context).spotTypesState.values + .where((selected) => selected == true) + .length; List list = []; From f6776f8790f79f3136e7af85cd762db3921c37ea Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 24 Aug 2026 15:35:14 -0700 Subject: [PATCH 110/139] added a graceful fallback so the map tries to render after failure --- .../esrimap_basemap_factory.dart | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart index f832d9172..5257d8492 100644 --- a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart +++ b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart @@ -4,10 +4,21 @@ /// [EsriMapConfig] layer specifications. /// ============================================================================ +import 'dart:async'; + import 'package:arcgis_maps/arcgis_maps.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_basemaps.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; +void _setupPersistentRetry(Layer layer) { + layer.onLoadStatusChanged.listen((status) async { + if (status == LoadStatus.failedToLoad) { + await Future.delayed(const Duration(seconds: 2)); + layer.retryLoad(); + } + }); +} + /// Constructs an ArcGIS [Basemap] for the requested [type] using configuration settings in [config]. /// /// To provide complete geographical background (coastlines, ocean, islands, regional streets) @@ -31,11 +42,11 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { _ => '291da5eab3a0412593b66d384379f89f', }; - basemap.baseLayers.add( - ArcGISVectorTiledLayer.withItem( - PortalItem.withPortalAndItemId(portal: Portal.arcGISOnline(), itemId: globalBaseItemId), - ), + final globalLayer = ArcGISVectorTiledLayer.withItem( + PortalItem.withPortalAndItemId(portal: Portal.arcGISOnline(), itemId: globalBaseItemId), ); + _setupPersistentRetry(globalLayer); + basemap.baseLayers.add(globalLayer); // 3. Custom UC San Diego Campus Vector Tile Layer (campus buildings, walkways, landscaping) final entry = config.basemaps[basemapKey(type)]; @@ -51,9 +62,11 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { var hasValidUrlAndId = pUrl != null && layer.itemId != null; if (hasValidUrlAndId) { final portal = pUrl.contains('arcgis.com') ? Portal.arcGISOnline() : Portal(Uri.parse(pUrl)); - basemap.baseLayers.add( - ArcGISVectorTiledLayer.withItem(PortalItem.withPortalAndItemId(portal: portal, itemId: layer.itemId!)), + final campusLayer = ArcGISVectorTiledLayer.withItem( + PortalItem.withPortalAndItemId(portal: portal, itemId: layer.itemId!), ); + _setupPersistentRetry(campusLayer); + basemap.baseLayers.add(campusLayer); } } } else { @@ -64,12 +77,13 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { _ => 'e19f33d2c1f44967aef673306c483913', }; - basemap.baseLayers.add( - ArcGISVectorTiledLayer.withItem( - PortalItem.withPortalAndItemId(portal: Portal(Uri.parse(portalUrl)), itemId: fallbackItemId), - ), + final fallbackLayer = ArcGISVectorTiledLayer.withItem( + PortalItem.withPortalAndItemId(portal: Portal(Uri.parse(portalUrl)), itemId: fallbackItemId), ); + _setupPersistentRetry(fallbackLayer); + basemap.baseLayers.add(fallbackLayer); } return basemap; } + From dfba122692cb061f2048616c9c198bbf333a2d0e Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 24 Aug 2026 15:46:34 -0700 Subject: [PATCH 111/139] fixed loading UI bug --- lib/ui/esrimap/esrimap.dart | 51 ++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index a62d6a755..94d52bf5d 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -129,7 +129,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { String? _activeRouteField; (double, double)? _fromLatLng; MapSearchResult? _routeDestination; - Offset? _loadingPoint; + ArcGISPoint? _loadingLocation; // Basemaps & Operational Layers State BasemapType _currentBasemapType = BasemapType.defaultMap; @@ -1219,7 +1219,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Future.delayed(const Duration(milliseconds: 200), () { if (!isRequestFinished && mounted) { setState(() { - _loadingPoint = screenPoint; + _loadingLocation = mapPoint; }); } }); @@ -1237,7 +1237,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { isRequestFinished = true; if (mounted) setState(() { - _loadingPoint = null; + _loadingLocation = null; }); final tappedGraphic = identifyResult.graphics.first; final index = tappedGraphic.attributes['resultIndex'] as int?; @@ -1258,7 +1258,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { isRequestFinished = true; if (mounted) setState(() { - _loadingPoint = null; + _loadingLocation = null; }); if (buildingResult != null) { if (_allCategoryResults.isNotEmpty) _clearSearch(); @@ -1275,7 +1275,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { isRequestFinished = true; if (mounted) setState(() { - _loadingPoint = null; + _loadingLocation = null; }); _dismissCallout(); final isSelectedResultNotNull = _selectedResult != null; @@ -2162,24 +2162,29 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }, ), - if (_loadingPoint != null) - Positioned( - left: _loadingPoint!.dx - 12, - top: _loadingPoint!.dy - 12, - child: Container( - width: 24, - height: 24, - decoration: BoxDecoration( - color: isDark ? const Color(0xFF242424) : Colors.white, - shape: BoxShape.circle, - boxShadow: const [BoxShadow(color: Colors.black26, blurRadius: 4, offset: Offset(0, 2))], - ), - padding: const EdgeInsets.all(4), - child: CircularProgressIndicator( - strokeWidth: 2, - color: isDark ? Colors.white : Theme.of(context).primaryColor, - ), - ), + if (_loadingLocation != null) + Builder( + builder: (context) { + final screenPt = _mapViewController.locationToScreen(mapPoint: _loadingLocation!); + return Positioned( + left: screenPt.dx - 12, + top: screenPt.dy - 12, + child: Container( + width: 24, + height: 24, + decoration: BoxDecoration( + color: isDark ? const Color(0xFF242424) : Colors.white, + shape: BoxShape.circle, + boxShadow: const [BoxShadow(color: Colors.black26, blurRadius: 4, offset: Offset(0, 2))], + ), + padding: const EdgeInsets.all(4), + child: CircularProgressIndicator( + strokeWidth: 2, + color: isDark ? Colors.white : Theme.of(context).primaryColor, + ), + ), + ); + }, ), // Floating top search bar & suggestion panel From 6c1d77b5814eb7799dad9cecd368c2a87d1cc773 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 24 Aug 2026 15:58:01 -0700 Subject: [PATCH 112/139] cleaned ui --- lib/ui/esrimap/esrimap.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 94d52bf5d..c73a0f3b1 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -2454,7 +2454,15 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), // Basemap & Operational Layer Selector Panel - if (isLayersPanelVisible) + if (isLayersPanelVisible) ...[ + Positioned.fill( + child: GestureDetector( + onTap: () => setState(() => _showLayersPanel = false), + child: Container( + color: const Color(0x80000000), + ), + ), + ), EsriMapLayersPanel( config: _config!, currentBasemapType: _currentBasemapType, @@ -2467,6 +2475,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { onToggleLayer: _toggleLayer, onClose: () => setState(() => _showLayersPanel = false), ), + ], ], ); }, From 6be7461d1995cac23b6da8d980d0db2df4b0acf6 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 24 Aug 2026 16:20:09 -0700 Subject: [PATCH 113/139] started VO implementation --- .../esri_map_widgets/esrimap_scale_bar.dart | 56 ++++++++- lib/ui/esrimap/esrimap.dart | 112 ++++++++++++++---- 2 files changed, 138 insertions(+), 30 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart index 343b26922..c76f634a7 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_scale_bar.dart @@ -108,11 +108,57 @@ class _EsriMapScaleBarState extends State { Widget build(BuildContext context) { if (widget.scale <= 0) return const SizedBox.shrink(); - return AnimatedOpacity( - opacity: _isVisible ? 1.0 : 0.0, - duration: const Duration(milliseconds: 300), - curve: Curves.easeInOut, - child: _buildScaleContent(context), + // 1 logical pixel in meters at standard 96 DPI: (scale * 0.0254 / 96.0) + final metersPerPx = (widget.scale * 0.0254) / 96.0; + if (metersPerPx <= 0) return const SizedBox.shrink(); + + // Calculate imperial label for semantics + double chosenImperialFt = _IMPERIAL_DISTANCES.first; + double chosenWidthPx = 60.0; + for (final ft in _IMPERIAL_DISTANCES) { + final meters = ft * 0.3048; + final px = meters / metersPerPx; + if (px >= 40 && px <= 100) { + chosenImperialFt = ft; + chosenWidthPx = px; + break; + } + if (px > 100) { + chosenImperialFt = ft; + chosenWidthPx = px.clamp(40.0, 100.0); + break; + } + } + final String imperialLabel = chosenImperialFt >= 5280 + ? '${(chosenImperialFt / 5280).toStringAsFixed(chosenImperialFt % 5280 == 0 ? 0 : 1)} miles' + : '${chosenImperialFt.toInt()} feet'; + + final barMeters = chosenWidthPx * metersPerPx; + double chosenMetricMeters = _METRIC_DISTANCES.first; + for (final m in _METRIC_DISTANCES) { + if (m <= barMeters * 1.3) { + chosenMetricMeters = m; + } else { + break; + } + } + final String metricLabel = chosenMetricMeters >= 1000 + ? '${(chosenMetricMeters / 1000).toStringAsFixed(chosenMetricMeters % 1000 == 0 ? 0 : 1)} kilometers' + : (chosenMetricMeters < 1 + ? '${(chosenMetricMeters * 100).round()} centimeters' + : '${chosenMetricMeters % 1 == 0 ? chosenMetricMeters.toInt() : chosenMetricMeters.toStringAsFixed(1)} meters'); + + return Semantics( + label: 'Map scale is $imperialLabel or $metricLabel', + hidden: !_isVisible, + child: ExcludeSemantics( + child: AnimatedOpacity( + opacity: _isVisible ? 1.0 : 0.0, + duration: const Duration(milliseconds: 300), + curve: Curves.easeInOut, + child: _buildScaleContent(context), + ), + ), ); } diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index c73a0f3b1..865ddb6f5 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -2063,7 +2063,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { child: Column( mainAxisSize: MainAxisSize.min, children: [ - const Icon(Icons.wifi_off, size: 48, color: Colors.grey), + const ExcludeSemantics(child: Icon(Icons.wifi_off, size: 48, color: Colors.grey)), const SizedBox(height: 16), const Text('Network error. Please try again.', style: TextStyle(fontSize: 16)), const SizedBox(height: 16), @@ -2074,22 +2074,86 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { : IndexedStack( index: indexedStackIndex, children: [ - Listener( - onPointerDown: _onMapPointerDown, - child: ArcGISMapView( - controllerProvider: () => _mapViewController, - onMapViewReady: _onMapViewReady, - onTap: _onMapTap, + Semantics( + label: 'Interactive 2D Campus Map', + hint: 'Double tap and hold, then drag to pan. Pinch to zoom.', + child: Listener( + onPointerDown: _onMapPointerDown, + child: ArcGISMapView( + controllerProvider: () => _mapViewController, + onMapViewReady: _onMapViewReady, + onTap: _onMapTap, + ), ), ), - _scene3DWidget ?? const SizedBox.shrink(), - _sceneDroneWidget ?? const SizedBox.shrink(), + Semantics( + label: 'Interactive 3D Campus Scene', + hint: 'Double tap and hold, then drag to pan. Pinch to zoom.', + child: _scene3DWidget ?? const SizedBox.shrink(), + ), + Semantics( + label: 'Interactive 3D Drone Scene', + hint: 'Double tap and hold, then drag to pan. Pinch to zoom.', + child: _sceneDroneWidget ?? const SizedBox.shrink(), + ), ], ), ), ], ), + // Hidden Semantics nodes for Map Pins / Graphics + if (_mappedResults.isNotEmpty && !_hasNetworkError && _sceneMode == 'default') + Builder( + builder: (context) { + final List semanticsNodes = []; + final vp = _mapViewController.getCurrentViewpoint(ViewpointType.boundingGeometry); + final mapSr = vp?.targetGeometry.spatialReference; + + for (int i = 0; i < _mappedResults.length; i++) { + final result = _mappedResults[i]; + var mapPoint = ArcGISPoint( + x: result.longitude, + y: result.latitude, + spatialReference: SpatialReference.wgs84, + ); + if (mapSr != null && mapPoint.spatialReference != null) { + try { + final proj = GeometryEngine.project(mapPoint, outputSpatialReference: mapSr); + mapPoint = proj as ArcGISPoint; + } catch (_) {} + } + + final screenPt = _mapViewController.locationToScreen(mapPoint: mapPoint); + // Keep within visible bounds roughly + if (screenPt.dx >= -50 && screenPt.dy >= -50 && + screenPt.dx <= constraints.maxWidth + 50 && + screenPt.dy <= constraints.maxHeight + 50) { + semanticsNodes.add( + Positioned( + left: screenPt.dx - 24, + top: screenPt.dy - 48, + child: Semantics( + label: 'Map pin: ${result.name}', + hint: 'Double tap to view details.', + button: true, + onTap: () { + if (i < _graphicsOverlay.graphics.length) { + _handlePinTap(result, _graphicsOverlay.graphics[i]); + } else { + _selectResultFromPin(result); + } + }, + child: const SizedBox(width: 48, height: 48), + ), + ), + ); + } + } + return Stack(children: semanticsNodes); + }, + ), + // Map controls stay behind search and slide-over panels. if (isFabVisible) Positioned( @@ -2125,22 +2189,20 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { pos, outputSpatialReference: geom.spatialReference!, ); - if (projectedPos != null) { - isUserVisible = GeometryEngine.intersects(geometry1: projectedPos, geometry2: geom); - - if (!isUserVisible) { - final screenPoint = _mapViewController.locationToScreen( - mapPoint: projectedPos as ArcGISPoint, - ); - // FAB center is bottom: 100, right: 16, size: 48x48 -> center is 24px inwards - final fabX = constraints.maxWidth - 16 - 24; - final fabY = constraints.maxHeight - 100 - 24; - - final dx = screenPoint.dx - fabX; - final dy = screenPoint.dy - fabY; - // angle from UP (negative Y) - screenAngle = math.atan2(dx, -dy); - } + isUserVisible = GeometryEngine.intersects(geometry1: projectedPos, geometry2: geom); + + if (!isUserVisible) { + final screenPoint = _mapViewController.locationToScreen( + mapPoint: projectedPos as ArcGISPoint, + ); + // FAB center is bottom: 100, right: 16, size: 48x48 -> center is 24px inwards + final fabX = constraints.maxWidth - 16 - 24; + final fabY = constraints.maxHeight - 100 - 24; + + final dx = screenPoint.dx - fabX; + final dy = screenPoint.dy - fabY; + // angle from UP (negative Y) + screenAngle = math.atan2(dx, -dy); } } } catch (_) {} From 81174f3e992e40732ce52a68fc4e817652462b7e Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 24 Aug 2026 16:21:42 -0700 Subject: [PATCH 114/139] Added VO for search bar and routing --- .../esri_map_widgets/esrimap_search_bar.dart | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index e00d79459..dd913b743 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -170,13 +170,15 @@ class EsriMapSearchBar extends StatelessWidget { // Left route connection indicator dots Padding( padding: const EdgeInsets.only(left: 14), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - const Icon(Icons.circle_outlined, size: 12, color: Colors.blue), - Container(width: 1.5, height: 24, color: isDark ? Colors.grey[600] : Colors.grey[300]), - const Icon(Icons.circle, size: 12, color: Colors.red), - ], + child: ExcludeSemantics( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + const Icon(Icons.circle_outlined, size: 12, color: Colors.blue), + Container(width: 1.5, height: 24, color: isDark ? Colors.grey[600] : Colors.grey[300]), + const Icon(Icons.circle, size: 12, color: Colors.red), + ], + ), ), ), // Text input fields column @@ -210,6 +212,7 @@ class EsriMapSearchBar extends StatelessWidget { padding: EdgeInsets.zero, icon: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[600]), onPressed: onClearFromField, + tooltip: 'Clear starting location', ), ), ], @@ -241,6 +244,7 @@ class EsriMapSearchBar extends StatelessWidget { padding: EdgeInsets.zero, icon: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[600]), onPressed: onClearToField, + tooltip: 'Clear destination location', ), ), ], @@ -259,6 +263,7 @@ class EsriMapSearchBar extends StatelessWidget { padding: EdgeInsets.zero, icon: const Icon(Icons.close, size: 20, color: Colors.redAccent), onPressed: onClearRoute, + tooltip: 'Close routing', ), ), SizedBox( @@ -268,6 +273,7 @@ class EsriMapSearchBar extends StatelessWidget { padding: EdgeInsets.zero, icon: Icon(Icons.swap_vert, size: 20, color: isDark ? Colors.white70 : Colors.grey[600]), onPressed: onSwapRouteFields, + tooltip: 'Swap starting and destination locations', ), ), ], @@ -292,7 +298,7 @@ class EsriMapSearchBar extends StatelessWidget { height: 24, child: isSearching ? CircularProgressIndicator(strokeWidth: 2, color: searchTextColor, semanticsLabel: 'Searching') - : Icon(Icons.search, color: isDark ? Colors.white70 : Colors.grey[600]), + : ExcludeSemantics(child: Icon(Icons.search, color: isDark ? Colors.white70 : Colors.grey[600])), ), ), Expanded( @@ -313,18 +319,13 @@ class EsriMapSearchBar extends StatelessWidget { style: TextStyle(fontSize: searchFontSize, color: searchTextColor), decoration: InputDecoration( border: InputBorder.none, - contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 16), - hint: Padding( - padding: const EdgeInsets.only(left: 4), - child: Text( - 'Search buildings, places...', - style: TextStyle(fontSize: searchFontSize, color: searchTextColor), - ), - ), + contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16), + hintText: 'Search buildings, places...', + hintStyle: TextStyle(fontSize: searchFontSize, color: searchTextColor), ), ), ), - if (isSearchNotEmpty) IconButton(icon: const Icon(Icons.clear), onPressed: onClearSearch), + if (isSearchNotEmpty) IconButton(icon: const Icon(Icons.clear), onPressed: onClearSearch, tooltip: 'Clear search'), if (isAiSearchEnabled) IconButton( icon: Icon( @@ -333,6 +334,7 @@ class EsriMapSearchBar extends StatelessWidget { size: 20, ), onPressed: onOpenAiSearch, + tooltip: 'AI Location Search', ), ], ), From 3691f67941eb42baae9e761a5a8eaa1de4b5001b Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 24 Aug 2026 17:14:30 -0700 Subject: [PATCH 115/139] added VO to the entire esri map --- .../esrimap_category_list_panel.dart | 12 +- .../esrimap_detail_slide_over.dart | 114 ++++++++++-------- .../esrimap/esri_map_widgets/esrimap_fab.dart | 81 +++++++++---- .../esrimap_layers_panel.dart | 57 +++++---- .../esrimap_suggestions_panel.dart | 76 +++++++----- lib/ui/esrimap/esrimap.dart | 84 +++++++------ 6 files changed, 255 insertions(+), 169 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart index 16f8d698a..33a2087a3 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart @@ -111,7 +111,7 @@ class EsriMapCategoryListPanel extends StatelessWidget { }, trailing: hasMoreTotalResults ? TextButton.icon( - icon: Icon(Icons.layers_outlined, size: 16, color: isDark ? Colors.white54 : Colors.grey[600]), + icon: ExcludeSemantics(child: Icon(Icons.layers_outlined, size: 16, color: isDark ? Colors.white54 : Colors.grey[600])), label: Text( 'See all ${allCategoryResults.length} results', style: TextStyle(fontSize: 13, color: isDark ? Colors.white54 : Colors.grey[600]), @@ -167,10 +167,12 @@ class EsriMapCategoryListPanel extends StatelessWidget { children: [ ListTile( splashColor: Colors.transparent, - leading: Icon( - iconForResult(r), - size: 20, - color: isDark ? Colors.grey[400] : Colors.grey[600], + leading: ExcludeSemantics( + child: Icon( + iconForResult(r), + size: 20, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), ), title: Text( r.name, diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index 3ac923adc..a8cc19a06 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -66,19 +66,25 @@ Widget buildSlideOverContent({ ), ), if (hasTrailing) trailing, - Material( - color: Colors.transparent, - child: InkWell( - onTap: onClose, - customBorder: const CircleBorder(), - child: Container( - width: 34, - height: 34, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: isDark ? Colors.grey[800] : Colors.grey[200], + Semantics( + button: true, + label: 'Close panel', + child: Material( + color: Colors.transparent, + child: InkWell( + onTap: onClose, + customBorder: const CircleBorder(), + child: Container( + width: 34, + height: 34, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: isDark ? Colors.grey[800] : Colors.grey[200], + ), + child: ExcludeSemantics( + child: Icon(Icons.close, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), + ), ), - child: Icon(Icons.close, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), ), ), ), @@ -187,37 +193,43 @@ Widget buildDetailSlideOverContent({ tooltip: 'Back', ), Expanded( - child: InkWell( - onTap: onToggle, - borderRadius: BorderRadius.circular(8), - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 12), - child: Row( - children: [ - if (hasHeaderIcon) ...[ - Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), + child: Semantics( + button: true, + label: isMinimized ? 'Expand details' : 'Collapse details', + child: InkWell( + onTap: onToggle, + borderRadius: BorderRadius.circular(8), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 12), + child: Row( + children: [ + if (hasHeaderIcon) ...[ + ExcludeSemantics(child: Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700])), + const SizedBox(width: 8), + ], + Expanded( + child: Text( + headerTitle, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + color: isDark ? Colors.white : Colors.grey[900], + ), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ), + if (hasTrailing && !isMinimized) trailing, const SizedBox(width: 8), - ], - Expanded( - child: Text( - headerTitle, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - color: isDark ? Colors.white : Colors.grey[900], + ExcludeSemantics( + child: Icon( + isMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, + size: 24, + color: isDark ? Colors.white70 : Colors.grey[700], ), - maxLines: 1, - overflow: TextOverflow.ellipsis, ), - ), - if (hasTrailing && !isMinimized) trailing, - const SizedBox(width: 8), - Icon( - isMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, - size: 24, - color: isDark ? Colors.white70 : Colors.grey[700], - ), - ], + ], + ), ), ), ), @@ -397,7 +409,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { ] else if (hasRoute) ...[ Row( children: [ - Icon(Icons.schedule, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), + ExcludeSemantics(child: Icon(Icons.schedule, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600])), const SizedBox(width: 6), Text( routeTravelTimeMinutes < 1 ? '< 1 min' : '${routeTravelTimeMinutes.ceil()} min', @@ -417,10 +429,12 @@ class EsriMapDetailSlideOver extends StatelessWidget { child: Row( mainAxisSize: MainAxisSize.min, children: [ - Icon( - Icons.directions_walk, - size: 16, - color: isDark ? Colors.grey[900] : Colors.white, + ExcludeSemantics( + child: Icon( + Icons.directions_walk, + size: 16, + color: isDark ? Colors.grey[900] : Colors.white, + ), ), const SizedBox(width: 6), Text( @@ -512,10 +526,12 @@ class EsriMapDetailSlideOver extends StatelessWidget { children: [ if (isFirstIndex) const Divider(height: 1), ListTile( - leading: Icon( - Icons.subdirectory_arrow_right, - size: 20, - color: isDark ? Colors.grey[400] : Colors.grey[600], + leading: ExcludeSemantics( + child: Icon( + Icons.subdirectory_arrow_right, + size: 20, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), ), title: Text(directionText, style: const TextStyle(fontSize: 14)), trailing: distMeters > 0 diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index 0dee896a3..b6efe8dff 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -73,34 +73,43 @@ class EsriMapFabCluster extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ // Compass needle button - Material( - elevation: 4, - color: bgColor, - shape: const CircleBorder(), - clipBehavior: Clip.antiAlias, - child: GestureDetector( - onTap: onSnapToNorth, - behavior: HitTestBehavior.opaque, - child: SizedBox( - width: SIZE, - height: SIZE, - child: Center( - child: CustomPaint( - size: const Size(24, 24), - painter: _CompassNeedlePainter( - rotationDegrees: mapRotation, - southColor: fgColor.withValues(alpha: 0.35), + if (mapRotation.abs() > 0.01) ...[ + Material( + elevation: 4, + color: bgColor, + shape: const CircleBorder(), + clipBehavior: Clip.antiAlias, + child: Semantics( + button: true, + label: 'Snap to true north', + child: GestureDetector( + onTap: onSnapToNorth, + behavior: HitTestBehavior.opaque, + child: SizedBox( + width: SIZE, + height: SIZE, + child: Center( + child: ExcludeSemantics( + child: CustomPaint( + size: const Size(24, 24), + painter: _CompassNeedlePainter( + rotationDegrees: mapRotation, + southColor: fgColor.withValues(alpha: 0.35), + ), + ), + ), ), ), ), ), ), - ), - const SizedBox(height: 10), + const SizedBox(height: 10), + ], // Center Map (Center on Campus) _circleButton( svgAsset: 'assets/esri_map_assets/Center-Trident.svg', + semanticsLabel: 'Center on campus', color: recenterColor, bgColor: bgColor, onTap: onRecenterOnView, @@ -113,6 +122,7 @@ class EsriMapFabCluster extends StatelessWidget { size: const Size(20, 20), painter: _MapDisplaysIconPainter(color: fgColor), ), + semanticsLabel: 'Map layers and displays', color: fgColor, bgColor: bgColor, onTap: onShowLayersPanel, @@ -125,6 +135,7 @@ class EsriMapFabCluster extends StatelessWidget { IconData? icon, String? svgAsset, Widget? customIcon, + String? semanticsLabel, required Color color, required Color bgColor, required VoidCallback onTap, @@ -143,6 +154,11 @@ class EsriMapFabCluster extends StatelessWidget { iconWidget = Icon(icon, size: 22, color: color); } + Widget accessibleIcon = ExcludeSemantics(child: iconWidget); + if (semanticsLabel != null) { + accessibleIcon = Semantics(label: semanticsLabel, child: accessibleIcon); + } + return Material( elevation: 4, color: bgColor, @@ -153,7 +169,7 @@ class EsriMapFabCluster extends StatelessWidget { child: SizedBox( width: SIZE, height: SIZE, - child: Center(child: iconWidget), + child: Center(child: accessibleIcon), ), ), ); @@ -297,17 +313,30 @@ class EsriMapLocationFab extends StatelessWidget { iconWidget = Icon(Icons.explore_outlined, size: 26, color: fgColor); } + String semanticsLabel; + if (isLoading) { + semanticsLabel = 'Center on my location, acquiring GPS signal'; + } else if (isLocationActive) { + semanticsLabel = 'Tracking your location'; + } else { + semanticsLabel = 'Center on my location'; + } + return Material( elevation: 4, color: bgColor, shape: const CircleBorder(), clipBehavior: Clip.antiAlias, - child: InkWell( - onTap: onRecenterOnUser, - child: SizedBox( - width: EsriMapFabCluster.SIZE, - height: EsriMapFabCluster.SIZE, - child: Center(child: iconWidget), + child: Semantics( + button: true, + label: semanticsLabel, + child: InkWell( + onTap: onRecenterOnUser, + child: SizedBox( + width: EsriMapFabCluster.SIZE, + height: EsriMapFabCluster.SIZE, + child: Center(child: ExcludeSemantics(child: iconWidget)), + ), ), ), ); diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index a59af3be3..6762f2f98 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -79,10 +79,15 @@ class EsriMapLayersPanel extends StatelessWidget { Widget? imageWidget, bool loading = false, }) { - return GestureDetector( - onTap: onTap, - child: SizedBox( - width: 86, + return Semantics( + button: true, + selected: selected, + label: loading ? '$label, loading' : label, + child: ExcludeSemantics( + child: GestureDetector( + onTap: onTap, + child: SizedBox( + width: 86, child: Column( mainAxisSize: MainAxisSize.min, children: [ @@ -119,7 +124,7 @@ class EsriMapLayersPanel extends StatelessWidget { ], ), ), - ); + ))); } Widget networkImage(String url) => Image.network( @@ -128,23 +133,30 @@ class EsriMapLayersPanel extends StatelessWidget { errorBuilder: (_, __, ___) => Container(color: isDark ? Colors.grey[700] : Colors.grey[300]), ); - Widget sceneChip(String key, String label, bool selected) => GestureDetector( - onTap: () => onSetSceneMode(key), - child: Container( - padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 7), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(20), - border: selected - ? Border.all(color: accent, width: 2) - : Border.all(color: isDark ? Colors.grey[700]! : Colors.grey[300]!, width: 1), - color: selected ? accent.withValues(alpha: 0.12) : (isDark ? Colors.grey[850] : Colors.grey[100]), - ), - child: Text( - label, - style: TextStyle( - fontSize: 13, - fontWeight: selected ? FontWeight.w700 : FontWeight.w400, - color: selected ? accent : textColor, + Widget sceneChip(String key, String label, bool selected) => Semantics( + button: true, + selected: selected, + label: label, + child: ExcludeSemantics( + child: GestureDetector( + onTap: () => onSetSceneMode(key), + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 7), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + border: selected + ? Border.all(color: accent, width: 2) + : Border.all(color: isDark ? Colors.grey[700]! : Colors.grey[300]!, width: 1), + color: selected ? accent.withValues(alpha: 0.12) : (isDark ? Colors.grey[850] : Colors.grey[100]), + ), + child: Text( + label, + style: TextStyle( + fontSize: 13, + fontWeight: selected ? FontWeight.w700 : FontWeight.w400, + color: selected ? accent : textColor, + ), + ), ), ), ), @@ -194,6 +206,7 @@ class EsriMapLayersPanel extends StatelessWidget { IconButton( icon: Icon(Icons.close, size: 20, color: subtitleColor), onPressed: onClose, + tooltip: 'Close map displays menu', padding: EdgeInsets.zero, constraints: const BoxConstraints(), ), diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart index bf0d2aee7..644642956 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart @@ -62,13 +62,16 @@ class _EsriMapSuggestionsPanelState extends State { if (isFromRouteFieldActive) ...[ ListTile( contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4), - leading: Icon( - Icons.my_location, - size: 20, - color: isDark ? Colors.grey[400] : Theme.of(context).colorScheme.primary, + leading: ExcludeSemantics( + child: Icon( + Icons.my_location, + size: 20, + color: isDark ? Colors.grey[400] : Theme.of(context).colorScheme.primary, + ), ), title: Text( 'Current Location', + semanticsLabel: 'Use my current location', style: TextStyle( fontSize: 15, fontWeight: FontWeight.w500, @@ -123,7 +126,7 @@ class _EsriMapSuggestionsPanelState extends State { TextButton( onPressed: widget.onClearRecent, style: TextButton.styleFrom(foregroundColor: isDark ? Colors.grey[400] : Colors.grey[600]), - child: const Text('Clear'), + child: const Text('Clear', semanticsLabel: 'Clear recent searches'), ), ], ), @@ -160,10 +163,12 @@ class _EsriMapSuggestionsPanelState extends State { height: 64, child: ListTile( contentPadding: const EdgeInsets.only(left: 16, right: 4), - leading: CircleAvatar( - radius: 16, - backgroundColor: isDark ? Colors.grey[800] : Colors.grey[100], - child: Icon(Icons.history, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), + leading: ExcludeSemantics( + child: CircleAvatar( + radius: 16, + backgroundColor: isDark ? Colors.grey[800] : Colors.grey[100], + child: Icon(Icons.history, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600]), + ), ), title: Text( recent.name, @@ -198,7 +203,10 @@ class _EsriMapSuggestionsPanelState extends State { _isHistoryExpanded = !_isHistoryExpanded; }); }, - child: Text(_isHistoryExpanded ? 'Show Less' : 'Show More'), + child: Text( + _isHistoryExpanded ? 'Show Less' : 'Show More', + semanticsLabel: _isHistoryExpanded ? 'Show less recent searches' : 'Show more recent searches', + ), ), ], ); @@ -207,28 +215,34 @@ class _EsriMapSuggestionsPanelState extends State { Widget _buildCategoryChip(BuildContext context, EsriSearchCategory category) { final isDark = Theme.of(context).brightness == Brightness.dark; - return Tooltip( - message: 'Search ${category.label}', - child: GestureDetector( - onTap: () => widget.onSelectCategory(category), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Container( - width: 52, - height: 52, - decoration: BoxDecoration(color: category.color, shape: BoxShape.circle), - child: Icon(category.icon, size: 22, color: Colors.black), - ), - const SizedBox(height: 6), - Text( - category.label, - maxLines: 2, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.center, - style: TextStyle(fontSize: 12, color: isDark ? Colors.grey[400] : Colors.grey[600]), + return Semantics( + button: true, + label: 'Search ${category.label}', + child: Tooltip( + message: 'Search ${category.label}', + child: GestureDetector( + onTap: () => widget.onSelectCategory(category), + child: ExcludeSemantics( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + width: 52, + height: 52, + decoration: BoxDecoration(color: category.color, shape: BoxShape.circle), + child: Icon(category.icon, size: 22, color: Colors.black), + ), + const SizedBox(height: 6), + Text( + category.label, + maxLines: 2, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center, + style: TextStyle(fontSize: 12, color: isDark ? Colors.grey[400] : Colors.grey[600]), + ), + ], ), - ], + ), ), ), ); diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 865ddb6f5..31639c4af 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1990,40 +1990,48 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { color: Theme.of(context).cardColor.withOpacity(0.9), elevation: 4, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), - child: InkWell( - borderRadius: BorderRadius.circular(8), - onTap: () => setState(() => _isTransitLegendMinimized = !_isTransitLegendMinimized), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Row( - mainAxisSize: MainAxisSize.min, - children: [ - const Text('Transit Routes', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 13)), - const SizedBox(width: 8), - Icon(_isTransitLegendMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, size: 18), - ], - ), - if (!_isTransitLegendMinimized) ...[ - const SizedBox(height: 6), - for (final info in _transitLegend) - Padding( - padding: const EdgeInsets.only(bottom: 4), - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - if (_transitLegendSwatches[info.name] != null) - RawImage(image: _transitLegendSwatches[info.name], width: 16, height: 16), - const SizedBox(width: 8), - Text(info.name, style: const TextStyle(fontSize: 12)), - ], - ), + child: Semantics( + button: true, + label: _isTransitLegendMinimized ? 'Expand transit routes legend' : 'Collapse transit routes legend', + child: InkWell( + borderRadius: BorderRadius.circular(8), + onTap: () => setState(() => _isTransitLegendMinimized = !_isTransitLegendMinimized), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + ExcludeSemantics( + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + const Text('Transit Routes', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 13)), + const SizedBox(width: 8), + Icon(_isTransitLegendMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, size: 18), + ], ), + ), + if (!_isTransitLegendMinimized) ...[ + const SizedBox(height: 6), + for (final info in _transitLegend) + Padding( + padding: const EdgeInsets.only(bottom: 4), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + if (_transitLegendSwatches[info.name] != null) + ExcludeSemantics( + child: RawImage(image: _transitLegendSwatches[info.name], width: 16, height: 16), + ), + const SizedBox(width: 8), + Text('${info.name} route', style: const TextStyle(fontSize: 12)), + ], + ), + ), + ], ], - ], + ), ), ), ), @@ -2518,10 +2526,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Basemap & Operational Layer Selector Panel if (isLayersPanelVisible) ...[ Positioned.fill( - child: GestureDetector( - onTap: () => setState(() => _showLayersPanel = false), - child: Container( - color: const Color(0x80000000), + child: Semantics( + button: true, + label: 'Close map displays menu', + child: GestureDetector( + onTap: () => setState(() => _showLayersPanel = false), + child: Container( + color: const Color(0x80000000), + ), ), ), ), From 4d5fb4fffe24682bff707473c030a563996fbf01 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 24 Aug 2026 17:42:42 -0700 Subject: [PATCH 116/139] Finished esri map VO --- .../esrimap_ai_search_sheet.dart | 40 +++-- .../esrimap_callout_content.dart | 76 ++++---- .../esrimap_detail_slide_over.dart | 15 +- .../esrimap/esri_map_widgets/esrimap_fab.dart | 28 +++ lib/ui/esrimap/esrimap.dart | 169 ++++++++++++------ 5 files changed, 215 insertions(+), 113 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart index 46733e260..1738ca7ee 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart @@ -182,19 +182,25 @@ class _EsriAiSearchSheetState extends State { ), ), const SizedBox(width: 8), - FilledButton( - onPressed: isLoading ? null : _submit, - style: FilledButton.styleFrom( - minimumSize: const Size(48, 48), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), + Semantics( + button: true, + label: isLoading ? 'Searching' : 'Submit search', + child: ExcludeSemantics( + child: FilledButton( + onPressed: isLoading ? null : _submit, + style: FilledButton.styleFrom( + minimumSize: const Size(48, 48), + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), + ), + child: isLoading + ? const SizedBox( + width: 18, + height: 18, + child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white), + ) + : const Icon(Icons.search), + ), ), - child: isLoading - ? const SizedBox( - width: 18, - height: 18, - child: CircularProgressIndicator(strokeWidth: 2, color: Colors.white), - ) - : const Icon(Icons.search), ), ], ), @@ -230,9 +236,11 @@ class _EsriAiSearchSheetState extends State { final subtitleStr = hasDistance ? '${r.subtitle} · ${r.distanceFormatted}' : r.subtitle; return ListTile( - leading: CircleAvatar( - backgroundColor: accent.withValues(alpha: 0.12), - child: Icon(_iconForSubtitle(r.subtitle), color: accent, size: 18), + leading: ExcludeSemantics( + child: CircleAvatar( + backgroundColor: accent.withValues(alpha: 0.12), + child: Icon(_iconForSubtitle(r.subtitle), color: accent, size: 18), + ), ), title: Text( r.name, @@ -256,7 +264,7 @@ class _EsriAiSearchSheetState extends State { child: SizedBox( width: double.infinity, child: FilledButton.icon( - icon: const Icon(Icons.directions), + icon: const ExcludeSemantics(child: Icon(Icons.directions)), label: Text('Route through ${_response!.routeStopNames!.length} stops'), onPressed: () { Navigator.pop(context); diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart index 8e0b0e826..fa1825fcd 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart @@ -91,41 +91,39 @@ class EsriMapCalloutContent extends StatelessWidget { // --- UI Builders --- Widget _buildCalloutContainer(BuildContext context, {required Widget child}) { - // Exclude semantics here so we can provide a combined label if needed, - // or just let the children handle it. - return Semantics( - label: detail.isEmpty ? result.name : '${result.name}. $detail', - excludeSemantics: true, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - result.name, - maxLines: 2, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.center, - style: TextStyle( - color: isDark ? Colors.white : Colors.black87, - fontSize: 15, - fontWeight: FontWeight.w600, - height: 1.15, - ), + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + result.name, + maxLines: 2, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center, + style: TextStyle( + color: isDark ? Colors.white : Colors.black87, + fontSize: 15, + fontWeight: FontWeight.w600, + height: 1.15, ), - const SizedBox(height: 4), - child, - ], - ), + ), + const SizedBox(height: 4), + child, + ], ); } Widget _buildFallbackContent(BuildContext context) { if (detail.isEmpty) return const SizedBox.shrink(); - return Text( - detail, - maxLines: 1, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.center, - style: TextStyle(color: isDark ? Colors.white70 : Colors.black54, fontSize: 12, height: 1.15), + final isBuilding = result.source == MapSearchSource.building; + return Semantics( + label: isBuilding ? 'Building Address: $detail' : null, + child: Text( + detail, + maxLines: 1, + overflow: TextOverflow.ellipsis, + textAlign: TextAlign.center, + style: TextStyle(color: isDark ? Colors.white70 : Colors.black54, fontSize: 12, height: 1.15), + ), ); } @@ -252,10 +250,12 @@ class EsriMapCalloutContent extends StatelessWidget { width: 100, child: ClipRRect( borderRadius: BorderRadius.circular(4), - child: LinearProgressIndicator( - value: percent, - backgroundColor: isDark ? Colors.white24 : Colors.black12, - valueColor: AlwaysStoppedAnimation(progressColor), + child: ExcludeSemantics( + child: LinearProgressIndicator( + value: percent, + backgroundColor: isDark ? Colors.white24 : Colors.black12, + valueColor: AlwaysStoppedAnimation(progressColor), + ), ), ), ), @@ -291,10 +291,12 @@ class EsriMapCalloutContent extends StatelessWidget { width: 100, child: ClipRRect( borderRadius: BorderRadius.circular(4), - child: LinearProgressIndicator( - value: percent <= 0.01 ? 0.01 : percent, - backgroundColor: isDark ? Colors.white24 : Colors.black12, - valueColor: AlwaysStoppedAnimation(progressColor), + child: ExcludeSemantics( + child: LinearProgressIndicator( + value: percent <= 0.01 ? 0.01 : percent, + backgroundColor: isDark ? Colors.white24 : Colors.black12, + valueColor: AlwaysStoppedAnimation(progressColor), + ), ), ), ), diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index a8cc19a06..ef8565c01 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -363,12 +363,15 @@ class EsriMapDetailSlideOver extends StatelessWidget { ), if (shouldShowDetailText) ...[ const SizedBox(height: 10), - Text( - detailText, - style: TextStyle( - fontSize: 15, - height: 1.4, - color: isDark ? Colors.grey[300] : Colors.grey[700], + Semantics( + label: isBuilding ? 'Building Address: $detailText' : null, + child: Text( + detailText, + style: TextStyle( + fontSize: 15, + height: 1.4, + color: isDark ? Colors.grey[300] : Colors.grey[700], + ), ), ), ], diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index b6efe8dff..aa3377343 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -38,6 +38,12 @@ class EsriMapFabCluster extends StatelessWidget { /// Callback when compass snap-to-north button is pressed. final VoidCallback onSnapToNorth; + /// Callback when zoom in button is pressed. + final VoidCallback? onZoomIn; + + /// Callback when zoom out button is pressed. + final VoidCallback? onZoomOut; + /// Constructs an [EsriMapFabCluster] instance. const EsriMapFabCluster({ Key? key, @@ -50,6 +56,8 @@ class EsriMapFabCluster extends StatelessWidget { required this.onRecenterOnView, required this.onRecenterOnUser, required this.onSnapToNorth, + this.onZoomIn, + this.onZoomOut, }) : super(key: key); /// Active state highlight color. @@ -116,6 +124,26 @@ class EsriMapFabCluster extends StatelessWidget { ), const SizedBox(height: 10), + // Zoom Accessibility Buttons (Only shown when VoiceOver/TalkBack is active) + if (MediaQuery.of(context).accessibleNavigation && onZoomIn != null && onZoomOut != null) ...[ + _circleButton( + icon: Icons.add, + semanticsLabel: 'Zoom in', + color: fgColor, + bgColor: bgColor, + onTap: onZoomIn!, + ), + const SizedBox(height: 10), + _circleButton( + icon: Icons.remove, + semanticsLabel: 'Zoom out', + color: fgColor, + bgColor: bgColor, + onTap: onZoomOut!, + ), + const SizedBox(height: 10), + ], + // Map displays (Layers) _circleButton( customIcon: CustomPaint( diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 31639c4af..c54c724ad 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -31,6 +31,7 @@ import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_s import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart'; import 'package:campus_mobile_experimental/ui/esrimap/esri_map_widgets/esrimap_callout_content.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/semantics.dart'; import 'package:provider/provider.dart'; import 'package:campus_mobile_experimental/core/providers/dining.dart'; import 'package:campus_mobile_experimental/core/providers/parking.dart'; @@ -1529,6 +1530,26 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _mapViewController.setViewpointRotation(angleDegrees: 0); } + void _zoomIn() { + if (_sceneMode != 'default') return; // Not implemented for 3D yet + final vp = _mapViewController.getCurrentViewpoint(ViewpointType.centerAndScale); + if (vp != null && vp.targetGeometry is ArcGISPoint) { + _mapViewController.setViewpointAnimated( + Viewpoint.fromCenter(vp.targetGeometry as ArcGISPoint, scale: _currentScale / 2.0) + ); + } + } + + void _zoomOut() { + if (_sceneMode != 'default') return; // Not implemented for 3D yet + final vp = _mapViewController.getCurrentViewpoint(ViewpointType.centerAndScale); + if (vp != null && vp.targetGeometry is ArcGISPoint) { + _mapViewController.setViewpointAnimated( + Viewpoint.fromCenter(vp.targetGeometry as ArcGISPoint, scale: _currentScale * 2.0) + ); + } + } + void _clearSearch() { _cancelPendingSearch(); _dismissCallout(); @@ -2063,8 +2084,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return Stack( children: [ // Map View Stack (2D Map View vs 3D Scene View) - Column( - children: [ + Semantics( + sortKey: const OrdinalSortKey(3.0), + child: Column( + children: [ Expanded( child: _hasNetworkError ? Center( @@ -2109,6 +2132,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), ], ), + ), // Hidden Semantics nodes for Map Pins / Graphics if (_mappedResults.isNotEmpty && !_hasNetworkError && _sceneMode == 'default') @@ -2158,7 +2182,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ); } } - return Stack(children: semanticsNodes); + return Semantics( + sortKey: const OrdinalSortKey(4.0), + child: Stack(children: semanticsNodes), + ); }, ), @@ -2167,7 +2194,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Positioned( top: MediaQuery.of(context).padding.top + 68, right: 16, - child: EsriMapFabCluster( + child: Semantics( + sortKey: const OrdinalSortKey(5.0), + child: EsriMapFabCluster( isDark: isDark, is3D: _sceneMode != 'default', mapRotation: _mapRotation, @@ -2177,6 +2206,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { onRecenterOnView: _recenterOnView, onRecenterOnUser: _recenterOnUser, onSnapToNorth: _snapToNorth, + onZoomIn: _zoomIn, + onZoomOut: _zoomOut, + ), ), ), @@ -2219,14 +2251,17 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return Positioned( bottom: 100, right: 16, - child: EsriMapLocationFab( - isDark: isDark, - isLocationActive: _isLocationActive, - isUserVisible: isUserVisible, - isLoading: _isLocatingUser, - bearingToUser: screenAngle, - mapRotation: _mapRotation, - onRecenterOnUser: _recenterOnUser, + child: Semantics( + sortKey: const OrdinalSortKey(6.0), + child: EsriMapLocationFab( + isDark: isDark, + isLocationActive: _isLocationActive, + isUserVisible: isUserVisible, + isLoading: _isLocatingUser, + bearingToUser: screenAngle, + mapRotation: _mapRotation, + onRecenterOnUser: _recenterOnUser, + ), ), ); }, @@ -2239,18 +2274,21 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return Positioned( left: screenPt.dx - 12, top: screenPt.dy - 12, - child: Container( - width: 24, - height: 24, - decoration: BoxDecoration( - color: isDark ? const Color(0xFF242424) : Colors.white, - shape: BoxShape.circle, - boxShadow: const [BoxShadow(color: Colors.black26, blurRadius: 4, offset: Offset(0, 2))], - ), - padding: const EdgeInsets.all(4), - child: CircularProgressIndicator( - strokeWidth: 2, - color: isDark ? Colors.white : Theme.of(context).primaryColor, + child: Semantics( + sortKey: const OrdinalSortKey(7.0), + child: Container( + width: 24, + height: 24, + decoration: BoxDecoration( + color: isDark ? const Color(0xFF242424) : Colors.white, + shape: BoxShape.circle, + boxShadow: const [BoxShadow(color: Colors.black26, blurRadius: 4, offset: Offset(0, 2))], + ), + padding: const EdgeInsets.all(4), + child: CircularProgressIndicator( + strokeWidth: 2, + color: isDark ? Colors.white : Theme.of(context).primaryColor, + ), ), ), ); @@ -2263,8 +2301,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { top: 8, left: 12, right: 12, - child: Column( - children: [ + child: Semantics( + sortKey: const OrdinalSortKey(1.0), + child: Column( + children: [ EsriMapSearchBar( config: _config, showRouteFields: _showRouteFields, @@ -2450,24 +2490,28 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), ], ), + ), ), // Category results list panel if (shouldShowCatListPanel) - EsriMapCategoryListPanel( - key: const Key('category_list_panel'), - controller: _categorySheetController, - activeCategory: _activeCategory, - allCategoryResults: _allCategoryResults, - viewportResults: EsriMapSearchService.filterToViewport( - _allCategoryResults, - _getViewportEnvelopeWGS84(), + Semantics( + sortKey: const OrdinalSortKey(1.5), + child: EsriMapCategoryListPanel( + key: const Key('category_list_panel'), + controller: _categorySheetController, + activeCategory: _activeCategory, + allCategoryResults: _allCategoryResults, + viewportResults: EsriMapSearchService.filterToViewport( + _allCategoryResults, + _getViewportEnvelopeWGS84(), + ), + userLocation: _getUserLatLng(), + onClearSearch: _clearSearch, + onSeeAllResults: _seeAllCategoryResults, + onSelectResult: _selectResultFromList, + iconForResult: _iconForResult, ), - userLocation: _getUserLatLng(), - onClearSearch: _clearSearch, - onSeeAllResults: _seeAllCategoryResults, - onSelectResult: _selectResultFromList, - iconForResult: _iconForResult, ), // Dynamic Google Maps-style Scale Bar Indicator @@ -2475,17 +2519,29 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Positioned( bottom: 24, right: 16, - child: EsriMapScaleBar(scale: _currentScale, isDark: isDark), + child: Semantics( + sortKey: const OrdinalSortKey(8.0), + child: EsriMapScaleBar(scale: _currentScale, isDark: isDark), + ), ), // Transit Legend if (_layerVisible['tritonTransit'] == true) - Positioned(bottom: 24, left: 16, child: _buildTransitLegend()), + Positioned( + bottom: 24, + left: 16, + child: Semantics( + sortKey: const OrdinalSortKey(9.0), + child: _buildTransitLegend(), + ), + ), // Selected Result Detail Slide-over if (_selectedResult != null) - LayoutBuilder( - builder: (context, constraints) => EsriMapDetailSlideOver( + Semantics( + sortKey: const OrdinalSortKey(1.6), + child: LayoutBuilder( + builder: (context, constraints) => EsriMapDetailSlideOver( minimizedNotifier: _detailSheetMinimized, availableHeight: constraints.maxHeight, result: _selectedResult!, @@ -2522,11 +2578,13 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { onClearRoute: _clearRoute, ), ), + ), // Basemap & Operational Layer Selector Panel if (isLayersPanelVisible) ...[ Positioned.fill( child: Semantics( + sortKey: const OrdinalSortKey(1.7), button: true, label: 'Close map displays menu', child: GestureDetector( @@ -2537,17 +2595,20 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), ), ), - EsriMapLayersPanel( - config: _config!, - currentBasemapType: _currentBasemapType, - currentSceneKey: _sceneMode, - layerVisible: _layerVisible, - layerLoading: _layerLoading, - hideSceneSwitcher: _selectedResult != null || _showCategoryList, - onSwitchBasemap: _switchBasemap, - onSetSceneMode: _setSceneMode, - onToggleLayer: _toggleLayer, - onClose: () => setState(() => _showLayersPanel = false), + Semantics( + sortKey: const OrdinalSortKey(1.8), + child: EsriMapLayersPanel( + config: _config!, + currentBasemapType: _currentBasemapType, + currentSceneKey: _sceneMode, + layerVisible: _layerVisible, + layerLoading: _layerLoading, + hideSceneSwitcher: _selectedResult != null || _showCategoryList, + onSwitchBasemap: _switchBasemap, + onSetSceneMode: _setSceneMode, + onToggleLayer: _toggleLayer, + onClose: () => setState(() => _showLayersPanel = false), + ), ), ], ], From bc2ee3709f525df2def0753636cf12fbd19e0cad Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Tue, 25 Aug 2026 00:56:39 +0000 Subject: [PATCH 117/139] style: auto fix formatting violations --- .../esrimap_basemap_factory.dart | 1 - .../esrimap_category_list_panel.dart | 4 +- .../esrimap_detail_slide_over.dart | 12 +- .../esrimap/esri_map_widgets/esrimap_fab.dart | 12 +- .../esrimap_layers_panel.dart | 70 +-- .../esri_map_widgets/esrimap_search_bar.dart | 7 +- lib/ui/esrimap/esrimap.dart | 519 +++++++++--------- 7 files changed, 314 insertions(+), 311 deletions(-) diff --git a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart index 5257d8492..fdbfb0db4 100644 --- a/lib/core/services/esri_map_services/esrimap_basemap_factory.dart +++ b/lib/core/services/esri_map_services/esrimap_basemap_factory.dart @@ -86,4 +86,3 @@ Basemap buildBasemap(BasemapType type, EsriMapConfig config) { return basemap; } - diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart index 33a2087a3..fa7626ce4 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_category_list_panel.dart @@ -111,7 +111,9 @@ class EsriMapCategoryListPanel extends StatelessWidget { }, trailing: hasMoreTotalResults ? TextButton.icon( - icon: ExcludeSemantics(child: Icon(Icons.layers_outlined, size: 16, color: isDark ? Colors.white54 : Colors.grey[600])), + icon: ExcludeSemantics( + child: Icon(Icons.layers_outlined, size: 16, color: isDark ? Colors.white54 : Colors.grey[600]), + ), label: Text( 'See all ${allCategoryResults.length} results', style: TextStyle(fontSize: 13, color: isDark ? Colors.white54 : Colors.grey[600]), diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index ef8565c01..eb07005c0 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -204,7 +204,9 @@ Widget buildDetailSlideOverContent({ child: Row( children: [ if (hasHeaderIcon) ...[ - ExcludeSemantics(child: Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700])), + ExcludeSemantics( + child: Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), + ), const SizedBox(width: 8), ], Expanded( @@ -412,7 +414,13 @@ class EsriMapDetailSlideOver extends StatelessWidget { ] else if (hasRoute) ...[ Row( children: [ - ExcludeSemantics(child: Icon(Icons.schedule, size: 18, color: isDark ? Colors.grey[400] : Colors.grey[600])), + ExcludeSemantics( + child: Icon( + Icons.schedule, + size: 18, + color: isDark ? Colors.grey[400] : Colors.grey[600], + ), + ), const SizedBox(width: 6), Text( routeTravelTimeMinutes < 1 ? '< 1 min' : '${routeTravelTimeMinutes.ceil()} min', diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index aa3377343..fc8ef2a72 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -126,13 +126,7 @@ class EsriMapFabCluster extends StatelessWidget { // Zoom Accessibility Buttons (Only shown when VoiceOver/TalkBack is active) if (MediaQuery.of(context).accessibleNavigation && onZoomIn != null && onZoomOut != null) ...[ - _circleButton( - icon: Icons.add, - semanticsLabel: 'Zoom in', - color: fgColor, - bgColor: bgColor, - onTap: onZoomIn!, - ), + _circleButton(icon: Icons.add, semanticsLabel: 'Zoom in', color: fgColor, bgColor: bgColor, onTap: onZoomIn!), const SizedBox(height: 10), _circleButton( icon: Icons.remove, @@ -183,9 +177,7 @@ class EsriMapFabCluster extends StatelessWidget { } Widget accessibleIcon = ExcludeSemantics(child: iconWidget); - if (semanticsLabel != null) { - accessibleIcon = Semantics(label: semanticsLabel, child: accessibleIcon); - } + if (semanticsLabel != null) accessibleIcon = Semantics(label: semanticsLabel, child: accessibleIcon); return Material( elevation: 4, diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index 6762f2f98..52ab58ede 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -88,43 +88,45 @@ class EsriMapLayersPanel extends StatelessWidget { onTap: onTap, child: SizedBox( width: 86, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Container( - width: 68, - height: 68, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - border: selected - ? Border.all(color: accent, width: 2.5) - : Border.all(color: isDark ? Colors.grey[700]! : Colors.grey[300]!, width: 1), - ), - child: ClipRRect( - borderRadius: BorderRadius.circular(8.5), - child: loading - ? const Center( - child: SizedBox(width: 26, height: 26, child: CircularProgressIndicator(strokeWidth: 2)), - ) - : (imageWidget ?? Container(color: isDark ? Colors.grey[700] : Colors.grey[300])), - ), - ), - const SizedBox(height: 6), - Text( - label, - textAlign: TextAlign.center, - maxLines: 2, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 13, - fontWeight: selected ? FontWeight.w700 : FontWeight.w400, - color: selected ? accent : textColor, - ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + width: 68, + height: 68, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: selected + ? Border.all(color: accent, width: 2.5) + : Border.all(color: isDark ? Colors.grey[700]! : Colors.grey[300]!, width: 1), + ), + child: ClipRRect( + borderRadius: BorderRadius.circular(8.5), + child: loading + ? const Center( + child: SizedBox(width: 26, height: 26, child: CircularProgressIndicator(strokeWidth: 2)), + ) + : (imageWidget ?? Container(color: isDark ? Colors.grey[700] : Colors.grey[300])), + ), + ), + const SizedBox(height: 6), + Text( + label, + textAlign: TextAlign.center, + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 13, + fontWeight: selected ? FontWeight.w700 : FontWeight.w400, + color: selected ? accent : textColor, + ), + ), + ], ), - ], + ), ), ), - ))); + ); } Widget networkImage(String url) => Image.network( diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index dd913b743..921bb7b80 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -298,7 +298,9 @@ class EsriMapSearchBar extends StatelessWidget { height: 24, child: isSearching ? CircularProgressIndicator(strokeWidth: 2, color: searchTextColor, semanticsLabel: 'Searching') - : ExcludeSemantics(child: Icon(Icons.search, color: isDark ? Colors.white70 : Colors.grey[600])), + : ExcludeSemantics( + child: Icon(Icons.search, color: isDark ? Colors.white70 : Colors.grey[600]), + ), ), ), Expanded( @@ -325,7 +327,8 @@ class EsriMapSearchBar extends StatelessWidget { ), ), ), - if (isSearchNotEmpty) IconButton(icon: const Icon(Icons.clear), onPressed: onClearSearch, tooltip: 'Clear search'), + if (isSearchNotEmpty) + IconButton(icon: const Icon(Icons.clear), onPressed: onClearSearch, tooltip: 'Clear search'), if (isAiSearchEnabled) IconButton( icon: Icon( diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index c54c724ad..0d3a0efa6 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1535,7 +1535,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final vp = _mapViewController.getCurrentViewpoint(ViewpointType.centerAndScale); if (vp != null && vp.targetGeometry is ArcGISPoint) { _mapViewController.setViewpointAnimated( - Viewpoint.fromCenter(vp.targetGeometry as ArcGISPoint, scale: _currentScale / 2.0) + Viewpoint.fromCenter(vp.targetGeometry as ArcGISPoint, scale: _currentScale / 2.0), ); } } @@ -1545,7 +1545,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final vp = _mapViewController.getCurrentViewpoint(ViewpointType.centerAndScale); if (vp != null && vp.targetGeometry is ArcGISPoint) { _mapViewController.setViewpointAnimated( - Viewpoint.fromCenter(vp.targetGeometry as ArcGISPoint, scale: _currentScale * 2.0) + Viewpoint.fromCenter(vp.targetGeometry as ArcGISPoint, scale: _currentScale * 2.0), ); } } @@ -2088,50 +2088,50 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { sortKey: const OrdinalSortKey(3.0), child: Column( children: [ - Expanded( - child: _hasNetworkError - ? Center( - child: Column( - mainAxisSize: MainAxisSize.min, + Expanded( + child: _hasNetworkError + ? Center( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + const ExcludeSemantics(child: Icon(Icons.wifi_off, size: 48, color: Colors.grey)), + const SizedBox(height: 16), + const Text('Network error. Please try again.', style: TextStyle(fontSize: 16)), + const SizedBox(height: 16), + ElevatedButton(onPressed: _fetchConfigThenInit, child: const Text('Reload')), + ], + ), + ) + : IndexedStack( + index: indexedStackIndex, children: [ - const ExcludeSemantics(child: Icon(Icons.wifi_off, size: 48, color: Colors.grey)), - const SizedBox(height: 16), - const Text('Network error. Please try again.', style: TextStyle(fontSize: 16)), - const SizedBox(height: 16), - ElevatedButton(onPressed: _fetchConfigThenInit, child: const Text('Reload')), - ], - ), - ) - : IndexedStack( - index: indexedStackIndex, - children: [ - Semantics( - label: 'Interactive 2D Campus Map', - hint: 'Double tap and hold, then drag to pan. Pinch to zoom.', - child: Listener( - onPointerDown: _onMapPointerDown, - child: ArcGISMapView( - controllerProvider: () => _mapViewController, - onMapViewReady: _onMapViewReady, - onTap: _onMapTap, + Semantics( + label: 'Interactive 2D Campus Map', + hint: 'Double tap and hold, then drag to pan. Pinch to zoom.', + child: Listener( + onPointerDown: _onMapPointerDown, + child: ArcGISMapView( + controllerProvider: () => _mapViewController, + onMapViewReady: _onMapViewReady, + onTap: _onMapTap, + ), ), ), - ), - Semantics( - label: 'Interactive 3D Campus Scene', - hint: 'Double tap and hold, then drag to pan. Pinch to zoom.', - child: _scene3DWidget ?? const SizedBox.shrink(), - ), - Semantics( - label: 'Interactive 3D Drone Scene', - hint: 'Double tap and hold, then drag to pan. Pinch to zoom.', - child: _sceneDroneWidget ?? const SizedBox.shrink(), - ), - ], - ), - ), - ], - ), + Semantics( + label: 'Interactive 3D Campus Scene', + hint: 'Double tap and hold, then drag to pan. Pinch to zoom.', + child: _scene3DWidget ?? const SizedBox.shrink(), + ), + Semantics( + label: 'Interactive 3D Drone Scene', + hint: 'Double tap and hold, then drag to pan. Pinch to zoom.', + child: _sceneDroneWidget ?? const SizedBox.shrink(), + ), + ], + ), + ), + ], + ), ), // Hidden Semantics nodes for Map Pins / Graphics @@ -2158,8 +2158,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final screenPt = _mapViewController.locationToScreen(mapPoint: mapPoint); // Keep within visible bounds roughly - if (screenPt.dx >= -50 && screenPt.dy >= -50 && - screenPt.dx <= constraints.maxWidth + 50 && + if (screenPt.dx >= -50 && + screenPt.dy >= -50 && + screenPt.dx <= constraints.maxWidth + 50 && screenPt.dy <= constraints.maxHeight + 50) { semanticsNodes.add( Positioned( @@ -2197,18 +2198,18 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { child: Semantics( sortKey: const OrdinalSortKey(5.0), child: EsriMapFabCluster( - isDark: isDark, - is3D: _sceneMode != 'default', - mapRotation: _mapRotation, - isLocationActive: _isLocationActive, - isRecenterActive: _isRecenterActive, - onShowLayersPanel: () => setState(() => _showLayersPanel = true), - onRecenterOnView: _recenterOnView, - onRecenterOnUser: _recenterOnUser, - onSnapToNorth: _snapToNorth, - onZoomIn: _zoomIn, - onZoomOut: _zoomOut, - ), + isDark: isDark, + is3D: _sceneMode != 'default', + mapRotation: _mapRotation, + isLocationActive: _isLocationActive, + isRecenterActive: _isRecenterActive, + onShowLayersPanel: () => setState(() => _showLayersPanel = true), + onRecenterOnView: _recenterOnView, + onRecenterOnUser: _recenterOnUser, + onSnapToNorth: _snapToNorth, + onZoomIn: _zoomIn, + onZoomOut: _zoomOut, + ), ), ), @@ -2305,191 +2306,191 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { sortKey: const OrdinalSortKey(1.0), child: Column( children: [ - EsriMapSearchBar( - config: _config, - showRouteFields: _showRouteFields, - searchController: _searchController, - focusNode: _focusNode, - fromController: _fromController, - fromFocusNode: _fromFocusNode, - toController: _toController, - toFocusNode: _toFocusNode, - showSuggestions: _showSuggestions, - showResults: _showResults, - isSearching: _isSearching, - searchResults: _searchResults, - matchingPoiClasses: _matchingPoiClasses, - onPerformSearch: _queueSearch, - onPerformClassSearch: _performClassSearch, - onSelectResult: _selectResult, - onClearSearch: _clearSearch, - onClearRoute: _clearRoute, - onSwapRouteFields: () { - final tmpText = _fromController.text; - final tmpLatLng = _fromLatLng; - _fromController.text = _toController.text; - _toController.text = tmpText; - setState(() { - final hasRouteDestination = _routeDestination != null; - _fromLatLng = hasRouteDestination - ? (_routeDestination!.latitude, _routeDestination!.longitude) - : null; - final hasTmpLatLng = tmpLatLng != null; - _routeDestination = hasTmpLatLng - ? MapSearchResult( - name: tmpText, - subtitle: '', - latitude: tmpLatLng.$1, - longitude: tmpLatLng.$2, - source: MapSearchSource.building, - ) - : null; - }); - final canSolveRoute = _routeDestination != null && _fromLatLng != null; - if (canSolveRoute) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); - }, - onTapSearchField: () { - final hasSelectedResult = _selectedResult != null; - if (hasSelectedResult) setState(() => _selectedResult = null); - final isSearchTextEmpty = _searchController.text.isEmpty; - if (isSearchTextEmpty) { + EsriMapSearchBar( + config: _config, + showRouteFields: _showRouteFields, + searchController: _searchController, + focusNode: _focusNode, + fromController: _fromController, + fromFocusNode: _fromFocusNode, + toController: _toController, + toFocusNode: _toFocusNode, + showSuggestions: _showSuggestions, + showResults: _showResults, + isSearching: _isSearching, + searchResults: _searchResults, + matchingPoiClasses: _matchingPoiClasses, + onPerformSearch: _queueSearch, + onPerformClassSearch: _performClassSearch, + onSelectResult: _selectResult, + onClearSearch: _clearSearch, + onClearRoute: _clearRoute, + onSwapRouteFields: () { + final tmpText = _fromController.text; + final tmpLatLng = _fromLatLng; + _fromController.text = _toController.text; + _toController.text = tmpText; setState(() { - _showSuggestions = true; - _showResults = false; + final hasRouteDestination = _routeDestination != null; + _fromLatLng = hasRouteDestination + ? (_routeDestination!.latitude, _routeDestination!.longitude) + : null; + final hasTmpLatLng = tmpLatLng != null; + _routeDestination = hasTmpLatLng + ? MapSearchResult( + name: tmpText, + subtitle: '', + latitude: tmpLatLng.$1, + longitude: tmpLatLng.$2, + source: MapSearchSource.building, + ) + : null; }); - } - }, - onTapFromField: () { - setState(() { - _activeRouteField = 'from'; - _showSuggestions = true; - _showResults = false; - }); - }, - onTapToField: () { - setState(() { - _activeRouteField = 'to'; - _showSuggestions = true; - _showResults = false; - }); - }, - onChangedFromField: (text) { - _fromLatLng = null; - final isLongEnough = text.length >= 3; - final isTextEmpty = text.isEmpty; - if (isLongEnough) { - _queueSearch(text); - } else if (isTextEmpty) { - _cancelPendingSearch(); + final canSolveRoute = _routeDestination != null && _fromLatLng != null; + if (canSolveRoute) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + }, + onTapSearchField: () { + final hasSelectedResult = _selectedResult != null; + if (hasSelectedResult) setState(() => _selectedResult = null); + final isSearchTextEmpty = _searchController.text.isEmpty; + if (isSearchTextEmpty) { + setState(() { + _showSuggestions = true; + _showResults = false; + }); + } + }, + onTapFromField: () { setState(() { - _isSearching = false; - _showResults = false; + _activeRouteField = 'from'; _showSuggestions = true; + _showResults = false; }); - } else { - _cancelPendingSearch(); + }, + onTapToField: () { setState(() { - _isSearching = false; + _activeRouteField = 'to'; + _showSuggestions = true; _showResults = false; - _showSuggestions = false; }); - } - }, - onChangedToField: (text) { - final isLongEnough = text.length >= 3; - final isTextEmpty = text.isEmpty; - if (isLongEnough) { - _queueSearch(text); - } else if (isTextEmpty) { + }, + onChangedFromField: (text) { + _fromLatLng = null; + final isLongEnough = text.length >= 3; + final isTextEmpty = text.isEmpty; + if (isLongEnough) { + _queueSearch(text); + } else if (isTextEmpty) { + _cancelPendingSearch(); + setState(() { + _isSearching = false; + _showResults = false; + _showSuggestions = true; + }); + } else { + _cancelPendingSearch(); + setState(() { + _isSearching = false; + _showResults = false; + _showSuggestions = false; + }); + } + }, + onChangedToField: (text) { + final isLongEnough = text.length >= 3; + final isTextEmpty = text.isEmpty; + if (isLongEnough) { + _queueSearch(text); + } else if (isTextEmpty) { + _cancelPendingSearch(); + setState(() { + _isSearching = false; + _showResults = false; + _showSuggestions = true; + }); + } else { + _cancelPendingSearch(); + setState(() { + _isSearching = false; + _showResults = false; + _showSuggestions = false; + }); + } + }, + onClearFromField: () { _cancelPendingSearch(); + _fromController.clear(); + _fromLatLng = null; setState(() { _isSearching = false; _showResults = false; _showSuggestions = true; }); - } else { + }, + onClearToField: () { _cancelPendingSearch(); + _toController.clear(); setState(() { _isSearching = false; _showResults = false; - _showSuggestions = false; + _showSuggestions = true; }); - } - }, - onClearFromField: () { - _cancelPendingSearch(); - _fromController.clear(); - _fromLatLng = null; - setState(() { - _isSearching = false; - _showResults = false; - _showSuggestions = true; - }); - }, - onClearToField: () { - _cancelPendingSearch(); - _toController.clear(); - setState(() { - _isSearching = false; - _showResults = false; - _showSuggestions = true; - }); - }, - onOpenAiSearch: () => showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: Colors.transparent, - builder: (_) => EsriAiSearchSheet( - userLat: _getUserLatLng()?.$1, - userLon: _getUserLatLng()?.$2, - onLocationSelected: _onAiLocationSelected, - onRouteRequested: _onAiRouteRequested, + }, + onOpenAiSearch: () => showModalBottomSheet( + context: context, + isScrollControlled: true, + backgroundColor: Colors.transparent, + builder: (_) => EsriAiSearchSheet( + userLat: _getUserLatLng()?.$1, + userLon: _getUserLatLng()?.$2, + onLocationSelected: _onAiLocationSelected, + onRouteRequested: _onAiRouteRequested, + ), ), + iconForClass: _iconForClass, + labelForClass: _labelForClass, + iconForResult: _iconForResult, ), - iconForClass: _iconForClass, - labelForClass: _labelForClass, - iconForResult: _iconForResult, - ), - // Suggestions panel (Category icons + Recent Search History) - if (_showSuggestions && !_showResults) - Padding( - padding: const EdgeInsets.only(top: 4), - child: EsriMapSuggestionsPanel( - categories: _categories, - recentSearches: _recentSearches, - showRouteFields: _showRouteFields, - activeRouteField: _activeRouteField, - onSelectCurrentLocation: () async { - (double, double)? gps = await _getDeviceLocationEfficiently(); - if (gps == null) { + // Suggestions panel (Category icons + Recent Search History) + if (_showSuggestions && !_showResults) + Padding( + padding: const EdgeInsets.only(top: 4), + child: EsriMapSuggestionsPanel( + categories: _categories, + recentSearches: _recentSearches, + showRouteFields: _showRouteFields, + activeRouteField: _activeRouteField, + onSelectCurrentLocation: () async { + (double, double)? gps = await _getDeviceLocationEfficiently(); + if (gps == null) { + if (mounted) { + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar(content: Text('Unable to get your current location.')), + ); + } + return; + } + _fromController.text = 'My Location'; + _fromLatLng = gps; if (mounted) { - ScaffoldMessenger.of( - context, - ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + setState(() { + _showSuggestions = false; + _showResults = false; + }); } - return; - } - _fromController.text = 'My Location'; - _fromLatLng = gps; - if (mounted) { - setState(() { - _showSuggestions = false; - _showResults = false; - }); - } - _fromFocusNode.unfocus(); - final hasRouteDestination = _routeDestination != null; - if (hasRouteDestination) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); - }, - onSelectCategory: _performCategorySearch, - onSelectRecent: _selectResult, - onRemoveRecent: _removeFromRecentSearches, - onClearRecent: _clearRecentSearches, + _fromFocusNode.unfocus(); + final hasRouteDestination = _routeDestination != null; + if (hasRouteDestination) _solveRoute(_routeDestination!, originLatLng: _fromLatLng); + }, + onSelectCategory: _performCategorySearch, + onSelectRecent: _selectResult, + onRemoveRecent: _removeFromRecentSearches, + onClearRecent: _clearRecentSearches, + ), ), - ), - ], - ), + ], + ), ), ), @@ -2528,12 +2529,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Transit Legend if (_layerVisible['tritonTransit'] == true) Positioned( - bottom: 24, - left: 16, - child: Semantics( - sortKey: const OrdinalSortKey(9.0), - child: _buildTransitLegend(), - ), + bottom: 24, + left: 16, + child: Semantics(sortKey: const OrdinalSortKey(9.0), child: _buildTransitLegend()), ), // Selected Result Detail Slide-over @@ -2542,43 +2540,44 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { sortKey: const OrdinalSortKey(1.6), child: LayoutBuilder( builder: (context, constraints) => EsriMapDetailSlideOver( - minimizedNotifier: _detailSheetMinimized, - availableHeight: constraints.maxHeight, - result: _selectedResult!, - resultIcon: _iconForResult(_selectedResult!), - isRoutingMode: _isRouting, - hasRoute: _hasRoute, - routeFailed: _routeFailed, - travelMode: _travelMode, - routeTravelTimeMinutes: _routeTravelTimeMinutes, - routeManeuvers: _routeManeuvers, - fromLatLng: _fromLatLng, - onGetDirections: (res) { - final gps = _getUserLatLng(); - final hasGps = gps != null; - _fromController.text = hasGps ? 'My Location' : ''; - _toController.text = res.name; - _routeDestination = res; - _graphicsOverlay.graphics.clear(); - setState(() { - _showRouteFields = true; - _mappedResults = []; - _allCategoryResults = []; - _showCategoryList = false; - _activeCategory = null; - }); - _solveRoute(res); - }, - onTravelModeChanged: (mode) { - final hasSelectedResult = _selectedResult != null; - if (hasSelectedResult) _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); - }, - onLaunchWebsite: _launchWebsite, - onClose: _closeDetail, - onClearRoute: _clearRoute, + minimizedNotifier: _detailSheetMinimized, + availableHeight: constraints.maxHeight, + result: _selectedResult!, + resultIcon: _iconForResult(_selectedResult!), + isRoutingMode: _isRouting, + hasRoute: _hasRoute, + routeFailed: _routeFailed, + travelMode: _travelMode, + routeTravelTimeMinutes: _routeTravelTimeMinutes, + routeManeuvers: _routeManeuvers, + fromLatLng: _fromLatLng, + onGetDirections: (res) { + final gps = _getUserLatLng(); + final hasGps = gps != null; + _fromController.text = hasGps ? 'My Location' : ''; + _toController.text = res.name; + _routeDestination = res; + _graphicsOverlay.graphics.clear(); + setState(() { + _showRouteFields = true; + _mappedResults = []; + _allCategoryResults = []; + _showCategoryList = false; + _activeCategory = null; + }); + _solveRoute(res); + }, + onTravelModeChanged: (mode) { + final hasSelectedResult = _selectedResult != null; + if (hasSelectedResult) + _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); + }, + onLaunchWebsite: _launchWebsite, + onClose: _closeDetail, + onClearRoute: _clearRoute, + ), ), ), - ), // Basemap & Operational Layer Selector Panel if (isLayersPanelVisible) ...[ @@ -2589,9 +2588,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { label: 'Close map displays menu', child: GestureDetector( onTap: () => setState(() => _showLayersPanel = false), - child: Container( - color: const Color(0x80000000), - ), + child: Container(color: const Color(0x80000000)), ), ), ), From bc10a73f2ab37b8cacbe33e7fcafc108082ec1b8 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Mon, 24 Aug 2026 18:15:53 -0700 Subject: [PATCH 118/139] fixed violations --- .../esrimap/esri_map_widgets/esrimap_fab.dart | 5 +++- lib/ui/esrimap/esrimap.dart | 23 +++++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index fc8ef2a72..679eb9c02 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -76,6 +76,9 @@ class EsriMapFabCluster extends StatelessWidget { final recenterColor = isRecenterActive ? ACTIVE_COLOR : fgColor; + final isAccessibleNav = MediaQuery.of(context).accessibleNavigation; + final hasZoomCallbacks = onZoomIn != null && onZoomOut != null; + return Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, @@ -125,7 +128,7 @@ class EsriMapFabCluster extends StatelessWidget { const SizedBox(height: 10), // Zoom Accessibility Buttons (Only shown when VoiceOver/TalkBack is active) - if (MediaQuery.of(context).accessibleNavigation && onZoomIn != null && onZoomOut != null) ...[ + if (isAccessibleNav && hasZoomCallbacks) ...[ _circleButton(icon: Icons.add, semanticsLabel: 'Zoom in', color: fgColor, bgColor: bgColor, onTap: onZoomIn!), const SizedBox(height: 10), _circleButton( diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 0d3a0efa6..4d83aeca1 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1533,9 +1533,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { void _zoomIn() { if (_sceneMode != 'default') return; // Not implemented for 3D yet final vp = _mapViewController.getCurrentViewpoint(ViewpointType.centerAndScale); - if (vp != null && vp.targetGeometry is ArcGISPoint) { + final isValidPoint = vp != null && vp.targetGeometry is ArcGISPoint; + if (isValidPoint) { _mapViewController.setViewpointAnimated( - Viewpoint.fromCenter(vp.targetGeometry as ArcGISPoint, scale: _currentScale / 2.0), + Viewpoint.fromCenter(vp!.targetGeometry as ArcGISPoint, scale: _currentScale / 2.0), ); } } @@ -1543,9 +1544,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { void _zoomOut() { if (_sceneMode != 'default') return; // Not implemented for 3D yet final vp = _mapViewController.getCurrentViewpoint(ViewpointType.centerAndScale); - if (vp != null && vp.targetGeometry is ArcGISPoint) { + final isValidPoint = vp != null && vp.targetGeometry is ArcGISPoint; + if (isValidPoint) { _mapViewController.setViewpointAnimated( - Viewpoint.fromCenter(vp.targetGeometry as ArcGISPoint, scale: _currentScale * 2.0), + Viewpoint.fromCenter(vp!.targetGeometry as ArcGISPoint, scale: _currentScale * 2.0), ); } } @@ -2077,6 +2079,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final isLayersPanelVisible = _showLayersPanel && _config != null; final isSearchEnabledAndDefault = FeatureFlags.MAP_SEARCH_ENABLED && isDefaultScene && !_hasNetworkError; final shouldShowScaleBar = _sceneMode == 'default' && _selectedResult == null && !shouldShowCatListPanel; + final hasValidResults = _mappedResults.isNotEmpty && !_hasNetworkError; return Scaffold( body: LayoutBuilder( @@ -2135,7 +2138,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), // Hidden Semantics nodes for Map Pins / Graphics - if (_mappedResults.isNotEmpty && !_hasNetworkError && _sceneMode == 'default') + if (hasValidResults && isDefaultScene) Builder( builder: (context) { final List semanticsNodes = []; @@ -2149,7 +2152,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { y: result.latitude, spatialReference: SpatialReference.wgs84, ); - if (mapSr != null && mapPoint.spatialReference != null) { + final hasValidSpatialReference = mapSr != null && mapPoint.spatialReference != null; + if (hasValidSpatialReference) { try { final proj = GeometryEngine.project(mapPoint, outputSpatialReference: mapSr); mapPoint = proj as ArcGISPoint; @@ -2158,10 +2162,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final screenPt = _mapViewController.locationToScreen(mapPoint: mapPoint); // Keep within visible bounds roughly - if (screenPt.dx >= -50 && - screenPt.dy >= -50 && - screenPt.dx <= constraints.maxWidth + 50 && - screenPt.dy <= constraints.maxHeight + 50) { + final isWithinHorizontalBounds = screenPt.dx >= -50 && screenPt.dx <= constraints.maxWidth + 50; + final isWithinVerticalBounds = screenPt.dy >= -50 && screenPt.dy <= constraints.maxHeight + 50; + if (isWithinHorizontalBounds && isWithinVerticalBounds) { semanticsNodes.add( Positioned( left: screenPt.dx - 24, From a34c6f804366292ebfc9a776f843d856f94eb322 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 17:48:20 -0700 Subject: [PATCH 119/139] fixed UI overlap between menus and search results --- .../esrimap_layers_panel.dart | 8 +++-- lib/ui/esrimap/esrimap.dart | 32 ++++++++----------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index 52ab58ede..1781b25db 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -8,6 +8,7 @@ import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_b import 'package:campus_mobile_experimental/core/models/esri_map_models/esrimap_config.dart'; import 'package:campus_mobile_experimental/core/utils/esri_map_feature_flags.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/semantics.dart'; /// Bottom sheet widget rendering basemap choices, layer toggles, and 3D scene mode chips. class EsriMapLayersPanel extends StatelessWidget { @@ -173,8 +174,10 @@ class EsriMapLayersPanel extends StatelessWidget { left: 12, right: 12, bottom: bottomPad + 12, - child: GestureDetector( - onVerticalDragEnd: (details) { + child: Semantics( + sortKey: const OrdinalSortKey(1.8), + child: GestureDetector( + onVerticalDragEnd: (details) { final isSwipeDown = details.velocity.pixelsPerSecond.dy > 200; if (isSwipeDown) onClose(); }, @@ -315,6 +318,7 @@ class EsriMapLayersPanel extends StatelessWidget { ], ), ), + ), ), ); } diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 4d83aeca1..c4fb6f26c 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -2074,11 +2074,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final indexedStackIndex = isBuilding3dScene ? 1 : (isDroneViewScene ? 2 : 0); - final isFabVisible = !_hasNetworkError && !keyboardVisible && !_showLayersPanel; - + final shouldShowScaleBar = _sceneMode == 'default' && _selectedResult == null && !shouldShowCatListPanel; + final isFabVisible = !_hasNetworkError && !keyboardVisible && !_showLayersPanel && _selectedResult == null && !shouldShowCatListPanel; final isLayersPanelVisible = _showLayersPanel && _config != null; final isSearchEnabledAndDefault = FeatureFlags.MAP_SEARCH_ENABLED && isDefaultScene && !_hasNetworkError; - final shouldShowScaleBar = _sceneMode == 'default' && _selectedResult == null && !shouldShowCatListPanel; final hasValidResults = _mappedResults.isNotEmpty && !_hasNetworkError; return Scaffold( @@ -2530,7 +2529,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), // Transit Legend - if (_layerVisible['tritonTransit'] == true) + if (_layerVisible['tritonTransit'] == true && isFabVisible) Positioned( bottom: 24, left: 16, @@ -2595,20 +2594,17 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), ), ), - Semantics( - sortKey: const OrdinalSortKey(1.8), - child: EsriMapLayersPanel( - config: _config!, - currentBasemapType: _currentBasemapType, - currentSceneKey: _sceneMode, - layerVisible: _layerVisible, - layerLoading: _layerLoading, - hideSceneSwitcher: _selectedResult != null || _showCategoryList, - onSwitchBasemap: _switchBasemap, - onSetSceneMode: _setSceneMode, - onToggleLayer: _toggleLayer, - onClose: () => setState(() => _showLayersPanel = false), - ), + EsriMapLayersPanel( + config: _config!, + currentBasemapType: _currentBasemapType, + currentSceneKey: _sceneMode, + layerVisible: _layerVisible, + layerLoading: _layerLoading, + hideSceneSwitcher: _selectedResult != null || _showCategoryList, + onSwitchBasemap: _switchBasemap, + onSetSceneMode: _setSceneMode, + onToggleLayer: _toggleLayer, + onClose: () => setState(() => _showLayersPanel = false), ), ], ], From a6d085e3c79140540f965d1b44afe228ebb2ddb9 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 17:51:15 -0700 Subject: [PATCH 120/139] fixed ui overlap from search bar and legends --- lib/ui/esrimap/esrimap.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index c4fb6f26c..c0384bc53 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -2075,7 +2075,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final indexedStackIndex = isBuilding3dScene ? 1 : (isDroneViewScene ? 2 : 0); final shouldShowScaleBar = _sceneMode == 'default' && _selectedResult == null && !shouldShowCatListPanel; - final isFabVisible = !_hasNetworkError && !keyboardVisible && !_showLayersPanel && _selectedResult == null && !shouldShowCatListPanel; + final isFabVisible = !_hasNetworkError && !keyboardVisible && !_showLayersPanel && _selectedResult == null && !shouldShowCatListPanel && !_showSuggestions && !_showResults; final isLayersPanelVisible = _showLayersPanel && _config != null; final isSearchEnabledAndDefault = FeatureFlags.MAP_SEARCH_ENABLED && isDefaultScene && !_hasNetworkError; final hasValidResults = _mappedResults.isNotEmpty && !_hasNetworkError; From 0d75990b78946348063f3c4991606300eb60580d Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 17:59:57 -0700 Subject: [PATCH 121/139] Improved the UX of the category results list --- .../esrimap_detail_slide_over.dart | 16 +++++------ lib/ui/esrimap/esrimap.dart | 28 ++++++++++++++----- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index eb07005c0..9256ca71d 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -183,15 +183,9 @@ Widget buildDetailSlideOverContent({ } }, child: Padding( - padding: const EdgeInsets.fromLTRB(8, 8, 8, 8), + padding: const EdgeInsets.fromLTRB(16, 8, 8, 8), child: Row( children: [ - IconButton( - icon: const Icon(Icons.arrow_back), - color: isDark ? Colors.white70 : Colors.grey[800], - onPressed: onClose, - tooltip: 'Back', - ), Expanded( child: Semantics( button: true, @@ -200,7 +194,7 @@ Widget buildDetailSlideOverContent({ onTap: onToggle, borderRadius: BorderRadius.circular(8), child: Padding( - padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 12), + padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 8), child: Row( children: [ if (hasHeaderIcon) ...[ @@ -236,6 +230,12 @@ Widget buildDetailSlideOverContent({ ), ), ), + IconButton( + icon: const Icon(Icons.close), + color: isDark ? Colors.white70 : Colors.grey[800], + onPressed: onClose, + tooltip: 'Close details', + ), ], ), ), diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index c0384bc53..9e3868edc 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -2066,7 +2066,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { super.build(context); final isDark = Theme.of(context).brightness == Brightness.dark; final keyboardVisible = MediaQuery.of(context).viewInsets.bottom > 0; - final shouldShowCatListPanel = _showCategoryList && _selectedResult == null && _allCategoryResults.isNotEmpty; + final shouldShowCatListPanel = _showCategoryList && _allCategoryResults.isNotEmpty; final isDefaultScene = _sceneMode == 'default'; final isBuilding3dScene = _sceneMode == 'building3d'; @@ -2537,10 +2537,22 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ), // Selected Result Detail Slide-over - if (_selectedResult != null) - Semantics( - sortKey: const OrdinalSortKey(1.6), - child: LayoutBuilder( + AnimatedSwitcher( + duration: const Duration(milliseconds: 300), + switchInCurve: Curves.easeOutQuart, + switchOutCurve: Curves.easeInQuart, + transitionBuilder: (child, animation) { + final offsetAnimation = Tween( + begin: const Offset(0.0, 1.0), + end: Offset.zero, + ).animate(animation); + return SlideTransition(position: offsetAnimation, child: child); + }, + child: _selectedResult != null + ? Semantics( + key: ValueKey(_selectedResult!.name), + sortKey: const OrdinalSortKey(1.6), + child: LayoutBuilder( builder: (context, constraints) => EsriMapDetailSlideOver( minimizedNotifier: _detailSheetMinimized, availableHeight: constraints.maxHeight, @@ -2578,8 +2590,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { onClose: _closeDetail, onClearRoute: _clearRoute, ), - ), - ), + ), + ) + : const SizedBox.shrink(key: ValueKey('empty_detail')), + ), // Basemap & Operational Layer Selector Panel if (isLayersPanelVisible) ...[ From ee504cb6cffec5682bdf84d1f900e3d6739f5a66 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 18:09:39 -0700 Subject: [PATCH 122/139] added a share location button --- .../esrimap_detail_slide_over.dart | 93 +++++++++++-------- 1 file changed, 55 insertions(+), 38 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index 9256ca71d..233b15faa 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -2,6 +2,7 @@ import 'package:arcgis_maps/arcgis_maps.dart'; import 'package:campus_mobile_experimental/core/models/esri_map_models/map_search_result.dart'; import 'package:campus_mobile_experimental/core/utils/esri_map_feature_flags.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; Widget buildSlideOverContent({ required BuildContext context, @@ -154,19 +155,19 @@ Widget buildDetailSlideOverContent({ IconData? headerIcon, required VoidCallback onClose, required VoidCallback onToggle, + VoidCallback? onShare, required bool isMinimized, Widget? trailing, required List sliverBody, }) { final isDark = Theme.of(context).brightness == Brightness.dark; - final bgColor = isDark ? Colors.grey[900]! : Colors.white; final hasHeaderIcon = headerIcon != null; final hasTrailing = trailing != null; return Material( - elevation: 8, - color: bgColor, + color: isDark ? const Color(0xFF1C1C1E) : Colors.white, borderRadius: const BorderRadius.vertical(top: Radius.circular(16)), + elevation: 16, clipBehavior: Clip.antiAlias, child: Column( mainAxisSize: MainAxisSize.min, @@ -187,49 +188,53 @@ Widget buildDetailSlideOverContent({ child: Row( children: [ Expanded( - child: Semantics( - button: true, - label: isMinimized ? 'Expand details' : 'Collapse details', - child: InkWell( - onTap: onToggle, - borderRadius: BorderRadius.circular(8), - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 8), - child: Row( - children: [ - if (hasHeaderIcon) ...[ - ExcludeSemantics( - child: Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), - ), - const SizedBox(width: 8), - ], - Expanded( - child: Text( - headerTitle, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - color: isDark ? Colors.white : Colors.grey[900], - ), - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), + child: InkWell( + onTap: onToggle, + borderRadius: BorderRadius.circular(8), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 8), + child: Row( + children: [ + if (hasHeaderIcon) ...[ + ExcludeSemantics( + child: Icon(headerIcon, size: 18, color: isDark ? Colors.white70 : Colors.grey[700]), ), - if (hasTrailing && !isMinimized) trailing, const SizedBox(width: 8), - ExcludeSemantics( - child: Icon( - isMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, - size: 24, - color: isDark ? Colors.white70 : Colors.grey[700], + ], + Expanded( + child: Text( + headerTitle, + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + color: isDark ? Colors.white : Colors.grey[900], ), + maxLines: 1, + overflow: TextOverflow.ellipsis, ), - ], - ), + ), + ], ), ), ), ), + if (hasTrailing && !isMinimized) trailing, + if (onShare != null) + IconButton( + icon: const Icon(Icons.share, size: 22), + color: isDark ? Colors.white70 : Colors.grey[800], + onPressed: onShare, + tooltip: 'Share location', + ), + IconButton( + icon: Icon( + isMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, + size: 24, + ), + color: isDark ? Colors.white70 : Colors.grey[700], + onPressed: onToggle, + tooltip: isMinimized ? 'Expand details' : 'Collapse details', + ), IconButton( icon: const Icon(Icons.close), color: isDark ? Colors.white70 : Colors.grey[800], @@ -304,6 +309,17 @@ class EsriMapDetailSlideOver extends StatelessWidget { // Constrain height to a maximum of 50% of screen height final maxHeight = availableHeight * 0.50; + void handleShare() { + final googleMapsUrl = 'https://www.google.com/maps/search/?api=1&query=${result.latitude},${result.longitude}'; + Clipboard.setData(ClipboardData(text: googleMapsUrl)); + ScaffoldMessenger.of(context).showSnackBar( + const SnackBar( + content: Text('Link copied to clipboard!'), + duration: Duration(seconds: 2), + ), + ); + } + return Align( alignment: Alignment.bottomCenter, child: ValueListenableBuilder( @@ -322,6 +338,7 @@ class EsriMapDetailSlideOver extends StatelessWidget { headerIcon: resultIcon, onClose: isRouting ? onClearRoute : onClose, onToggle: () => minimizedNotifier.value = !isMinimized, + onShare: handleShare, isMinimized: isMinimized, trailing: isRouting && !routeFailed ? Padding( From 6b1f1b179ea49bde29e6e9ac53c56d6eaf5d0f3c Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 19:06:54 -0700 Subject: [PATCH 123/139] fixed colors in light and dark theme across all ESRI Map components --- .../esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart | 2 +- .../esri_map_widgets/esrimap_detail_slide_over.dart | 5 +++-- lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart | 4 ++-- lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart | 2 +- lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart | 6 +++--- .../esri_map_widgets/esrimap_suggestions_panel.dart | 4 ++-- lib/ui/esrimap/esrimap.dart | 8 ++++---- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart index 1738ca7ee..0d3d959d4 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_ai_search_sheet.dart @@ -109,7 +109,7 @@ class _EsriAiSearchSheetState extends State { @override Widget build(BuildContext context) { final isDark = Theme.of(context).brightness == Brightness.dark; - final bgColor = isDark ? Colors.grey[900]! : Colors.white; + final bgColor = Theme.of(context).scaffoldBackgroundColor; final textColor = isDark ? Colors.white : Colors.grey[900]!; final subtitleColor = isDark ? Colors.grey[400]! : Colors.grey[600]!; final accent = Theme.of(context).colorScheme.primary; diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index 233b15faa..2e56a8e40 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -16,7 +16,7 @@ Widget buildSlideOverContent({ double headerHeight = 80.0, }) { final isDark = Theme.of(context).brightness == Brightness.dark; - final bgColor = isDark ? Colors.grey[900]! : Colors.white; + final bgColor = Theme.of(context).scaffoldBackgroundColor; final hasHeaderIcon = headerIcon != null; final hasTrailing = trailing != null; @@ -161,11 +161,12 @@ Widget buildDetailSlideOverContent({ required List sliverBody, }) { final isDark = Theme.of(context).brightness == Brightness.dark; + final bgColor = Theme.of(context).scaffoldBackgroundColor; final hasHeaderIcon = headerIcon != null; final hasTrailing = trailing != null; return Material( - color: isDark ? const Color(0xFF1C1C1E) : Colors.white, + color: bgColor, borderRadius: const BorderRadius.vertical(top: Radius.circular(16)), elevation: 16, clipBehavior: Clip.antiAlias, diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart index 679eb9c02..dcc962359 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_fab.dart @@ -71,7 +71,7 @@ class EsriMapFabCluster extends StatelessWidget { @override Widget build(BuildContext context) { - final bgColor = isDark ? Colors.grey[800]! : Colors.white; + final bgColor = Theme.of(context).scaffoldBackgroundColor; final fgColor = isDark ? Colors.white : Colors.grey[800]!; final recenterColor = isRecenterActive ? ACTIVE_COLOR : fgColor; @@ -274,7 +274,7 @@ class EsriMapLocationFab extends StatelessWidget { @override Widget build(BuildContext context) { - final bgColor = isDark ? Colors.grey[800]! : Colors.white; + final bgColor = Theme.of(context).scaffoldBackgroundColor; final fgColor = isDark ? Colors.white : Colors.grey[800]!; final activeBgColor = isDark ? Colors.blue[900]!.withValues(alpha: 0.5) : const Color(0xFFE8F0FE); diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index 1781b25db..870c5fe70 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -60,7 +60,7 @@ class EsriMapLayersPanel extends StatelessWidget { @override Widget build(BuildContext context) { final isDark = Theme.of(context).brightness == Brightness.dark; - final bgColor = isDark ? Colors.grey[900]! : Colors.white; + final bgColor = Theme.of(context).scaffoldBackgroundColor; final textColor = isDark ? Colors.white : Colors.grey[900]!; final subtitleColor = isDark ? Colors.grey[400]! : Colors.grey[600]!; final accent = isDark ? Colors.lightBlue[300]! : Theme.of(context).colorScheme.primary; diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index 921bb7b80..e11acbee4 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -161,7 +161,7 @@ class EsriMapSearchBar extends StatelessWidget { Material( elevation: 4, borderRadius: BorderRadius.circular(8), - color: isDark ? Colors.grey[850] : Colors.white, + color: Theme.of(context).scaffoldBackgroundColor, child: Padding( padding: const EdgeInsets.symmetric(vertical: 4), child: Row( @@ -288,7 +288,7 @@ class EsriMapSearchBar extends StatelessWidget { Material( elevation: 4, borderRadius: BorderRadius.circular(8), - color: isDark ? Colors.grey[850] : Colors.white, + color: Theme.of(context).scaffoldBackgroundColor, child: Row( children: [ Padding( @@ -350,7 +350,7 @@ class EsriMapSearchBar extends StatelessWidget { child: Material( elevation: 4, borderRadius: BorderRadius.circular(8), - color: isDark ? Colors.grey[850] : Colors.white, + color: Theme.of(context).scaffoldBackgroundColor, child: Column( mainAxisSize: MainAxisSize.min, children: [ diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart index 644642956..5c28419f4 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_suggestions_panel.dart @@ -42,7 +42,7 @@ class _EsriMapSuggestionsPanelState extends State { @override Widget build(BuildContext context) { final isDark = Theme.of(context).brightness == Brightness.dark; - final bgColor = isDark ? Colors.grey[850] : Colors.white; + final bgColor = Theme.of(context).scaffoldBackgroundColor; final isFromRouteFieldActive = widget.showRouteFields && widget.activeRouteField == 'from'; final topPadding = isFromRouteFieldActive ? 0.0 : 12.0; final availableHeight = MediaQuery.sizeOf(context).height - MediaQuery.viewInsetsOf(context).bottom; @@ -230,7 +230,7 @@ class _EsriMapSuggestionsPanelState extends State { width: 52, height: 52, decoration: BoxDecoration(color: category.color, shape: BoxShape.circle), - child: Icon(category.icon, size: 22, color: Colors.black), + child: Icon(category.icon, size: 22, color: Theme.of(context).scaffoldBackgroundColor), ), const SizedBox(height: 6), Text( diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 9e3868edc..ff4c649d8 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1300,7 +1300,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { graphic, leaderPosition: LeaderPosition.bottom, style: CalloutStyle( - backgroundColor: isDark ? const Color(0xFF242424) : Colors.white, + backgroundColor: Theme.of(context).scaffoldBackgroundColor, borderColor: isDark ? Colors.white24 : Colors.black26, borderRadius: 12, borderWidth: 0.5, @@ -1997,7 +1997,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Widget _buildTransitLegend() { if (_isTransitLegendLoading) { return Card( - color: Theme.of(context).cardColor.withOpacity(0.9), + color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.9), elevation: 4, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), child: const Padding( @@ -2010,7 +2010,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (_transitLegend.isEmpty) return const SizedBox.shrink(); return Card( - color: Theme.of(context).cardColor.withOpacity(0.9), + color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.9), elevation: 4, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), child: Semantics( @@ -2283,7 +2283,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { width: 24, height: 24, decoration: BoxDecoration( - color: isDark ? const Color(0xFF242424) : Colors.white, + color: Theme.of(context).scaffoldBackgroundColor, shape: BoxShape.circle, boxShadow: const [BoxShadow(color: Colors.black26, blurRadius: 4, offset: Offset(0, 2))], ), From 497b3556dc4639ecae23e38c5d6255736a7dd229 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 19:11:15 -0700 Subject: [PATCH 124/139] fixed triton gpt button color --- lib/ui/navigator/bottom.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/ui/navigator/bottom.dart b/lib/ui/navigator/bottom.dart index 2de5cf2eb..692ad835d 100644 --- a/lib/ui/navigator/bottom.dart +++ b/lib/ui/navigator/bottom.dart @@ -137,7 +137,15 @@ class _BottomTabBarState extends State { color: isSelected ? theme.listTileTheme.selectedColor : Colors.transparent, borderRadius: BorderRadius.circular(34), ), - child: Image.asset(iconAsset, width: 34, height: 34, filterQuality: FilterQuality.high), + child: Image.asset( + iconAsset, + width: 34, + height: 34, + filterQuality: FilterQuality.high, + color: isSelected + ? theme.bottomNavigationBarTheme.selectedItemColor + : theme.bottomNavigationBarTheme.unselectedItemColor, + ), ); } From a13261d45286dcc8198f4f9a8c63e5ac8b5ef193 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 19:18:47 -0700 Subject: [PATCH 125/139] applied a highlight to each button --- .../esrimap_detail_slide_over.dart | 70 ++++++++++++++----- .../esrimap_layers_panel.dart | 23 ++++-- 2 files changed, 68 insertions(+), 25 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index 2e56a8e40..e3a9fc908 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -220,27 +220,61 @@ Widget buildDetailSlideOverContent({ ), ), if (hasTrailing && !isMinimized) trailing, - if (onShare != null) - IconButton( - icon: const Icon(Icons.share, size: 22), - color: isDark ? Colors.white70 : Colors.grey[800], - onPressed: onShare, - tooltip: 'Share location', + if (onShare != null) ...[ + Material( + color: Colors.transparent, + child: InkWell( + customBorder: const CircleBorder(), + onTap: onShare, + child: Container( + width: 32, + height: 32, + decoration: BoxDecoration( + color: isDark ? Colors.grey[800] : Colors.grey[200], + shape: BoxShape.circle, + ), + child: Icon(Icons.share, size: 16, color: isDark ? Colors.white70 : Colors.grey[800]), + ), + ), ), - IconButton( - icon: Icon( - isMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, - size: 24, + const SizedBox(width: 12), + ], + Material( + color: Colors.transparent, + child: InkWell( + customBorder: const CircleBorder(), + onTap: onToggle, + child: Container( + width: 32, + height: 32, + decoration: BoxDecoration( + color: isDark ? Colors.grey[800] : Colors.grey[200], + shape: BoxShape.circle, + ), + child: Icon( + isMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, + size: 20, + color: isDark ? Colors.white70 : Colors.grey[800], + ), + ), ), - color: isDark ? Colors.white70 : Colors.grey[700], - onPressed: onToggle, - tooltip: isMinimized ? 'Expand details' : 'Collapse details', ), - IconButton( - icon: const Icon(Icons.close), - color: isDark ? Colors.white70 : Colors.grey[800], - onPressed: onClose, - tooltip: 'Close details', + const SizedBox(width: 12), + Material( + color: Colors.transparent, + child: InkWell( + customBorder: const CircleBorder(), + onTap: onClose, + child: Container( + width: 32, + height: 32, + decoration: BoxDecoration( + color: isDark ? Colors.grey[800] : Colors.grey[200], + shape: BoxShape.circle, + ), + child: Icon(Icons.close, size: 18, color: isDark ? Colors.white70 : Colors.grey[800]), + ), + ), ), ], ), diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index 870c5fe70..7e5e3777d 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -199,7 +199,7 @@ class EsriMapLayersPanel extends StatelessWidget { children: [ // Map Type Header (with Close Button) Padding( - padding: const EdgeInsets.fromLTRB(16, 14, 8, 8), + padding: const EdgeInsets.fromLTRB(16, 14, 16, 8), child: Row( children: [ Expanded( @@ -208,12 +208,21 @@ class EsriMapLayersPanel extends StatelessWidget { style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: textColor), ), ), - IconButton( - icon: Icon(Icons.close, size: 20, color: subtitleColor), - onPressed: onClose, - tooltip: 'Close map displays menu', - padding: EdgeInsets.zero, - constraints: const BoxConstraints(), + Material( + color: Colors.transparent, + child: InkWell( + customBorder: const CircleBorder(), + onTap: onClose, + child: Container( + width: 32, + height: 32, + decoration: BoxDecoration( + color: Theme.of(context).brightness == Brightness.dark ? Colors.grey[800] : Colors.grey[200], + shape: BoxShape.circle, + ), + child: Icon(Icons.close, size: 18, color: subtitleColor), + ), + ), ), ], ), From 509bf0f90656f4c47a7b21ddd4567da65d09b855 Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Thu, 27 Aug 2026 02:22:41 +0000 Subject: [PATCH 126/139] style: auto fix formatting violations --- .../esrimap_detail_slide_over.dart | 8 +- .../esrimap_layers_panel.dart | 240 +++++++++--------- lib/ui/esrimap/esrimap.dart | 99 ++++---- lib/ui/navigator/bottom.dart | 6 +- 4 files changed, 179 insertions(+), 174 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index e3a9fc908..2f88afa2f 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -347,12 +347,8 @@ class EsriMapDetailSlideOver extends StatelessWidget { void handleShare() { final googleMapsUrl = 'https://www.google.com/maps/search/?api=1&query=${result.latitude},${result.longitude}'; Clipboard.setData(ClipboardData(text: googleMapsUrl)); - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar( - content: Text('Link copied to clipboard!'), - duration: Duration(seconds: 2), - ), - ); + ScaffoldMessenger.of(context) + .showSnackBar(const SnackBar(content: Text('Link copied to clipboard!'), duration: Duration(seconds: 2))); } return Align( diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index 7e5e3777d..f06b2d9dc 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -178,113 +178,81 @@ class EsriMapLayersPanel extends StatelessWidget { sortKey: const OrdinalSortKey(1.8), child: GestureDetector( onVerticalDragEnd: (details) { - final isSwipeDown = details.velocity.pixelsPerSecond.dy > 200; - if (isSwipeDown) onClose(); - }, - child: Material( - elevation: 10, - color: bgColor, - borderRadius: BorderRadius.circular(16), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // Basemap + Layers — grayed out when not in default 2D scene - Opacity( - opacity: isDefault ? 1.0 : 0.35, - child: IgnorePointer( - ignoring: !isDefault, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // Map Type Header (with Close Button) - Padding( - padding: const EdgeInsets.fromLTRB(16, 14, 16, 8), - child: Row( - children: [ - Expanded( - child: Text( - 'Map Type', - style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: textColor), + final isSwipeDown = details.velocity.pixelsPerSecond.dy > 200; + if (isSwipeDown) onClose(); + }, + child: Material( + elevation: 10, + color: bgColor, + borderRadius: BorderRadius.circular(16), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Basemap + Layers — grayed out when not in default 2D scene + Opacity( + opacity: isDefault ? 1.0 : 0.35, + child: IgnorePointer( + ignoring: !isDefault, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Map Type Header (with Close Button) + Padding( + padding: const EdgeInsets.fromLTRB(16, 14, 16, 8), + child: Row( + children: [ + Expanded( + child: Text( + 'Map Type', + style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: textColor), + ), ), - ), - Material( - color: Colors.transparent, - child: InkWell( - customBorder: const CircleBorder(), - onTap: onClose, - child: Container( - width: 32, - height: 32, - decoration: BoxDecoration( - color: Theme.of(context).brightness == Brightness.dark ? Colors.grey[800] : Colors.grey[200], - shape: BoxShape.circle, + Material( + color: Colors.transparent, + child: InkWell( + customBorder: const CircleBorder(), + onTap: onClose, + child: Container( + width: 32, + height: 32, + decoration: BoxDecoration( + color: Theme.of(context).brightness == Brightness.dark + ? Colors.grey[800] + : Colors.grey[200], + shape: BoxShape.circle, + ), + child: Icon(Icons.close, size: 18, color: subtitleColor), ), - child: Icon(Icons.close, size: 18, color: subtitleColor), ), ), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 12), - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: [ - for (final entry in config.basemaps.entries.where((e) { - final t = basemapTypeFromKey(e.key); - var tIsNull = t == null; - if (tIsNull) return false; - var isAlt = FeatureFlags.MAP_ALTERNATE_BASEMAPS_ENABLED; - if (isAlt) return true; - var notLight = t != BasemapType.light; - var notDark = t != BasemapType.dark; - return notLight && notDark; - })) ...[ - imageTile( - label: entry.value.label, - selected: currentBasemapType == basemapTypeFromKey(entry.key), - onTap: () { - final t = basemapTypeFromKey(entry.key); - final isTypeNotNull = t != null; - if (isTypeNotNull) onSwitchBasemap(t); - }, - imageWidget: networkImage(entry.value.thumbnailAsset), - ), - const SizedBox(width: 8), - ], ], ), ), - ), - - if (FeatureFlags.MAP_OPERATIONAL_LAYERS_ENABLED) ...[ - const Divider(height: 24, indent: 16, endIndent: 16), - - sectionLabel('Map Details'), Padding( padding: const EdgeInsets.symmetric(horizontal: 12), child: SingleChildScrollView( scrollDirection: Axis.horizontal, child: Row( children: [ - for (final entry in config.layers.entries.where((e) { - var key = e.key; - var isTransit = key == 'tritonTransit'; - if (isTransit) return FeatureFlags.TRANSIT_OPERATIONAL_LAYER_ENABLED; - var isDist = key == 'campusDistricts'; - if (isDist) return FeatureFlags.DISTRICTS_OPERATIONAL_LAYER_ENABLED; - var isConst = key == 'construction'; - if (isConst) return FeatureFlags.CONSTRUCTION_OPERATIONAL_LAYER_ENABLED; - return true; + for (final entry in config.basemaps.entries.where((e) { + final t = basemapTypeFromKey(e.key); + var tIsNull = t == null; + if (tIsNull) return false; + var isAlt = FeatureFlags.MAP_ALTERNATE_BASEMAPS_ENABLED; + if (isAlt) return true; + var notLight = t != BasemapType.light; + var notDark = t != BasemapType.dark; + return notLight && notDark; })) ...[ imageTile( label: entry.value.label, - selected: layerVisible[entry.key] ?? false, - loading: layerLoading[entry.key] ?? false, - onTap: () => onToggleLayer(entry.key), + selected: currentBasemapType == basemapTypeFromKey(entry.key), + onTap: () { + final t = basemapTypeFromKey(entry.key); + final isTypeNotNull = t != null; + if (isTypeNotNull) onSwitchBasemap(t); + }, imageWidget: networkImage(entry.value.thumbnailAsset), ), const SizedBox(width: 8), @@ -293,41 +261,75 @@ class EsriMapLayersPanel extends StatelessWidget { ), ), ), + + if (FeatureFlags.MAP_OPERATIONAL_LAYERS_ENABLED) ...[ + const Divider(height: 24, indent: 16, endIndent: 16), + + sectionLabel('Map Details'), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 12), + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + for (final entry in config.layers.entries.where((e) { + var key = e.key; + var isTransit = key == 'tritonTransit'; + if (isTransit) return FeatureFlags.TRANSIT_OPERATIONAL_LAYER_ENABLED; + var isDist = key == 'campusDistricts'; + if (isDist) return FeatureFlags.DISTRICTS_OPERATIONAL_LAYER_ENABLED; + var isConst = key == 'construction'; + if (isConst) return FeatureFlags.CONSTRUCTION_OPERATIONAL_LAYER_ENABLED; + return true; + })) ...[ + imageTile( + label: entry.value.label, + selected: layerVisible[entry.key] ?? false, + loading: layerLoading[entry.key] ?? false, + onTap: () => onToggleLayer(entry.key), + imageWidget: networkImage(entry.value.thumbnailAsset), + ), + const SizedBox(width: 8), + ], + ], + ), + ), + ), + ], ], - ], + ), ), ), - ), - // Scene chips — gated by features flag, hidden when slide-over is active - if (showSceneSwitcher) ...[ - const Divider(height: 24, indent: 16, endIndent: 16), - sectionLabel('Scene'), - Padding( - padding: const EdgeInsets.fromLTRB(12, 0, 12, 20), - child: Wrap( - spacing: 8, - children: [ - for (final entry in config.scenes.entries.where((e) { - var key = e.key; - var isDef = key == 'default'; - if (isDef) return FeatureFlags.DEFAULT_SCENE_ENABLED; - var is3d = key == 'building3d'; - if (is3d) return FeatureFlags.THREE_DIMENSIONAL_SCENE_ENABLED; - var isDrone = key == 'droneView'; - if (isDrone) return FeatureFlags.DRONE_VIEW_SCENE_ENABLED; - return true; - })) - sceneChip(entry.key, entry.value.label, currentSceneKey == entry.key), - ], + // Scene chips — gated by features flag, hidden when slide-over is active + if (showSceneSwitcher) ...[ + const Divider(height: 24, indent: 16, endIndent: 16), + sectionLabel('Scene'), + Padding( + padding: const EdgeInsets.fromLTRB(12, 0, 12, 20), + child: Wrap( + spacing: 8, + children: [ + for (final entry in config.scenes.entries.where((e) { + var key = e.key; + var isDef = key == 'default'; + if (isDef) return FeatureFlags.DEFAULT_SCENE_ENABLED; + var is3d = key == 'building3d'; + if (is3d) return FeatureFlags.THREE_DIMENSIONAL_SCENE_ENABLED; + var isDrone = key == 'droneView'; + if (isDrone) return FeatureFlags.DRONE_VIEW_SCENE_ENABLED; + return true; + })) + sceneChip(entry.key, entry.value.label, currentSceneKey == entry.key), + ], + ), ), - ), - ] else - const SizedBox(height: 20), - ], + ] else + const SizedBox(height: 20), + ], + ), ), ), - ), ), ); } diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index ff4c649d8..bcaf34248 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1997,7 +1997,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { Widget _buildTransitLegend() { if (_isTransitLegendLoading) { return Card( - color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.9), + color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.9), elevation: 4, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), child: const Padding( @@ -2075,7 +2075,14 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final indexedStackIndex = isBuilding3dScene ? 1 : (isDroneViewScene ? 2 : 0); final shouldShowScaleBar = _sceneMode == 'default' && _selectedResult == null && !shouldShowCatListPanel; - final isFabVisible = !_hasNetworkError && !keyboardVisible && !_showLayersPanel && _selectedResult == null && !shouldShowCatListPanel && !_showSuggestions && !_showResults; + final isFabVisible = + !_hasNetworkError && + !keyboardVisible && + !_showLayersPanel && + _selectedResult == null && + !shouldShowCatListPanel && + !_showSuggestions && + !_showResults; final isLayersPanelVisible = _showLayersPanel && _config != null; final isSearchEnabledAndDefault = FeatureFlags.MAP_SEARCH_ENABLED && isDefaultScene && !_hasNetworkError; final hasValidResults = _mappedResults.isNotEmpty && !_hasNetworkError; @@ -2549,50 +2556,50 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { return SlideTransition(position: offsetAnimation, child: child); }, child: _selectedResult != null - ? Semantics( - key: ValueKey(_selectedResult!.name), - sortKey: const OrdinalSortKey(1.6), - child: LayoutBuilder( - builder: (context, constraints) => EsriMapDetailSlideOver( - minimizedNotifier: _detailSheetMinimized, - availableHeight: constraints.maxHeight, - result: _selectedResult!, - resultIcon: _iconForResult(_selectedResult!), - isRoutingMode: _isRouting, - hasRoute: _hasRoute, - routeFailed: _routeFailed, - travelMode: _travelMode, - routeTravelTimeMinutes: _routeTravelTimeMinutes, - routeManeuvers: _routeManeuvers, - fromLatLng: _fromLatLng, - onGetDirections: (res) { - final gps = _getUserLatLng(); - final hasGps = gps != null; - _fromController.text = hasGps ? 'My Location' : ''; - _toController.text = res.name; - _routeDestination = res; - _graphicsOverlay.graphics.clear(); - setState(() { - _showRouteFields = true; - _mappedResults = []; - _allCategoryResults = []; - _showCategoryList = false; - _activeCategory = null; - }); - _solveRoute(res); - }, - onTravelModeChanged: (mode) { - final hasSelectedResult = _selectedResult != null; - if (hasSelectedResult) - _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); - }, - onLaunchWebsite: _launchWebsite, - onClose: _closeDetail, - onClearRoute: _clearRoute, - ), - ), - ) - : const SizedBox.shrink(key: ValueKey('empty_detail')), + ? Semantics( + key: ValueKey(_selectedResult!.name), + sortKey: const OrdinalSortKey(1.6), + child: LayoutBuilder( + builder: (context, constraints) => EsriMapDetailSlideOver( + minimizedNotifier: _detailSheetMinimized, + availableHeight: constraints.maxHeight, + result: _selectedResult!, + resultIcon: _iconForResult(_selectedResult!), + isRoutingMode: _isRouting, + hasRoute: _hasRoute, + routeFailed: _routeFailed, + travelMode: _travelMode, + routeTravelTimeMinutes: _routeTravelTimeMinutes, + routeManeuvers: _routeManeuvers, + fromLatLng: _fromLatLng, + onGetDirections: (res) { + final gps = _getUserLatLng(); + final hasGps = gps != null; + _fromController.text = hasGps ? 'My Location' : ''; + _toController.text = res.name; + _routeDestination = res; + _graphicsOverlay.graphics.clear(); + setState(() { + _showRouteFields = true; + _mappedResults = []; + _allCategoryResults = []; + _showCategoryList = false; + _activeCategory = null; + }); + _solveRoute(res); + }, + onTravelModeChanged: (mode) { + final hasSelectedResult = _selectedResult != null; + if (hasSelectedResult) + _solveRoute(_selectedResult!, travelMode: mode, originLatLng: _fromLatLng); + }, + onLaunchWebsite: _launchWebsite, + onClose: _closeDetail, + onClearRoute: _clearRoute, + ), + ), + ) + : const SizedBox.shrink(key: ValueKey('empty_detail')), ), // Basemap & Operational Layer Selector Panel diff --git a/lib/ui/navigator/bottom.dart b/lib/ui/navigator/bottom.dart index 692ad835d..948954ec0 100644 --- a/lib/ui/navigator/bottom.dart +++ b/lib/ui/navigator/bottom.dart @@ -138,9 +138,9 @@ class _BottomTabBarState extends State { borderRadius: BorderRadius.circular(34), ), child: Image.asset( - iconAsset, - width: 34, - height: 34, + iconAsset, + width: 34, + height: 34, filterQuality: FilterQuality.high, color: isSelected ? theme.bottomNavigationBarTheme.selectedItemColor From 7c5a22d58646e98924c7cc5d04dd25ef7be85395 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 20:36:04 -0700 Subject: [PATCH 127/139] Added route toggles --- lib/ui/esrimap/esrimap.dart | 205 +++++++++++++++++++++++++++++------- 1 file changed, 166 insertions(+), 39 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index bcaf34248..3c541a099 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -144,6 +144,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Legend State List _transitLegend = []; Map _transitLegendSwatches = {}; + Map> _transitRouteLayers = {}; + Map _transitRouteVisibility = {}; bool _isTransitLegendLoading = false; bool _isTransitLegendMinimized = false; @@ -557,27 +559,130 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { }); } + void _toggleTransitRoute(String routeName, bool isVisible) { + setState(() { + _transitRouteVisibility[routeName] = isVisible; + }); + + final layers = _transitRouteLayers[routeName] ?? []; + for (final layer in layers) { + final allRoutesForLayer = _transitRouteLayers.entries + .where((e) => e.value.contains(layer)) + .map((e) => e.key) + .toList(); + + if (allRoutesForLayer.length <= 1) { + layer.isVisible = isVisible; + } else { + final visibleRoutes = allRoutesForLayer + .where((r) => _transitRouteVisibility[r] ?? true) + .toList(); + + if (visibleRoutes.isEmpty) { + layer.isVisible = false; + try { + layer.definitionExpression = ''; + } catch (_) {} + } else if (visibleRoutes.length == allRoutesForLayer.length) { + layer.isVisible = true; + try { + layer.definitionExpression = ''; + } catch (_) {} + } else { + layer.isVisible = true; + try { + final renderer = layer.renderer; + if (renderer != null && renderer is UniqueValueRenderer) { + final fieldNames = renderer.fieldNames; + if (fieldNames.isNotEmpty) { + final fieldName = fieldNames.first; + final visibleValues = []; + + for (final uv in renderer.uniqueValues) { + String name = uv.label.trim(); + name = name.replaceAll('Institute of', 'Institution of'); + if (visibleRoutes.contains(name) && uv.values.isNotEmpty) { + final val = uv.values.first; + if (val is String) { + visibleValues.add("'$val'"); + } else { + visibleValues.add("$val"); + } + } + } + + if (visibleValues.isNotEmpty) { + layer.definitionExpression = "$fieldName IN (${visibleValues.join(',')})"; + } + } + } + } catch (e) { + debugPrint('Failed to set definitionExpression: $e'); + } + } + } + } + } + Future _fetchTransitLegendInfos(List instances) async { if (_transitLegend.isNotEmpty) return; if (mounted) setState(() => _isTransitLegendLoading = true); try { final uniqueInfosMap = {}; - for (final layer in instances.whereType()) { - final layerInfos = await layer.fetchLegendInfos(); - for (final info in layerInfos) { - String name = info.name.trim(); - if (name.isEmpty) continue; + final routeLayers = >{}; - // Normalize the SIO typo so the shuttle/line overwrites the pin - name = name.replaceAll('Institute of', 'Institution of'); + Future processContent(dynamic content) async { + if (content is Loadable) { + try { + await (content as Loadable).load(); + } catch (_) {} + } + + bool processedSublayers = false; + + if (content is GroupLayer && content.layers.isNotEmpty) { + for (final sub in content.layers) { + await processContent(sub); + } + processedSublayers = true; + } else if (content is ArcGISMapImageLayer && content.mapImageSublayers.isNotEmpty) { + for (final sub in content.mapImageSublayers) { + await processContent(sub); + } + processedSublayers = true; + } else if (content is ArcGISSublayer && content.sublayers.isNotEmpty) { + for (final sub in content.sublayers) { + await processContent(sub); + } + processedSublayers = true; + } else if (content is LayerContent && content.subLayerContents.isNotEmpty) { + for (final sub in content.subLayerContents) { + await processContent(sub); + } + processedSublayers = true; + } - // By overwriting, we naturally keep the later entries (lines/shuttles) - // instead of the earlier entries (stop pins). - uniqueInfosMap[name] = info; + if (!processedSublayers && content is LayerContent) { + try { + final layerInfos = await content.fetchLegendInfos(); + for (final info in layerInfos) { + String name = info.name.trim(); + if (name.isEmpty) continue; + name = name.replaceAll('Institute of', 'Institution of'); + uniqueInfosMap[name] = info; + routeLayers.putIfAbsent(name, () => []).add(content); + } + } catch (e) { + debugPrint('Failed to fetch legend info for sub-content: $e'); + } } } + for (final layer in instances.whereType()) { + await processContent(layer); + } + final uniqueInfos = uniqueInfosMap.values.toList(); final swatches = {}; @@ -590,6 +695,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { setState(() { _transitLegend = uniqueInfos.where((info) => swatches.containsKey(info.name)).toList(); _transitLegendSwatches = swatches; + _transitRouteLayers = routeLayers; + _transitRouteVisibility = {for (var info in _transitLegend) info.name: true}; }); } } catch (e) { @@ -2013,36 +2120,56 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.9), elevation: 4, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), - child: Semantics( - button: true, - label: _isTransitLegendMinimized ? 'Expand transit routes legend' : 'Collapse transit routes legend', - child: InkWell( - borderRadius: BorderRadius.circular(8), - onTap: () => setState(() => _isTransitLegendMinimized = !_isTransitLegendMinimized), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - ExcludeSemantics( - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - const Text('Transit Routes', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 13)), - const SizedBox(width: 8), - Icon(_isTransitLegendMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, size: 18), - ], + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Semantics( + button: true, + label: _isTransitLegendMinimized ? 'Expand transit routes legend' : 'Collapse transit routes legend', + child: InkWell( + borderRadius: BorderRadius.circular(4), + onTap: () => setState(() => _isTransitLegendMinimized = !_isTransitLegendMinimized), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 4), + child: ExcludeSemantics( + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + const Text('Transit Routes', style: TextStyle(fontWeight: FontWeight.bold, fontSize: 13)), + const SizedBox(width: 8), + Icon(_isTransitLegendMinimized ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, size: 18), + ], + ), ), ), - if (!_isTransitLegendMinimized) ...[ - const SizedBox(height: 6), - for (final info in _transitLegend) - Padding( - padding: const EdgeInsets.only(bottom: 4), + ), + ), + if (!_isTransitLegendMinimized) ...[ + const SizedBox(height: 6), + for (final info in _transitLegend) + InkWell( + onTap: () { + final isVisible = _transitRouteVisibility[info.name] ?? true; + _toggleTransitRoute(info.name, !isVisible); + }, + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 4), + child: Opacity( + opacity: (_transitRouteVisibility[info.name] ?? true) ? 1.0 : 0.5, child: Row( mainAxisSize: MainAxisSize.min, children: [ + Icon( + (_transitRouteVisibility[info.name] ?? true) + ? Icons.check_box + : Icons.check_box_outline_blank, + size: 16, + color: Theme.of(context).colorScheme.primary, + ), + const SizedBox(width: 8), if (_transitLegendSwatches[info.name] != null) ExcludeSemantics( child: RawImage(image: _transitLegendSwatches[info.name], width: 16, height: 16), @@ -2052,10 +2179,10 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ], ), ), - ], - ], - ), - ), + ), + ), + ], + ], ), ), ); From 830a9b810df37e1b28b4ad5824e4373c784c630d Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 20:41:13 -0700 Subject: [PATCH 128/139] fixed colors --- lib/ui/esrimap/esrimap.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 3c541a099..2bd416f58 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -2167,7 +2167,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ? Icons.check_box : Icons.check_box_outline_blank, size: 16, - color: Theme.of(context).colorScheme.primary, + color: Theme.of(context).brightness == Brightness.dark ? Colors.grey[400] : Theme.of(context).colorScheme.primary, ), const SizedBox(width: 8), if (_transitLegendSwatches[info.name] != null) From eb20db64d8a246c0578c2cd4dba5ea9b857f8d00 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 20:49:45 -0700 Subject: [PATCH 129/139] fixed glowing colors --- lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart index f06b2d9dc..d5d56a30f 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_layers_panel.dart @@ -63,7 +63,7 @@ class EsriMapLayersPanel extends StatelessWidget { final bgColor = Theme.of(context).scaffoldBackgroundColor; final textColor = isDark ? Colors.white : Colors.grey[900]!; final subtitleColor = isDark ? Colors.grey[400]! : Colors.grey[600]!; - final accent = isDark ? Colors.lightBlue[300]! : Theme.of(context).colorScheme.primary; + final accent = isDark ? const Color(0xFFFFCD00) : Colors.lightBlue[300]!; Widget sectionLabel(String text) => Padding( padding: const EdgeInsets.fromLTRB(16, 14, 16, 8), From e7247bd1c02fcf2515c0edfe4c0d544493cc269c Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 20:54:21 -0700 Subject: [PATCH 130/139] highlighting more buttons --- .../esri_map_widgets/esrimap_search_bar.dart | 42 +++++++++++++++---- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index e11acbee4..e86231d6d 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -237,14 +237,20 @@ class EsriMapSearchBar extends StatelessWidget { ), ), if (toController.text.isNotEmpty) - SizedBox( - width: 28, - height: 28, - child: IconButton( - padding: EdgeInsets.zero, - icon: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[600]), - onPressed: onClearToField, - tooltip: 'Clear destination location', + Material( + color: Colors.transparent, + child: InkWell( + customBorder: const CircleBorder(), + onTap: onClearToField, + child: Container( + width: 28, + height: 28, + decoration: BoxDecoration( + color: isDark ? Colors.grey[800] : Colors.grey[200], + shape: BoxShape.circle, + ), + child: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[800]), + ), ), ), ], @@ -328,7 +334,25 @@ class EsriMapSearchBar extends StatelessWidget { ), ), if (isSearchNotEmpty) - IconButton(icon: const Icon(Icons.clear), onPressed: onClearSearch, tooltip: 'Clear search'), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 10.0), + child: Material( + color: Colors.transparent, + child: InkWell( + customBorder: const CircleBorder(), + onTap: onClearSearch, + child: Container( + width: 32, + height: 32, + decoration: BoxDecoration( + color: isDark ? Colors.grey[800] : Colors.grey[200], + shape: BoxShape.circle, + ), + child: Icon(Icons.close, size: 18, color: isDark ? Colors.white70 : Colors.grey[800]), + ), + ), + ), + ), if (isAiSearchEnabled) IconButton( icon: Icon( From 1036b9721781a0007cbca986f6754266ae3324ee Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 20:56:38 -0700 Subject: [PATCH 131/139] improved the UI of the to and from bar --- .../esri_map_widgets/esrimap_search_bar.dart | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index e86231d6d..e6aedf543 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -174,9 +174,15 @@ class EsriMapSearchBar extends StatelessWidget { child: Column( mainAxisSize: MainAxisSize.min, children: [ - const Icon(Icons.circle_outlined, size: 12, color: Colors.blue), - Container(width: 1.5, height: 24, color: isDark ? Colors.grey[600] : Colors.grey[300]), - const Icon(Icons.circle, size: 12, color: Colors.red), + Icon(Icons.radio_button_checked, size: 16, color: Colors.blue[600]), + const SizedBox(height: 6), + Icon(Icons.circle, size: 4, color: isDark ? Colors.grey[600] : Colors.grey[400]), + const SizedBox(height: 4), + Icon(Icons.circle, size: 4, color: isDark ? Colors.grey[600] : Colors.grey[400]), + const SizedBox(height: 4), + Icon(Icons.circle, size: 4, color: isDark ? Colors.grey[600] : Colors.grey[400]), + const SizedBox(height: 6), + const Icon(Icons.location_on, size: 20, color: Colors.red), ], ), ), @@ -205,14 +211,20 @@ class EsriMapSearchBar extends StatelessWidget { ), ), if (fromController.text.isNotEmpty) - SizedBox( - width: 28, - height: 28, - child: IconButton( - padding: EdgeInsets.zero, - icon: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[600]), - onPressed: onClearFromField, - tooltip: 'Clear starting location', + Material( + color: Colors.transparent, + child: InkWell( + customBorder: const CircleBorder(), + onTap: onClearFromField, + child: Container( + width: 28, + height: 28, + decoration: BoxDecoration( + color: isDark ? Colors.grey[800] : Colors.grey[200], + shape: BoxShape.circle, + ), + child: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[800]), + ), ), ), ], From dd7aa98066a41c042218bad30e5d187de0ad89f0 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 21:03:21 -0700 Subject: [PATCH 132/139] polished legends --- lib/ui/esrimap/esrimap.dart | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 2bd416f58..aad975f13 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -574,9 +574,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { if (allRoutesForLayer.length <= 1) { layer.isVisible = isVisible; } else { - final visibleRoutes = allRoutesForLayer - .where((r) => _transitRouteVisibility[r] ?? true) - .toList(); + final visibleRoutes = allRoutesForLayer.where((r) => _transitRouteVisibility[r] ?? true).toList(); if (visibleRoutes.isEmpty) { layer.isVisible = false; @@ -638,7 +636,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { await (content as Loadable).load(); } catch (_) {} } - + bool processedSublayers = false; if (content is GroupLayer && content.layers.isNotEmpty) { @@ -1129,8 +1127,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); if (allResults.isEmpty) { - ScaffoldMessenger.of(context) - .showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); } } catch (e) { debugPrint('Category search error: $e'); @@ -1142,8 +1141,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _allCategoryResults = []; _isSearching = false; }); - ScaffoldMessenger.of(context) - .showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); } } @@ -1524,8 +1524,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final gps = await _getDeviceLocationEfficiently(); if (gps == null) { if (mounted) { - ScaffoldMessenger.of(context) - .showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + ScaffoldMessenger.of( + context, + ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } @@ -2167,7 +2168,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { ? Icons.check_box : Icons.check_box_outline_blank, size: 16, - color: Theme.of(context).brightness == Brightness.dark ? Colors.grey[400] : Theme.of(context).colorScheme.primary, + color: Theme.of(context).brightness == Brightness.dark + ? Colors.grey[400] + : Theme.of(context).colorScheme.primary, ), const SizedBox(width: 8), if (_transitLegendSwatches[info.name] != null) @@ -2175,7 +2178,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { child: RawImage(image: _transitLegendSwatches[info.name], width: 16, height: 16), ), const SizedBox(width: 8), - Text('${info.name} route', style: const TextStyle(fontSize: 12)), + Text(info.name, style: const TextStyle(fontSize: 12)), ], ), ), @@ -2665,8 +2668,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { // Transit Legend if (_layerVisible['tritonTransit'] == true && isFabVisible) Positioned( - bottom: 24, - left: 16, + bottom: 16, + left: 8, child: Semantics(sortKey: const OrdinalSortKey(9.0), child: _buildTransitLegend()), ), From f4d731b50105168a4f81df94da5cffab0fe3f735 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 21:08:50 -0700 Subject: [PATCH 133/139] fixed overflow --- lib/ui/notifications/notifications_freefood.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ui/notifications/notifications_freefood.dart b/lib/ui/notifications/notifications_freefood.dart index 9d26c4303..09dd6b6bc 100644 --- a/lib/ui/notifications/notifications_freefood.dart +++ b/lib/ui/notifications/notifications_freefood.dart @@ -56,13 +56,12 @@ class _CheckBoxButtonState extends State { margin: EdgeInsets.only(top: 8.0), child: Row( children: [ - Container( - height: 30, - width: 170, + Expanded( child: AnimatedCrossFade( duration: Duration(milliseconds: 300), crossFadeState: isOverCount ? CrossFadeState.showFirst : CrossFadeState.showSecond, firstChild: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(countText, style: TextStyle(fontSize: 10, color: Colors.red)), Container( @@ -70,12 +69,13 @@ class _CheckBoxButtonState extends State { child: Row( children: [ Icon(Icons.report, color: Colors.grey, size: 15), - Text("There may not be enough food", style: TextStyle(fontSize: 12)), + Expanded( + child: Text("There may not be enough food", style: TextStyle(fontSize: 12)), + ), ], ), ), ], - crossAxisAlignment: CrossAxisAlignment.start, ), secondChild: Align( alignment: Alignment.topLeft, From f8f10e063916129eb44f1c5fef5fc64046395fa6 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 21:17:48 -0700 Subject: [PATCH 134/139] optimized the basemap --- assets/esri_map_assets/mapConfig.json | 2 +- .../esrimap_config_service.dart | 24 +++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/assets/esri_map_assets/mapConfig.json b/assets/esri_map_assets/mapConfig.json index 0f8593814..3e5e36dee 100644 --- a/assets/esri_map_assets/mapConfig.json +++ b/assets/esri_map_assets/mapConfig.json @@ -20,7 +20,7 @@ { "type": "arcgisVectorTiled", "portalKey": "ago", - "itemId": "291da5eab3a0412593b66d384379f89f" + "itemId": "63c47b7177f946b49902c24129b87252" }, { "type": "arcgisVectorTiled", diff --git a/lib/core/services/esri_map_services/esrimap_config_service.dart b/lib/core/services/esri_map_services/esrimap_config_service.dart index 31e55800a..dd2074858 100644 --- a/lib/core/services/esri_map_services/esrimap_config_service.dart +++ b/lib/core/services/esri_map_services/esrimap_config_service.dart @@ -41,21 +41,25 @@ class EsriMapConfigService { /// Fetches map configuration over network, falling back to local asset bundle if offline or failed. Future _doFetch() async { - // 1. Attempt live HTTP GET request from backend API + // 1. Instantly load local configuration JSON from app asset bundle so map opens immediately + final fallbackJson = await rootBundle.loadString(ASSET_FALLBACK_PATH); + _config = EsriMapConfig.fromJson(jsonDecode(fallbackJson) as Map); + + // 2. Fire background network fetch to seamlessly update the cache for later + _fetchRemoteAndUpdateCache(); + + return _config!; + } + + /// Silently fetches configuration over network in the background to update the cache. + Future _fetchRemoteAndUpdateCache() async { try { final response = await http.get(Uri.parse('$BASE_URL/config')).timeout(const Duration(seconds: 5)); - final isResOk = response.statusCode == 200; - if (isResOk) { + if (response.statusCode == 200) { _config = EsriMapConfig.fromJson(jsonDecode(response.body) as Map); - return _config!; } } catch (e) { - debugPrint('Remote map config fetch failed ($e), loading local asset fallback...'); + debugPrint('Background remote map config fetch failed: $e'); } - - // 2. Offline Fallback: Load configuration JSON from local app asset bundle - final fallbackJson = await rootBundle.loadString(ASSET_FALLBACK_PATH); - _config = EsriMapConfig.fromJson(jsonDecode(fallbackJson) as Map); - return _config!; } } From 7fde7077c006973d370671461bf16d0a9320f6dc Mon Sep 17 00:00:00 2001 From: klortiz13 <147196544+klortiz13@users.noreply.github.com> Date: Thu, 27 Aug 2026 04:42:25 +0000 Subject: [PATCH 135/139] style: auto fix formatting violations --- .../esrimap_config_service.dart | 5 ++--- .../esri_map_widgets/esrimap_search_bar.dart | 12 ++++++++++-- lib/ui/esrimap/esrimap.dart | 19 +++++++------------ .../notifications/notifications_freefood.dart | 4 +--- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/core/services/esri_map_services/esrimap_config_service.dart b/lib/core/services/esri_map_services/esrimap_config_service.dart index dd2074858..735f0a1c9 100644 --- a/lib/core/services/esri_map_services/esrimap_config_service.dart +++ b/lib/core/services/esri_map_services/esrimap_config_service.dart @@ -44,7 +44,7 @@ class EsriMapConfigService { // 1. Instantly load local configuration JSON from app asset bundle so map opens immediately final fallbackJson = await rootBundle.loadString(ASSET_FALLBACK_PATH); _config = EsriMapConfig.fromJson(jsonDecode(fallbackJson) as Map); - + // 2. Fire background network fetch to seamlessly update the cache for later _fetchRemoteAndUpdateCache(); @@ -55,9 +55,8 @@ class EsriMapConfigService { Future _fetchRemoteAndUpdateCache() async { try { final response = await http.get(Uri.parse('$BASE_URL/config')).timeout(const Duration(seconds: 5)); - if (response.statusCode == 200) { + if (response.statusCode == 200) _config = EsriMapConfig.fromJson(jsonDecode(response.body) as Map); - } } catch (e) { debugPrint('Background remote map config fetch failed: $e'); } diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart index e6aedf543..8a243b4e9 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_search_bar.dart @@ -223,7 +223,11 @@ class EsriMapSearchBar extends StatelessWidget { color: isDark ? Colors.grey[800] : Colors.grey[200], shape: BoxShape.circle, ), - child: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[800]), + child: Icon( + Icons.close, + size: 16, + color: isDark ? Colors.white70 : Colors.grey[800], + ), ), ), ), @@ -261,7 +265,11 @@ class EsriMapSearchBar extends StatelessWidget { color: isDark ? Colors.grey[800] : Colors.grey[200], shape: BoxShape.circle, ), - child: Icon(Icons.close, size: 16, color: isDark ? Colors.white70 : Colors.grey[800]), + child: Icon( + Icons.close, + size: 16, + color: isDark ? Colors.white70 : Colors.grey[800], + ), ), ), ), diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index aad975f13..9e45dfb02 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -609,9 +609,7 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } - if (visibleValues.isNotEmpty) { - layer.definitionExpression = "$fieldName IN (${visibleValues.join(',')})"; - } + if (visibleValues.isNotEmpty) layer.definitionExpression = "$fieldName IN (${visibleValues.join(',')})"; } } } catch (e) { @@ -1127,9 +1125,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); if (allResults.isEmpty) { - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); } } catch (e) { debugPrint('Category search error: $e'); @@ -1141,9 +1138,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _allCategoryResults = []; _isSearching = false; }); - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); + ScaffoldMessenger.of(context) + .showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); } } @@ -1524,9 +1520,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final gps = await _getDeviceLocationEfficiently(); if (gps == null) { if (mounted) { - ScaffoldMessenger.of( - context, - ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + ScaffoldMessenger.of(context) + .showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } diff --git a/lib/ui/notifications/notifications_freefood.dart b/lib/ui/notifications/notifications_freefood.dart index 09dd6b6bc..8511ce6fb 100644 --- a/lib/ui/notifications/notifications_freefood.dart +++ b/lib/ui/notifications/notifications_freefood.dart @@ -69,9 +69,7 @@ class _CheckBoxButtonState extends State { child: Row( children: [ Icon(Icons.report, color: Colors.grey, size: 15), - Expanded( - child: Text("There may not be enough food", style: TextStyle(fontSize: 12)), - ), + Expanded(child: Text("There may not be enough food", style: TextStyle(fontSize: 12))), ], ), ), From 1236f8aff3623039a755c9e4e4790e1df6961756 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 21:42:53 -0700 Subject: [PATCH 136/139] Revered to a non-labeled basemap. We should create our own custom basemap for version 3 --- assets/esri_map_assets/mapConfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/esri_map_assets/mapConfig.json b/assets/esri_map_assets/mapConfig.json index 3e5e36dee..684b2dd45 100644 --- a/assets/esri_map_assets/mapConfig.json +++ b/assets/esri_map_assets/mapConfig.json @@ -20,7 +20,7 @@ { "type": "arcgisVectorTiled", "portalKey": "ago", - "itemId": "63c47b7177f946b49902c24129b87252" + "itemId": "291da5eab3a0412593b66d384379f89f" }, { "type": "arcgisVectorTiled", @@ -167,4 +167,4 @@ "color": "#FC8900" } ] -} \ No newline at end of file +} From b28e899282328ad12e78960fa6da15b358118570 Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Wed, 26 Aug 2026 21:45:41 -0700 Subject: [PATCH 137/139] fixed violations --- lib/ui/esrimap/esrimap.dart | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index 9e45dfb02..ca8335bee 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -599,7 +599,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { for (final uv in renderer.uniqueValues) { String name = uv.label.trim(); name = name.replaceAll('Institute of', 'Institution of'); - if (visibleRoutes.contains(name) && uv.values.isNotEmpty) { + var isRouteVisible = visibleRoutes.contains(name); + var hasUvValues = uv.values.isNotEmpty; + if (isRouteVisible && hasUvValues) { final val = uv.values.first; if (val is String) { visibleValues.add("'$val'"); @@ -609,7 +611,8 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { } } - if (visibleValues.isNotEmpty) layer.definitionExpression = "$fieldName IN (${visibleValues.join(',')})"; + var hasVisibleValues = visibleValues.isNotEmpty; + if (hasVisibleValues) layer.definitionExpression = "$fieldName IN (${visibleValues.join(',')})"; } } } catch (e) { @@ -637,22 +640,27 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { bool processedSublayers = false; - if (content is GroupLayer && content.layers.isNotEmpty) { + var isGroupLayerWithLayers = content is GroupLayer && content.layers.isNotEmpty; + var isMapImageLayerWithSublayers = content is ArcGISMapImageLayer && content.mapImageSublayers.isNotEmpty; + var isArcGISSublayerWithSublayers = content is ArcGISSublayer && content.sublayers.isNotEmpty; + var isLayerContentWithSublayers = content is LayerContent && content.subLayerContents.isNotEmpty; + + if (isGroupLayerWithLayers) { for (final sub in content.layers) { await processContent(sub); } processedSublayers = true; - } else if (content is ArcGISMapImageLayer && content.mapImageSublayers.isNotEmpty) { + } else if (isMapImageLayerWithSublayers) { for (final sub in content.mapImageSublayers) { await processContent(sub); } processedSublayers = true; - } else if (content is ArcGISSublayer && content.sublayers.isNotEmpty) { + } else if (isArcGISSublayerWithSublayers) { for (final sub in content.sublayers) { await processContent(sub); } processedSublayers = true; - } else if (content is LayerContent && content.subLayerContents.isNotEmpty) { + } else if (isLayerContentWithSublayers) { for (final sub in content.subLayerContents) { await processContent(sub); } From 5c0d8729aa1cbe8746be763740eaaf28ca73ae8e Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Fri, 6 Nov 2026 18:00:57 -0800 Subject: [PATCH 138/139] fixed dependencies --- .../esrimap_detail_slide_over.dart | 5 +- lib/ui/esrimap/esrimap.dart | 15 +- pubspec.lock | 228 +++++++++++++++++- test/ui/esrimap/esrimap_scale_bar_test.dart | 41 +--- 4 files changed, 235 insertions(+), 54 deletions(-) diff --git a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart index 2f88afa2f..6a207821e 100644 --- a/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart +++ b/lib/ui/esrimap/esri_map_widgets/esrimap_detail_slide_over.dart @@ -347,8 +347,9 @@ class EsriMapDetailSlideOver extends StatelessWidget { void handleShare() { final googleMapsUrl = 'https://www.google.com/maps/search/?api=1&query=${result.latitude},${result.longitude}'; Clipboard.setData(ClipboardData(text: googleMapsUrl)); - ScaffoldMessenger.of(context) - .showSnackBar(const SnackBar(content: Text('Link copied to clipboard!'), duration: Duration(seconds: 2))); + ScaffoldMessenger.of( + context, + ).showSnackBar(const SnackBar(content: Text('Link copied to clipboard!'), duration: Duration(seconds: 2))); } return Align( diff --git a/lib/ui/esrimap/esrimap.dart b/lib/ui/esrimap/esrimap.dart index ca8335bee..cbe939a61 100644 --- a/lib/ui/esrimap/esrimap.dart +++ b/lib/ui/esrimap/esrimap.dart @@ -1133,8 +1133,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _isSearching = false; }); if (allResults.isEmpty) { - ScaffoldMessenger.of(context) - .showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('No ${category.label.toLowerCase()} locations found.'))); } } catch (e) { debugPrint('Category search error: $e'); @@ -1146,8 +1147,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { _allCategoryResults = []; _isSearching = false; }); - ScaffoldMessenger.of(context) - .showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text("Couldn't load ${category.label.toLowerCase()} locations."))); } } @@ -1528,8 +1530,9 @@ class _EsriMapState extends State with AutomaticKeepAliveClientMixin { final gps = await _getDeviceLocationEfficiently(); if (gps == null) { if (mounted) { - ScaffoldMessenger.of(context) - .showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); + ScaffoldMessenger.of( + context, + ).showSnackBar(const SnackBar(content: Text('Unable to get your current location.'))); } return; } diff --git a/pubspec.lock b/pubspec.lock index cea49646f..913b933cd 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -33,6 +33,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.5.1" + arcgis_maps: + dependency: "direct main" + description: + name: arcgis_maps + sha256: "6eda8e19a5580b40c58c39134edfa6e90b649d97298460b31f006457f6fbeaf5" + url: "https://pub.dev" + source: hosted + version: "300.0.0+4935" args: dependency: transitive description: @@ -169,6 +177,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.2" + code_assets: + dependency: transitive + description: + name: code_assets + sha256: "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687" + url: "https://pub.dev" + source: hosted + version: "1.0.0" code_builder: dependency: transitive description: @@ -241,14 +257,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.11" + desktop_webview_window: + dependency: transitive + description: + name: desktop_webview_window + sha256: "20c3ac0f0404f72a0ce76f6f729f4dc656c04747f42e0a38d9553855b1d6012e" + url: "https://pub.dev" + source: hosted + version: "0.3.2" device_info_plus: dependency: "direct main" description: name: device_info_plus - sha256: "98f28b42168cc509abc92f88518882fd58061ea372d7999aecc424345c7bff6a" + sha256: b4fed1b2835da9d670d7bed7db79ae2a94b0f5ad6312268158a9b5479abbacdd url: "https://pub.dev" source: hosted - version: "11.5.0" + version: "12.4.0" device_info_plus_platform_interface: dependency: transitive description: @@ -265,6 +289,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.9.0" + dio_cache_interceptor: + dependency: transitive + description: + name: dio_cache_interceptor + sha256: "9472f9f3dcaa384ae68e60606c1d04e6314dea5eab39f18d94ff9b0a300dbbe4" + url: "https://pub.dev" + source: hosted + version: "4.0.7" dio_web_adapter: dependency: transitive description: @@ -281,6 +313,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.1" + drift: + dependency: transitive + description: + name: drift + sha256: "3179e7323b36d1852b42997b92ac72e8abcb61b1d58cfa8c6da9b540ab02a540" + url: "https://pub.dev" + source: hosted + version: "2.35.3" encrypt: dependency: "direct main" description: @@ -548,6 +588,22 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_web_auth_2: + dependency: transitive + description: + name: flutter_web_auth_2 + sha256: a7655829251ee63aae64a748f8512f36670d8eba4657b0055cdf5ef304a9d164 + url: "https://pub.dev" + source: hosted + version: "5.1.0" + flutter_web_auth_2_platform_interface: + dependency: transitive + description: + name: flutter_web_auth_2_platform_interface + sha256: ba0fbba55bffb47242025f96852ad1ffba34bc451568f56ef36e613612baffab + url: "https://pub.dev" + source: hosted + version: "5.0.0" flutter_web_plugins: dependency: transitive description: flutter @@ -561,22 +617,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.0" + geoclue: + dependency: transitive + description: + name: geoclue + sha256: c2a998c77474fc57aa00c6baa2928e58f4b267649057a1c76738656e9dbd2a7f + url: "https://pub.dev" + source: hosted + version: "0.1.1" geolocator: dependency: "direct main" description: name: geolocator - sha256: f62bcd90459e63210bbf9c35deb6a51c521f992a78de19a1fe5c11704f9530e2 + sha256: "79939537046c9025be47ec645f35c8090ecadb6fe98eba146a0d25e8c1357516" url: "https://pub.dev" source: hosted - version: "13.0.4" + version: "14.0.2" geolocator_android: dependency: transitive description: name: geolocator_android - sha256: fcb1760a50d7500deca37c9a666785c047139b5f9ee15aa5469fae7dbbe3170d + sha256: "70880ea8f995eb1783896a001e257315cffa9fb84db487825806ff37101b61eb" url: "https://pub.dev" source: hosted - version: "4.6.2" + version: "5.0.4" geolocator_apple: dependency: transitive description: @@ -585,6 +649,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.13" + geolocator_linux: + dependency: transitive + description: + name: geolocator_linux + sha256: d64112a205931926f4363bb6bd48f14cb38e7326833041d170615586cd143797 + url: "https://pub.dev" + source: hosted + version: "0.2.4" geolocator_platform_interface: dependency: transitive description: @@ -689,6 +761,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" + gsettings: + dependency: transitive + description: + name: gsettings + sha256: "1b0ce661f5436d2db1e51f3c4295a49849f03d304003a7ba177d01e3a858249c" + url: "https://pub.dev" + source: hosted + version: "0.2.8" gtk: dependency: transitive description: @@ -697,6 +777,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" + haptic_feedback: + dependency: transitive + description: + name: haptic_feedback + sha256: c6b7ce370f17142cd6df1ed29add2cf50393aa967d9c5638e6fb7dbeff7414ec + url: "https://pub.dev" + source: hosted + version: "0.6.5" hive: dependency: "direct main" description: @@ -721,6 +809,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.3" + hooks: + dependency: transitive + description: + name: hooks + sha256: "025f060e86d2d4c3c47b56e33caf7f93bf9283340f26d23424ebcfccf34f621e" + url: "https://pub.dev" + source: hosted + version: "1.0.3" html: dependency: transitive description: @@ -737,6 +833,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.0" + http_cache_core: + dependency: transitive + description: + name: http_cache_core + sha256: d6de4ca6680e70f4eacd79e073d6a73734eb1da86305409e495adfabf404eddf + url: "https://pub.dev" + source: hosted + version: "1.1.4" + http_cache_drift_store: + dependency: transitive + description: + name: http_cache_drift_store + sha256: "48449b49030b053eee7416643aee89cb1ec6c0d232a97b95a4845611b0bf8d03" + url: "https://pub.dev" + source: hosted + version: "7.0.1" http_multi_server: dependency: transitive description: @@ -825,6 +937,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.0" + logger: + dependency: transitive + description: + name: logger + sha256: "2a0dc097e7b01d942475bdd552356db2d0f768b05540bd4b2b53f1840f2239a7" + url: "https://pub.dev" + source: hosted + version: "2.8.0" logging: dependency: transitive description: @@ -881,6 +1001,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" + mutex: + dependency: transitive + description: + name: mutex + sha256: "8827da25de792088eb33e572115a5eb0d61d61a3c01acbc8bcbe76ed78f1a1f2" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + native_toolchain_c: + dependency: transitive + description: + name: native_toolchain_c + sha256: "8aaead321425bd3f03bd5894aa27c8ea6993eab95531da7e59f5d39c6e5708ec" + url: "https://pub.dev" + source: hosted + version: "0.18.0" nested: dependency: transitive description: @@ -909,10 +1045,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "16eee997588c60225bda0488b6dcfac69280a6b7a3cf02c741895dd370a02968" + sha256: "468c26b4254ab01979fa5e4a98cb343ea3631b9acee6f21028997419a80e1a20" url: "https://pub.dev" source: hosted - version: "8.3.1" + version: "9.0.1" package_info_plus_platform_interface: dependency: transitive description: @@ -993,6 +1129,54 @@ packages: url: "https://pub.dev" source: hosted version: "4.2.5" + permission_handler: + dependency: "direct main" + description: + name: permission_handler + sha256: fe54465bcc62a4564c6e4db337bbaded6c0c0fa6e10487414436d163114784f6 + url: "https://pub.dev" + source: hosted + version: "12.0.3" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + sha256: "1e3bc410ca1bf84662104b100eb126e066cb55791b7451307f9708d4007350e6" + url: "https://pub.dev" + source: hosted + version: "13.0.1" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: "82d31c9b321c45785ccd73bce9c63af17037116193b4000b998a4363059adb6e" + url: "https://pub.dev" + source: hosted + version: "9.6.5" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "6ea98b3f17f60d3b527f2647ed2ab4dc0f6bfe25b22cb1c363f5d8f62252f6ac" + url: "https://pub.dev" + source: hosted + version: "0.1.4+1" + permission_handler_platform_interface: + dependency: transitive + description: + name: permission_handler_platform_interface + sha256: ed86a61c190258fdd65de395ea0632822e3415c1faec38eae0c31b479c28a531 + url: "https://pub.dev" + source: hosted + version: "4.4.1" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: "210031f00c32d61038fb4175d82dd874a426bfbae2c2af774bd4e5abb5cac755" + url: "https://pub.dev" + source: hosted + version: "0.2.4" petitparser: dependency: transitive description: @@ -1021,10 +1205,10 @@ packages: dependency: "direct main" description: name: pointycastle - sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe" + sha256: "92aa3841d083cc4b0f4709b5c74fd6409a3e6ba833ffc7dc6a8fee096366acf5" url: "https://pub.dev" source: hosted - version: "3.9.1" + version: "4.0.0" pool: dependency: transitive description: @@ -1065,6 +1249,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.2" + record_use: + dependency: transitive + description: + name: record_use + sha256: "2551bd8eecfe95d14ae75f6021ad0248be5c27f138c2ec12fcb52b500b3ba1ed" + url: "https://pub.dev" + source: hosted + version: "0.6.0" sanitize_html: dependency: transitive description: @@ -1174,6 +1366,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.1" + sqlite3: + dependency: transitive + description: + name: sqlite3 + sha256: "4c7fe79840389aaeaf05fd093f795b631b5a98e2bd28d54e555c100f4a9c7a1c" + url: "https://pub.dev" + source: hosted + version: "3.5.2" stack_trace: dependency: transitive description: @@ -1463,6 +1663,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" + window_to_front: + dependency: transitive + description: + name: window_to_front + sha256: "14fad8984db4415e2eeb30b04bb77140b180e260d6cb66b26de126a8657a9241" + url: "https://pub.dev" + source: hosted + version: "0.0.4" xdg_directories: dependency: transitive description: diff --git a/test/ui/esrimap/esrimap_scale_bar_test.dart b/test/ui/esrimap/esrimap_scale_bar_test.dart index 608ab888a..1d53c5525 100644 --- a/test/ui/esrimap/esrimap_scale_bar_test.dart +++ b/test/ui/esrimap/esrimap_scale_bar_test.dart @@ -8,15 +8,7 @@ void main() { group('EsriMapScaleBar Widget Tests', () { testWidgets('renders imperial and metric units when autoFade is false', (tester) async { await tester.pumpWidget( - const MaterialApp( - home: Scaffold( - body: EsriMapScaleBar( - scale: 24000.0, - isDark: false, - autoFade: false, - ), - ), - ), + const MaterialApp(home: Scaffold(body: EsriMapScaleBar(scale: 24000.0, isDark: false, autoFade: false))), ); expect(find.byType(EsriMapScaleBar), findsOneWidget); @@ -25,15 +17,7 @@ void main() { testWidgets('renders close-up zoom scale (e.g. 500)', (tester) async { await tester.pumpWidget( - const MaterialApp( - home: Scaffold( - body: EsriMapScaleBar( - scale: 500.0, - isDark: false, - autoFade: false, - ), - ), - ), + const MaterialApp(home: Scaffold(body: EsriMapScaleBar(scale: 500.0, isDark: false, autoFade: false))), ); expect(find.byType(EsriMapScaleBar), findsOneWidget); @@ -50,15 +34,8 @@ void main() { home: Scaffold( body: Column( children: [ - EsriMapScaleBar( - scale: currentScale, - autoFade: true, - fadeDelay: const Duration(milliseconds: 500), - ), - ElevatedButton( - onPressed: () => setState(() => currentScale = 12000.0), - child: const Text('Zoom'), - ), + EsriMapScaleBar(scale: currentScale, autoFade: true, fadeDelay: const Duration(milliseconds: 500)), + ElevatedButton(onPressed: () => setState(() => currentScale = 12000.0), child: const Text('Zoom')), ], ), ), @@ -92,15 +69,7 @@ void main() { testWidgets('returns SizedBox.shrink when scale is 0 or negative', (tester) async { await tester.pumpWidget( - const MaterialApp( - home: Scaffold( - body: EsriMapScaleBar( - scale: 0.0, - isDark: false, - autoFade: false, - ), - ), - ), + const MaterialApp(home: Scaffold(body: EsriMapScaleBar(scale: 0.0, isDark: false, autoFade: false))), ); expect(find.text('ft'), findsNothing); From 5b1ad69cb4518724128bba4c9f59d696861db4ce Mon Sep 17 00:00:00 2001 From: klortiz13 Date: Fri, 6 Nov 2026 18:09:23 -0800 Subject: [PATCH 139/139] fixed precommit error --- .github/workflows/pre_commit_check.yml | 8 +++++++- test/ui/esrimap/esrimap_search_bar_test.dart | 6 ++---- test/ui/esrimap/esrimap_suggestions_panel_test.dart | 5 ++++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pre_commit_check.yml b/.github/workflows/pre_commit_check.yml index a35a92c03..c02ac7d68 100644 --- a/.github/workflows/pre_commit_check.yml +++ b/.github/workflows/pre_commit_check.yml @@ -13,8 +13,14 @@ env: jobs: precommit: - runs-on: ubuntu-latest + # ArcGIS Maps' native build hook rejects Linux before Flutter tests start. + # Its test-host hook supports Windows, while production builds remain + # limited to the Android and iOS targets declared by the package. + runs-on: windows-latest timeout-minutes: 20 + defaults: + run: + shell: bash steps: - name: Check out code uses: actions/checkout@v4 diff --git a/test/ui/esrimap/esrimap_search_bar_test.dart b/test/ui/esrimap/esrimap_search_bar_test.dart index d1778df3e..dc6308eb3 100644 --- a/test/ui/esrimap/esrimap_search_bar_test.dart +++ b/test/ui/esrimap/esrimap_search_bar_test.dart @@ -60,12 +60,10 @@ void main() { final indicator = tester.widget(find.byType(CircularProgressIndicator)); final searchField = tester.widget(find.byType(TextField)); - final hintPadding = searchField.decoration!.hint! as Padding; - final hintText = hintPadding.child as Text; expect(indicator.semanticsLabel, 'Searching'); expect(indicator.color, searchField.style?.color); - expect(hintPadding.padding, const EdgeInsets.only(left: 4)); - expect(hintText.style?.fontSize, searchField.style?.fontSize); + expect(searchField.decoration?.hintText, 'Search buildings, places...'); + expect(searchField.decoration?.hintStyle?.fontSize, searchField.style?.fontSize); expect(find.byIcon(Icons.search), findsNothing); expect(find.text('No results found'), findsNothing); }); diff --git a/test/ui/esrimap/esrimap_suggestions_panel_test.dart b/test/ui/esrimap/esrimap_suggestions_panel_test.dart index 7ec36b7c0..15c524e32 100644 --- a/test/ui/esrimap/esrimap_suggestions_panel_test.dart +++ b/test/ui/esrimap/esrimap_suggestions_panel_test.dart @@ -50,7 +50,10 @@ void main() { await tester.tap(find.byTooltip('Search Dining')); expect(selectedCategory, same(category)); - expect(find.byType(ListView), findsNothing); + expect( + find.byWidgetPredicate((widget) => widget is ListView && widget.scrollDirection == Axis.horizontal), + findsNothing, + ); expect( tester.getRect(find.byTooltip('Search Recreation')).right, lessThanOrEqualTo(tester.getRect(find.byType(Scaffold)).right),