setPosition method

Future setPosition({
  1. required LatLng target,
  2. double zoom = 10,
  3. double tilt = 0,
  4. double bearing = 0,
})

设置地图中心点

Implementation

Future setPosition({
  required LatLng target,
  double zoom = 10,
  double tilt = 0,
  double bearing = 0,
}) {
  L.p('setPosition dart端参数: target -> $target, zoom -> $zoom, tilt -> $tilt, bearing -> $bearing');

  return _mapChannel.invokeMethod(
    'map#setPosition',
    {
      'target': target.toJsonString(),
      'zoom': zoom,
      'tilt': tilt,
      'bearing': bearing,
    },
  );
}