flutter_map_compass 1.0.2 copy "flutter_map_compass: ^1.0.2" to clipboard
flutter_map_compass: ^1.0.2 copied to clipboard

A simple compass for flutter_map. It shows the rotation of the map and resets the rotation back to 0 when tapped.

flutter_map_compass #

A simple compass for flutter_map. It shows the rotation of the map and resets the rotation back to 0 when tapped.

Pub Version likes Pub Points Pub Popularity

GitHub last commit stars GitHub issues codecov

Example screenshot

Getting started #

Add the following packages to your pubspec.yaml file:

dependencies:
  flutter_map: ^6.0.0         # in case you don't have it yet 
  flutter_map_compass: ^1.0.0 # this package

Usage #

@override
Widget build(BuildContext context) {
  return FlutterMap(
    options: MapOptions(),
    children: [
      TileLayer(
        urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
      ),

      // use the default compass that is based on the cupertino compass icon
      const MapCompass.cupertino(
        hideIfRotatedNorth: true,
      ),

      // Or use the primary constructor to customize all
      const MapCompass(
        icon: Icon(Icons.arrow_upward),
        hideIfRotatedNorth: true,
      ),
    ],
  );
}

Additional information #

If you need help you can open an issue or join the flutter_map discord server.

4
likes
140
pub points
78%
popularity

Publisher

verified publisherjoscha-eckert.de

A simple compass for flutter_map. It shows the rotation of the map and resets the rotation back to 0 when tapped.

Repository (GitHub)
View/report issues

Topics

#flutter-map #map

Documentation

API reference

License

MIT (LICENSE)

Dependencies

cupertino_icons, flutter, flutter_map

More

Packages that depend on flutter_map_compass