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. ZoomlevelRange? zoomlevelRange,
  7. MapPositioning position = MapPositioning.BELOW,
  8. double dy = 0,
  9. int? strokeMinZoomLevel,
  10. double gap = 1,
})
inherited

Implementation

Caption? addCaption({
  required String caption,
  double strokeWidth = 2.0,
  int strokeColor = 0xffffffff,
  int fillColor = 0xff000000,
  double fontSize = 10.0,
  ZoomlevelRange? zoomlevelRange,
  MapPositioning position = MapPositioning.BELOW,
  double dy = 0,
  int? strokeMinZoomLevel,
  double gap = 1,
}) {
  if (caption.trim().isEmpty) return null;
  Caption cp = Caption(
    caption: caption,
    strokeWidth: strokeWidth,
    strokeColor: strokeColor,
    fillColor: fillColor,
    fontSize: fontSize,
    zoomlevelRange: zoomlevelRange ?? const ZoomlevelRange.standard(),
    position: position,
    dy: dy,
    gap: gap,
    strokeMinZoomLevel: strokeMinZoomLevel,
    poiMarker: (this as CaptionReference),
  );
  _captions.add(cp);
  return cp;
}