setDirectionsOptions method

void setDirectionsOptions(
  1. MapViewDirectionsOptions directionOptions
)

Process two lists: included & excluded tags and asynchronously sends directions.set_options message.

Example:


List<String> includedTags = ['user1', 'user5'];
List<String> excludedTags = [];

mapViewController?.setDirectionsOptions(
   MapViewDirectionsOptions(
     includedTags: includedTags,
     excludedTags: excludedTags,
   ),
 );

Implementation

void setDirectionsOptions(MapViewDirectionsOptions directionOptions) async {
  dynamic message = {
    "includedTags": directionOptions.includedTags,
    "excludedTags": directionOptions.excludedTags,
  };

  _sendMessage(WV_MESSAGE_DIRECTIONS_SET_OPTIONS, jsonEncode(message));
}