Skip to content

Commit

Permalink
update docs and add screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
josxha committed Feb 9, 2024
1 parent 20e8936 commit 71724fc
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 16 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ storage backend you would possibly want.
and flutter_map.
- Support for tile cancellation

### [flutter_map_compass](https://pub.dev/packages/flutter_map_compass)

[![Pub Version](https://img.shields.io/pub/v/flutter_map_compass)](https://pub.dev/packages/flutter_map_compass)
[![likes](https://img.shields.io/pub/likes/flutter_map_compass?logo=flutter)](https://pub.dev/packages/flutter_map_compass)
[![Pub Popularity](https://img.shields.io/pub/popularity/flutter_map_compass)](https://pub.dev/packages/flutter_map_compass)

A compass for flutter_map that indicates the map rotation. It rotates the map
back to north on top on click.

### [flutter_map_pmtiles](https://pub.dev/packages/flutter_map_pmtiles)

[![Pub Version](https://img.shields.io/pub/v/flutter_map_pmtiles)](https://pub.dev/packages/flutter_map_pmtiles)
Expand Down
12 changes: 6 additions & 6 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ class SelectionPage extends StatelessWidget {
'tile layers.',
routeName: 'flutter_map_cache',
),
SelectionItemWidget(
title: 'flutter_map_compass',
desc: 'A simple compass layer to indicate the map rotation and '
'reset the rotation on click',
routeName: 'flutter_map_compass',
),
SelectionItemWidget(
title: 'flutter_map_pmtiles',
desc: 'PMTiles for flutter_map',
Expand All @@ -57,12 +63,6 @@ class SelectionPage extends StatelessWidget {
desc: 'PMTiles for vector_map_files / flutter_map',
routeName: 'vector_map_tiles_pmtiles',
),
SelectionItemWidget(
title: 'flutter_map_compass',
desc: 'A simple compass layer to indicate the map rotation and '
'reset the rotation on click',
routeName: 'flutter_map_compass',
),
];

final width = MediaQuery.sizeOf(context).width;
Expand Down
32 changes: 23 additions & 9 deletions flutter_map_compass/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# flutter_map_compass

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

![Pub Likes](https://img.shields.io/pub/likes/flutter_map_compass)
![Pub Points](https://img.shields.io/pub/points/flutter_map_compass)
![Pub Popularity](https://img.shields.io/pub/popularity/flutter_map_compass)
![Pub Version](https://img.shields.io/pub/v/flutter_map_compass)
[![Pub Version](https://img.shields.io/pub/v/flutter_map_compass)](https://pub.dev/packages/flutter_map_compass)
[![likes](https://img.shields.io/pub/likes/flutter_map_compass?logo=flutter)](https://pub.dev/packages/flutter_map_compass)
[![Pub Points](https://img.shields.io/pub/points/flutter_map_compass)](https://pub.dev/packages/flutter_map_compass/score)
[![Pub Popularity](https://img.shields.io/pub/popularity/flutter_map_compass)](https://pub.dev/packages/flutter_map_compass)

![GitHub last commit](https://img.shields.io/github/last-commit/josxha/flutter_map_plugins)
![GitHub issues](https://img.shields.io/github/issues/josxha/flutter_map_plugins)
![GitHub Repo stars](https://img.shields.io/github/stars/josxha/flutter_map_plugins?style=social)
[![GitHub last commit](https://img.shields.io/github/last-commit/josxha/flutter_map_plugins)](https://github.com/josxha/flutter_map_plugins)
[![stars](https://badgen.net/github/stars/josxha/flutter_map_plugins?label=stars&color=green&icon=github)](https://github.com/josxha/flutter_map_plugins/stargazers)
[![GitHub issues](https://img.shields.io/github/issues/josxha/flutter_map_plugins)](https://github.com/josxha/flutter_map_plugins/issues)
[![codecov](https://codecov.io/gh/josxha/flutter_map_plugins/graph/badge.svg?token=5045489G7X)](https://codecov.io/gh/josxha/flutter_map_plugins)

<img src="docs/screenshot.jpg" width="350px" alt="Example screenshot">

## Getting started

Expand All @@ -32,7 +36,17 @@ Widget build(BuildContext context) {
TileLayer(
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
),
const MapCompass(),

// 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,
),
],
);
}
Expand Down
Binary file added flutter_map_compass/docs/screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion flutter_map_compass/example/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Widget build(BuildContext context) {
TileLayer(
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
),
const MapCompass(),
const MapCompass.cupertino(),
],
);
}
Expand Down

0 comments on commit 71724fc

Please sign in to comment.