zoomToSpan method

Future zoomToSpan(
  1. List<LatLng> bound, {
  2. int paddingT = 80,
  3. int paddingL = 80,
  4. int paddingB = 80,
  5. int paddingR = 80,
})

移动镜头到当前的视角

Implementation

Future zoomToSpan(
  List<LatLng> bound, {
  int paddingT = 80,
  int paddingL = 80,
  int paddingB = 80,
  int paddingR = 80,
}) {
  final boundJson = jsonEncode(bound.map((it) => it.toJson()).toList());

  L.p('zoomToSpan dart端参数: bound -> $boundJson');

  paddingT = getPxFromDesignPx(paddingT);
  paddingL = getPxFromDesignPx(paddingL);
  paddingB = getPxFromDesignPx(paddingB);
  paddingR = getPxFromDesignPx(paddingR);

  return _mapChannel.invokeMethod(
    'map#zoomToSpan',
    {
      'bound': boundJson,
      'paddingT': paddingT,
      'paddingL': paddingL,
      'paddingB': paddingB,
      'paddingR': paddingR,
    },
  );
}