navigateToPoint method

void navigateToPoint(
  1. double lat,
  2. double lng,
  3. String floorIdentifier, {
  4. String? navigationName,
  5. AccessibilityMode? accessibilityMode,
})

Starts navigating to the given coordinates, at the given floor. You can optionally choose the desired AccessibilityMode used to calculate the route. You can also set the name of the destination to be displayed on the MapView.

Implementation

void navigateToPoint(
  double lat,
  double lng,
  String floorIdentifier, {
  String? navigationName,
  AccessibilityMode? accessibilityMode,
}) async {
  dynamic message = {
    "lat": lat,
    "lng": lng,
    "floorIdentifier": floorIdentifier
  };
  if (accessibilityMode != null) {
    message["type"] = accessibilityMode.name;
  }
  if (navigationName != null) {
    message["navigationName"] = navigationName;
  }
  _sendMessage(WV_MESSAGE_NAVIGATION_START, jsonEncode(message));
}