geodraw 0.1.0 copy "geodraw: ^0.1.0" to clipboard
geodraw: ^0.1.0 copied to clipboard

Draw geospatial information on a map. Marker, line and polygon pickers are available

Geodraw #

Draw markers, lines and polygons on a map.

Marker picker #

Marker screenshot

import 'package:flutter/material.dart';
import 'package:geodraw/geodraw.dart';
import 'package:latlong/latlong.dart';

class MarkerPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MarkerPicker(
      callback: (BuildContext context, LatLng point) {
        print("Point: $point");
      },
    );
  }
}

Line picker #

Line screenshot

import 'package:flutter/material.dart';
import 'package:geodraw/geodraw.dart';
import 'package:latlong/latlong.dart';

class LinePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return LinePicker(
      callback: (BuildContext context, List<LatLng> points) {
        print("Line;");
        for (final point in points) {
          print("$point");
        }
      },
    );
  }
}

Polygon picker #

Polygon screenshot

import 'package:flutter/material.dart';
import 'package:geodraw/geodraw.dart';
import 'package:latlong/latlong.dart';

class PolygonPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return PolygonPicker(
      callback: (BuildContext context, List<LatLng> points) {
        print("Polygon;");
        for (final point in points) {
          print("$point");
        }
      },
    );
  }
}

Note: the map will autocenter on current position unless a center is provided. Example:

MarkerPicker(
    center: LatLng(0, 51.0);
    zoom: 16.0,
    callback: (BuildContext context, LatLng point) {
       print("Point: $point");
    },
);
7
likes
40
pub points
0%
popularity

Publisher

unverified uploader

Draw geospatial information on a map. Marker, line and polygon pickers are available

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

cupertino_icons, flutter, geopoint, livemap, map_markers, pedantic

More

Packages that depend on geodraw