addCaption method

Caption? addCaption({
  1. required String caption,
  2. double strokeWidth = 2.0,
  3. int strokeColor = 0xffffffff,
  4. int fillColor = 0xff000000,
  5. double fontSize = 10.0,
  6. int minZoomLevel = 0,
  7. int maxZoomLevel = 65535,
  8. Position position = Position.BELOW,
  9. double dy = 0,
  10. int strokeMinZoomLevel = DisplayModel.STROKE_MIN_ZOOMLEVEL_TEXT,
  11. required DisplayModel displayModel,
})

Implementation

Caption? addCaption({
  required String caption,
  double strokeWidth = 2.0,
  int strokeColor = 0xffffffff,
  int fillColor = 0xff000000,
  double fontSize = 10.0,
  int minZoomLevel = 0,
  int maxZoomLevel = 65535,
  Position position = Position.BELOW,
  double dy = 0,
  int strokeMinZoomLevel = DisplayModel.STROKE_MIN_ZOOMLEVEL_TEXT,
  required DisplayModel displayModel,
}) {
  if (caption.isEmpty) return null;
  Caption cp = Caption(
      caption: caption,
      strokeWidth: strokeWidth,
      strokeColor: strokeColor,
      fillColor: fillColor,
      fontSize: fontSize,
      minZoomLevel: minZoomLevel,
      maxZoomLevel: maxZoomLevel,
      position: position,
      dy: dy,
      strokeMinZoomLevel: strokeMinZoomLevel,
      displayModel: displayModel,
      symbolFinder: symbolFinder);
  _captions.add(cp);
  return cp;
}