lop_polyutil 0.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • new4

lop_polyutil #

LopPolyutil is an implementation of isLocationOnPath() google map PolyUtil method.

Usage #

Import package:lop_polyutil/lop_polyutil.dart and then call a static method isLocationOnPath which will return a boolean.

// import package
import 'package:lop_polyutil/lop_polyutil.dart';

// Prepare arguments to pass.
// It takes 2 @required and 1 optional arguments.

// List of LatLng
List<LatLng> paths = [];
paths.add(LatLng(0,0));
paths.add(LatLng(0,1));
paths.add(LatLng(0,2));
paths.add(LatLng(0,4));

// Coordinate you want to check if it lies within or near path.
LatLng point = LatLng(0, 3);

// radius is optional argument. By default radius is set at 200 meters.
double radius = 200;

// isLocationOnPath a Future method so we will use .then()
LopPolyutil.isLocationOnPath(path: paths, point: point, radius: radius)
    .then((result) {
      	if(result == true) {
    		// things you can do when point is within or near path goes here...
		} else {
    		// things you can do when point isn't within or near path goes here...
		}
    });

Author #

Ashim Upadhaya

Note #

This plugin is not supported by ios yet.

0.0.1 #

  • Initial release

0.0.2 #

  • Nothing's change.
  • Documentation added.

example/README.md

lop_polyutil #

LopPolyutil is an implementation of isLocationOnPath() google map PolyUtil method.

Usage #

Import package:lop_polyutil/lop_polyutil.dart and then call a static method isLocationOnPath which will return a boolean.

// import package
import 'package:lop_polyutil/lop_polyutil.dart';

// Prepare arguments to pass.
// It takes 2 @required and 1 optional arguments.

// List of LatLng
List<LatLng> paths = [];
paths.add(LatLng(0,0));
paths.add(LatLng(0,1));
paths.add(LatLng(0,2));
paths.add(LatLng(0,4));

// Coordinate you want to check if it lies within or near path.
LatLng point = LatLng(0, 3);

// radius is optional argument. By default radius is set at 200 meters.
double radius = 200;

// isLocationOnPath a Future method so we will use .then()
LopPolyutil.isLocationOnPath(path: paths, point: point, radius: radius)
    .then((result) {
      	if(result == true) {
    		// things you can do when point is within or near path goes here...
		} else {
    		// things you can do when point isn't within or near path goes here...
		}
    });

Author #

Ashim Upadhaya

Note #

This plugin is not supported by ios yet.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  lop_polyutil: ^0.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:lop_polyutil/lop_polyutil.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
8
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
4
Learn more about scoring.

This package is not analyzed, because it is discontinued.

Health issues and suggestions

Document public APIs. (-1 points)

4 out of 4 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0