Class MarkerOptions.Builder

java.lang.Object
xyz.jpenilla.squaremap.api.marker.MarkerOptions.Builder
Enclosing class:
MarkerOptions

public static final class MarkerOptions.Builder extends Object
Builder for MarkerOptions
  • Method Details

    • stroke

      public @NonNull MarkerOptions.Builder stroke(boolean stroke)
      Set whether to render the line stroke

      Default: true

      Parameters:
      stroke - new stroke
      Returns:
      this builder
    • strokeColor

      public @NonNull MarkerOptions.Builder strokeColor(@NonNull Color color)
      Set the line stroke color

      Default: Color.BLUE

      Parameters:
      color - new color
      Returns:
      this builder
    • strokeWeight

      public @NonNull MarkerOptions.Builder strokeWeight(int weight)
      Set the line stroke weight

      Default: 3

      Parameters:
      weight - new weight
      Returns:
      this builder
    • strokeOpacity

      public @NonNull MarkerOptions.Builder strokeOpacity(double opacity)
      Set the line stroke opacity

      Default: 1.0

      Parameters:
      opacity - new opacity
      Returns:
      this builder
    • fill

      public @NonNull MarkerOptions.Builder fill(boolean fill)
      Set whether to fill the marker

      Default: true

      Parameters:
      fill - new fill
      Returns:
      this builder
    • fillColor

      public @NonNull MarkerOptions.Builder fillColor(@NonNull Color color)
      Set the fill color

      Default: unset

      Parameters:
      color - new color
      Returns:
      this builder
    • fillOpacity

      public @NonNull MarkerOptions.Builder fillOpacity(double opacity)
      Set the fill opacity

      Default: 0.2

      Parameters:
      opacity - new opacity
      Returns:
      this builder
    • fillRule

      public @NonNull MarkerOptions.Builder fillRule(@NonNull MarkerOptions.FillRule fillRule)
      Set the fill rule

      Default: MarkerOptions.FillRule.EVENODD

      Parameters:
      fillRule - new fill rule
      Returns:
      this builder
    • clickTooltip

      public @NonNull MarkerOptions.Builder clickTooltip(@Nullable String tooltip)
      Set the click tooltip, accepts HTML

      Default: unset

      Parameters:
      tooltip - new tooltip
      Returns:
      this builder
    • hoverTooltip

      public @NonNull MarkerOptions.Builder hoverTooltip(@Nullable String tooltip)
      Set the hover tooltip, accepts HTML

      Default: unset

      Parameters:
      tooltip - new tooltip
      Returns:
      this builder
    • build

      public @NonNull MarkerOptions build()
      Create a new marker options instance from the current state of this builder
      Returns:
      new marker options