Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 17, 2026

Implements interactive map visualization of radiation readings with GPS coordinates, allowing spatial analysis of dose/count rate data during mobile surveys.

Implementation

MapCardView - Custom view encapsulating Google Maps with radiation-specific overlays

  • Color-coded circle markers (green→yellow→red gradient by normalized value)
  • Metric selector: dose rate (μSv/h) or count rate (cps)
  • Dynamic legend with auto-scaling min/max bounds
  • Per-device reading isolation (up to 1000 readings cached)

Data Layer - Extended Prefs with GPS-coordinate storage

data class MapReading(
    val latitude: Double,
    val longitude: Double,
    val uSvPerHour: Float,
    val cps: Float,
    val timestampMs: Long
)

Serialized as: timestamp,lat,lon,dose,cps semicolon-separated in SharedPreferences

Integration - MainActivity UI loop polls FusedLocationProvider on each reading, stores MapReading atomically, updates map markers

Styling - Dark map theme JSON (map_style_dark.json) matches app palette (#1A1A1E backgrounds, #2A2A2E borders)

Dependencies

  • play-services-maps:18.2.0
  • play-services-location:21.1.0

Requires ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION permissions. Includes development Maps API key (restrict for production).

Layout

Map card inserted in dashboard between CPS chart and isotope panel. 300dp fixed height, full width, standard 12dp card padding.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx2g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.6-bin/afr5mpiioh2wthjmwnkmdsd5w/gradle-8.6/lib/gradle-launcher-8.6.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.6-bin/afr5mpiioh2wthjmwnkmdsd5w/gradle-8.6/lib/agents/gradle-instrumentation-agent-8.6.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.6 (dns block)
    • Triggering command: /usr/bin/curl curl -I REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Go code the live map view on dashboard. it's in the issues everything you need. all the details are in the issues so go pull that issue. create a branch code it all out.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI and others added 3 commits January 17, 2026 15:48
- Added Google Maps SDK dependencies
- Added location permissions (ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION)
- Created MapCardView custom component with map, metric selector, legend, and reset
- Added map reading storage with GPS coordinates to Prefs
- Integrated map card into MainActivity dashboard
- Map automatically tracks readings with GPS location
- Dynamic legend shows min/max values with color gradient
- Reset button clears map readings
- Dark map theme matching app design

Co-authored-by: darkmatter2222 <25397045+darkmatter2222@users.noreply.github.com>
Build environment limitation: Network access to dl.google.com is restricted in this environment, preventing Gradle from downloading Android build tools. The code is complete and ready for local build and testing.

Testing instructions added for map feature validation.

Co-authored-by: darkmatter2222 <25397045+darkmatter2222@users.noreply.github.com>
- Added detailed MAP_FEATURE.md documentation
- Updated README with map feature in features list
- Documented all components, data structures, and usage flow
- Added testing checklist and known limitations
- Listed future enhancement ideas

Co-authored-by: darkmatter2222 <25397045+darkmatter2222@users.noreply.github.com>
Copilot AI changed the title [WIP] Add live map view to dashboard Add live GPS-tracked radiation map to dashboard Jan 17, 2026
Copilot AI requested a review from darkmatter2222 January 17, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants