addDirection abstract method

void addDirection(
  1. dynamic origin,
  2. dynamic destination, {
  3. String startLabel,
  4. String startIcon,
  5. String startInfo,
  6. String endLabel,
  7. String endIcon,
  8. String endInfo,
})

Adds a direction to the map by given origin and destination coordinates.

origin and destination are dynamic due to following variations:

  • LatLng, better use Point, it will be converted into LatLng
  • Place
  • String

If direction with same origin and destination have been already added, addition of a new polygon will be ignored.

Implementation

void addDirection(
  dynamic origin,
  dynamic destination, {
  String startLabel,
  String startIcon,
  String startInfo,
  String endLabel,
  String endIcon,
  String endInfo,
});