setPosition method

  1. @override
Future<void> setPosition(
  1. int viewId, {
  2. LatLng? position,
  3. String? panoId,
  4. int? radius,
  5. StreetViewSource? source,
})
override

Sets panorama by given location

Return Future while the change has been made on the platform side.

Implementation

@override
Future<void> setPosition(int viewId,
    {LatLng? position,
    String? panoId,
    int? radius,
    StreetViewSource? source}) {
  return channel(viewId)!.invokeMethod(
      "streetView#movePos",
      StreetViewCameraPosition(
              position: position,
              panoId: panoId,
              radius: radius,
              source: source)
          .toMap());
}