Demonstrates how to use the google_map_polyutil plugin.
// Let's prepare dummy arguments.
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);
String encodedString = "???_ibE?_seK?_ibE";GoogleMapPolyUtil.containsLocation(
point: point,
polygon: paths
).then((result) => print(result));GoogleMapPolyUtil.decode(
encodedPath: encodedPath
).then((result) => print(result));GoogleMapPolyUtil.distanceToLine(
point: LatLng(0, 0),
start: LatLng(0, 0),
end: LatLng(0, 8)
).then((result) => print(result));GoogleMapPolyUtil.encode(
path: paths
).then((result) => print(result));
GoogleMapPolyUtil.isClosedPolygon(
poly: path,
polygon: paths
).then((result) => print(result));GoogleMapPolyUtil.isLocationOnEdge(
point: point,
polygon: paths
).then((result) => print(result));
GoogleMapPolyUtil.isLocationOnEdge(
point: point,
polygon: paths
).then((result) => print(result));GoogleMapPolyUtil.simplify(
poly: paths,
tolerance: 100
).then((result) => print(result));