Class Options.Builder
- Enclosing class:
Options
Options
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull Options
build()
Create a newOptions
instance from the current state of thisOptions.Builder
.@NotNull Options.Builder
Set whether to fill the path with color.@NotNull Options.Builder
Set fill properties.@NotNull Options.Builder
Set a new color for this fill rule.@NotNull Options.Builder
Set a new fill type for this fill rule.@NotNull Options.Builder
Set popup properties.@NotNull Options.Builder
popupAutoPanPadding
(@Nullable Point autoPanPadding) Set the margin between the popup and the map view after auto panning was performed.@NotNull Options.Builder
popupAutoPanPaddingBottomRight
(@Nullable Point autoPanPaddingBottomRight) Set the margin between the popup and the bottom right corner of the map view after auto panning was performed.@NotNull Options.Builder
popupAutoPanPaddingTopLeft
(@Nullable Point autoPanPaddingTopLeft) Set the margin between the popup and the top left corner of the map view after auto panning was performed.@NotNull Options.Builder
popupCloseButton
(@Nullable Boolean closeButton) Set whether the popup has a close button.@NotNull Options.Builder
popupContent
(@Nullable String content) Set the content for this popup rule.@NotNull Options.Builder
popupMaxHeight
(@Nullable Integer maxHeight) Set the max height of the popup.@NotNull Options.Builder
popupMaxWidth
(@Nullable Integer maxWidth) Set the max width of the popup.@NotNull Options.Builder
popupMinWidth
(@Nullable Integer minWidth) Set the min width of the popup.@NotNull Options.Builder
popupOffset
(@Nullable Point offset) Set offset of this popup rule from marker point@NotNull Options.Builder
Set the map pane where the popup will be added.@NotNull Options.Builder
popupShouldAutoClose
(@Nullable Boolean autoClose) Set whether the popup automatically closes when another popup is opened.@NotNull Options.Builder
popupShouldAutoPan
(@Nullable Boolean autoPan) Set whether the map should automatically pan to fit the opened popup.@NotNull Options.Builder
popupShouldCloseOnClick
(@Nullable Boolean closeOnClick) Set whether the popup closes when the map is clicked.@NotNull Options.Builder
popupShouldCloseOnEscapeKey
(@Nullable Boolean closeOnEscapeKey) Set whether the popup closes with the escape key.@NotNull Options.Builder
popupShouldKeepInView
(@Nullable Boolean keepInView) Set whether the popup should stay in view.@NotNull Options.Builder
Set whether to draw stroke along the path.@NotNull Options.Builder
Set the stroke properties.@NotNull Options.Builder
strokeColor
(@Nullable Integer color) Set the color of this stroke rule.@NotNull Options.Builder
strokeDashOffset
(@Nullable String dashOffset) Set the distance into the dash pattern to start the dash.@NotNull Options.Builder
strokeDashPattern
(@Nullable String dashPattern) Set the stroke dash pattern.@NotNull Options.Builder
strokeLineCapShape
(@Nullable Stroke.LineCapShape lineCapShape) Set the shape to be used at the end of the stroke.@NotNull Options.Builder
strokeLineJoinShape
(@Nullable Stroke.LineJoinShape lineJoinShape) Set the shape to be used at the corners of the stroke.@NotNull Options.Builder
strokeWeight
(@Nullable Integer weight) Set the weight for this stroke rule.@NotNull Options.Builder
Set tooltip properties.@NotNull Options.Builder
tooltipContent
(@Nullable String content) Set the content for this tooltip rule.@NotNull Options.Builder
tooltipDirection
(@Nullable Tooltip.Direction direction) Set the direction where to open the tooltip.@NotNull Options.Builder
tooltipOffset
(@Nullable Point offset) Set offset of this tooltip rule from marker point.@NotNull Options.Builder
tooltipOpacity
(@Nullable Double opacity) Set the tooltip opacity percent.@NotNull Options.Builder
tooltipPane
(@Nullable String pane) Set the map pane where the tooltip will be added.@NotNull Options.Builder
tooltipPermanent
(@Nullable Boolean permanent) Set whether to open the tooltip permanently or only on mouseover@NotNull Options.Builder
tooltipSticky
(@Nullable Boolean sticky) Set whether the tooltip is sticky or not.
-
Constructor Details
-
Builder
public Builder()Create a new builder forOptions
.
-
-
Method Details
-
stroke
Set the stroke properties.- Parameters:
stroke
- stroke properties- Returns:
- this options builder
-
stroke
Set whether to draw stroke along the path.Setting to false will disable borders on polygons or circles.
Defaults to '
true
' if null.- Parameters:
enabled
- whether stroke is enabled- Returns:
- this options builder
-
strokeWeight
Set the weight for this stroke rule.Defaults to '
3
' if null.- Parameters:
weight
- new stroke weight- Returns:
- this options builder
-
strokeColor
Set the color of this stroke rule.Defaults to '
#FF3388FF
' if null.- Parameters:
color
- argb color- Returns:
- this options builder
-
strokeLineCapShape
@NotNull public @NotNull Options.Builder strokeLineCapShape(@Nullable Stroke.LineCapShape lineCapShape) Set the shape to be used at the end of the stroke.Defaults to '
' if null.Stroke.LineCapShape.ROUND
- Parameters:
lineCapShape
- line cap shape- Returns:
- this options builder
- See Also:
-
strokeLineJoinShape
@NotNull public @NotNull Options.Builder strokeLineJoinShape(@Nullable Stroke.LineJoinShape lineJoinShape) Set the shape to be used at the corners of the stroke.Defaults to '
' if null.Stroke.LineJoinShape.ROUND
- Parameters:
lineJoinShape
- line join shape- Returns:
- this options builder
- See Also:
-
strokeDashPattern
Set the stroke dash pattern.Note: Doesn't work in some old browsers.
- Parameters:
dashPattern
- dash pattern- Returns:
- this options builder
- See Also:
-
strokeDashOffset
Set the distance into the dash pattern to start the dash.Note: Doesn't work in some old browsers.
- Parameters:
dashOffset
- dash offset- Returns:
- this options builder
- See Also:
-
fill
Set fill properties.- Parameters:
fill
- fill properties- Returns:
- this options builder
-
fill
Set whether to fill the path with color.Setting to false will disable filling on polygons or circles.
Defaults to '
true
' if null.- Parameters:
enabled
- whether fill is enabled- Returns:
- this options builder
-
fillType
Set a new fill type for this fill rule.Defaults to '
' if null.Fill.Type.EVENODD
- Parameters:
type
- new fill type- Returns:
- this options builder
- See Also:
-
fillColor
Set a new color for this fill rule.Defaults to '
' if null.Stroke.getColor()
- Parameters:
color
- new argb color- Returns:
- this options builder
-
tooltip
Set tooltip properties.- Parameters:
tooltip
- tooltip properties- Returns:
- this options builder
-
tooltipContent
Set the content for this tooltip rule.HTML is valid here.
If null, the tooltip rule is effectively disabled.
- Parameters:
content
- tooltip content- Returns:
- this options builder
-
tooltipPane
Set the map pane where the tooltip will be added.Defaults to '
tooltipPane
' if null.- Parameters:
pane
- map pane- Returns:
- this options builder
-
tooltipOffset
Set offset of this tooltip rule from marker point.Defaults to '
' if null.Point.ZERO
- Parameters:
offset
- tooltip offset- Returns:
- this options builder
-
tooltipDirection
Set the direction where to open the tooltip.Defaults to '
' if null.Tooltip.Direction.AUTO
- Parameters:
direction
- opening direction- Returns:
- this options builder
-
tooltipPermanent
Set whether to open the tooltip permanently or only on mouseoverDefaults to '
false
' if null.- Parameters:
permanent
- opened permanently- Returns:
- this options builder
-
tooltipSticky
Set whether the tooltip is sticky or not.A sticky tooltip will stick to and follow the mouse instead of the anchor.
Defaults to '
false
' if null.- Parameters:
sticky
- sticky state- Returns:
- this options builder
-
tooltipOpacity
Set the tooltip opacity percent.Defaults to '
0.9D
' if null.- Parameters:
opacity
- tooltip opacity- Returns:
- this options builder
-
popup
Set popup properties.- Parameters:
popup
- popup properties- Returns:
- this options builder
-
popupContent
Set the content for this popup rule.HTML is valid here.
If null, the popup rule is effectively disabled.
- Parameters:
content
- popup content- Returns:
- this options builder
-
popupPane
Set the map pane where the popup will be added.Defaults to '
popupPane
' if null.- Parameters:
pane
- map pane- Returns:
- this options builder
-
popupOffset
Set offset of this popup rule from marker pointDefaults to '
new
' if null.Point
(0, 7)- Parameters:
offset
- popup offset- Returns:
- this options builder
-
popupMaxWidth
Set the max width of the popup.Defaults to '
300
' if null.- Parameters:
maxWidth
- max width- Returns:
- this options builder
-
popupMinWidth
Set the min width of the popup.Defaults to '
50
' if null.- Parameters:
minWidth
- min width- Returns:
- this options builder
-
popupMaxHeight
Set the max height of the popup.If set, creates a scrollable container of the given height inside a popup if its content exceeds it.
- Parameters:
maxHeight
- max height- Returns:
- this options builder
-
popupShouldAutoPan
Set whether the map should automatically pan to fit the opened popup.Defaults to '
true
' if null.- Parameters:
autoPan
- true to auto pan- Returns:
- this options builder
-
popupAutoPanPaddingTopLeft
@NotNull public @NotNull Options.Builder popupAutoPanPaddingTopLeft(@Nullable @Nullable Point autoPanPaddingTopLeft) Set the margin between the popup and the top left corner of the map view after auto panning was performed.If set, overrides the top left values of
Popup.getAutoPanPadding()
.- Parameters:
autoPanPaddingTopLeft
- top left corner padding margins- Returns:
- this options builder
-
popupAutoPanPaddingBottomRight
@NotNull public @NotNull Options.Builder popupAutoPanPaddingBottomRight(@Nullable @Nullable Point autoPanPaddingBottomRight) Set the margin between the popup and the bottom right corner of the map view after auto panning was performed.If set, overrides the bottom right values of
Popup.getAutoPanPadding()
.- Parameters:
autoPanPaddingBottomRight
- bottom right corner padding margins- Returns:
- this options builder
-
popupAutoPanPadding
@NotNull public @NotNull Options.Builder popupAutoPanPadding(@Nullable @Nullable Point autoPanPadding) Set the margin between the popup and the map view after auto panning was performed.This is the equivalent of the same values in both
Popup.getAutoPanPaddingTopLeft()
andPopup.getAutoPanPaddingBottomRight()
Defaults to '
new
' if null.Point
(5, 5)- Parameters:
autoPanPadding
- padding margins- Returns:
- this options builder
-
popupShouldKeepInView
@NotNull public @NotNull Options.Builder popupShouldKeepInView(@Nullable @Nullable Boolean keepInView) Set whether the popup should stay in view.If set to true it will prevent users from panning the popup off of the screen while it is open.
Defaults to '
false
' if null.- Parameters:
keepInView
- true to keep popup in view- Returns:
- this options builder
-
popupCloseButton
Set whether the popup has a close button.Defaults to '
true
' if null.- Parameters:
closeButton
- true if popup has close button- Returns:
- this options builder
-
popupShouldAutoClose
@NotNull public @NotNull Options.Builder popupShouldAutoClose(@Nullable @Nullable Boolean autoClose) Set whether the popup automatically closes when another popup is opened.Defaults to '
true
' if null.- Parameters:
autoClose
- true if popup auto closes- Returns:
- this options builder
-
popupShouldCloseOnEscapeKey
@NotNull public @NotNull Options.Builder popupShouldCloseOnEscapeKey(@Nullable @Nullable Boolean closeOnEscapeKey) Set whether the popup closes with the escape key.Defaults to '
true
' if null.- Parameters:
closeOnEscapeKey
- true to close with escape- Returns:
- this options builder
-
popupShouldCloseOnClick
@NotNull public @NotNull Options.Builder popupShouldCloseOnClick(@Nullable @Nullable Boolean closeOnClick) Set whether the popup closes when the map is clicked.Defaults to '
true
' if null.- Parameters:
closeOnClick
- true to close on map click- Returns:
- this options builder
-
build
Create a newOptions
instance from the current state of thisOptions.Builder
.- Returns:
- new options
-