lat_lon_grid_plugin 0.2.7 copy "lat_lon_grid_plugin: ^0.2.7" to clipboard
lat_lon_grid_plugin: ^0.2.7 copied to clipboard

Adds a latitude / longitude grid as plugin to the [flutter_map](https://github.com/fleaflet/flutter_map/).

Pub

lat_lon_grid_plugin #

Adds a latitude / longitude grid as plugin to the flutter_map.

Supported flutter_map versions:

  • Supports flutter_map version 3.0.0 (tested in October 2022).
  • Supports flutter_map versions 3.1.0 and 4.0.0 (tested in May 2023).
  • Supports flutter_map version 5.0.0 (tested in June 2023).

Getting Started #

Example application under /example/:

screenshot

Usage #

dependencies:
  flutter_map: any
  lat_lon_grid_plugin: any

Include the FlutterMap into your widget tree.

  FlutterMap(
    mapController: _mapController,
    options: MapOptions(
      center: LatLng(51.814, -2.170),
      zoom: 6.15,
      rotation: 0.0,
    ),
    children: [
      TileLayer(
        urlTemplate:
            'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
        subdomains: ['a', 'b', 'c'],
      ),
      LatLonGridLayer(
        options: LatLonGridLayerOptions(
          lineWidth: 0.5,
          // apply alpha for grid lines
          lineColor: Color.fromARGB(100, 0, 0, 0),
          labelStyle: TextStyle(
            color: Colors.white,
            backgroundColor: Colors.black,
            fontSize: 12.0,
          ),
          showCardinalDirections: true,
          showCardinalDirectionsAsPrefix: false,
          showLabels: true,
          rotateLonLabels: true,
          placeLabelsOnLines: true,
          offsetLonLabelsBottom: 20.0,
          offsetLatLabelsLeft: 20.0,
        ),
      ),
    ],
  ),
13
likes
90
pub points
75%
popularity

Publisher

unverified uploader

Adds a latitude / longitude grid as plugin to the [flutter_map](https://github.com/fleaflet/flutter_map/).

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_map, latlong2

More

Packages that depend on lat_lon_grid_plugin