0 purchases
flutter map compass
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.
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
copied to clipboard
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,
),
],
);
}
copied to clipboard
Additional information #
If you need help you
can open an issue
or join
the flutter_map discord server.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.