geodraw 0.1.0

Flutter Android iOS

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");
    },
);
1
likes
90
pub points
32%
popularity

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

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

ansterj@gmail.com

License

MIT (LICENSE)

Dependencies

cupertino_icons, flutter, geopoint, livemap, map_markers, pedantic

More

Packages that depend on geodraw