Skip to content

Conversation

@nathan01100010
Copy link

In response to #308 [Feature] Migrating from Google Maps to maplibre/flutter-maplibre-gl

Changes

  • Map widget now uses maplibre_gl map controller instead of Google Maps map controller
  • Map is now styled (partially) such that it matches NavigaTUM (base styling now uses Martin, but additional layers have not been added)
  • Geolocation button is now in the top left instead of bottom right
  • The privacy policy is no longer incomplete in this regard (Google Maps usage was not mentioned)

Byproducts

  • Two additional assets
  • One additional dependency (maplibre_gl)
  • Changed ndkVersion for Android app build
  • One additional dependency override
  • pubspec.lock now has upgraded dependencies unrelated to new dependency

Known degradations

  • Map is no longer rectangular when above the other page elements and square when below the other page elements; it is always square.
  • Dark mode is no longer implemented for the map. This feature will require collaboration with the NavigaTUM team.
  • Map no longer smooth scrolls to selected elements
  • Pin labels are much uglier
  • Pin labels do not disappear when clicking off one pin but not onto another, they remain until the another pin is selected
  • Cafeteria markers are no longer a different color from the other markers when displayed as a group (was this intentional? It's not done for study rooms)

Future features

  • Additional layers including floors to better match NavigaTUM
  • Suggestion of NavigaTUM when user requests to navigate to a place
  • Completely removing google_maps_flutter, including offline components, by transitioning away from usage of google_maps_flutter defined objects being put through a translation layer in favor of natively defined maplibre_gl objects

Example photos

Screenshot 2025-11-23 at 3 24 55 PM Screenshot 2025-11-23 at 3 25 23 PM Screenshot 2025-11-23 at 3 26 02 PM Screenshot 2025-11-23 at 3 26 28 PM

@kordianbruck
Copy link
Member

This is pretty incredible, thanks Nathan! (FYI @CommanderStorm)

CommanderStorm
CommanderStorm previously approved these changes Nov 24, 2025
Copy link
Member

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

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

Really nice work and thanks a ton for tackling this problem!

I have added a code comments below regarding the camera usage and a few comments.
Other than that LGTM

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
Copy link
Member

Choose a reason for hiding this comment

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

Completely removing google_maps_flutter, including offline components, by transitioning away from usage of google_maps_flutter defined objects being put through a translation layer in favor of natively defined maplibre_gl objects

If you think this is a better way, I will go with that.
I have not looked how much work that would be 😅

Copy link
Author

Choose a reason for hiding this comment

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

I think long term it would be preferable to have fewer dependencies but it breaks the containment of the map widget itself so it's quite a lot of effort. Ultimately the only true impact is a file size difference and probably a few microseconds.

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.

3 participants