lat_lon_grid_plugin 0.2.3 icon indicating copy to clipboard operation
lat_lon_grid_plugin: ^0.2.3 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.

Getting Started #

Example application under /example/:

Example

Usage #

dependencies:
  flutter_map: any
  lat_lon_grid_plugin: any

Include the FlutterMap into your widget tree.

Please note: Make sure to place the MapPluginLatLonGridOptions() right after TileLayerOptions() so it does not consume touch events from other layer widgets.

  FlutterMap(
    mapController: _mapController,
    options: MapOptions(
      center: LatLng(51.814, -2.170),
      zoom: 6.15,
      rotation: 0.0,
      plugins: [
        MapPluginLatLonGrid(),
      ],
    ),
    layers: [
      TileLayerOptions(
        urlTemplate:
            'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
        subdomains: ['a', 'b', 'c'],
      ),
      MapPluginLatLonGridOptions(
        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,
      ),
    ],
  ),
9
likes
130
pub points
72%
popularity

Publisher

unverified uploader

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

Homepage
Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter, flutter_map, latlong2

More

Packages that depend on lat_lon_grid_plugin