S
- The Styling child stylepublic abstract class Styling<S extends Styling>
extends java.lang.Object
The basic style.
Copyright (c) 2017 Nexusgeographics All rights reserved.
LabelStyle
,
MarkerStyle
,
LineStyle
,
PolygonStyle
Modifier and Type | Class and Description |
---|---|
static class |
Styling.Style
The enum Style.
|
Constructor and Description |
---|
Styling()
Instantiates a new Feature style.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBlend() |
java.lang.String |
getColor()
Gets color.
|
java.util.Map<java.lang.String,java.lang.String> |
getMapStyle()
Gets current map style
|
int |
getOrder()
Gets order.
|
Styling.Style |
getStyle()
Gets style.
|
java.lang.String |
getStylePath() |
boolean |
hasStylePath() |
boolean |
isVisible()
Checks if is visible.
|
S |
setBlend(java.lang.String blend)
Optional string, one of opaque, translucent, add, multiply, overlay, or inlay.
|
S |
setColor(java.lang.String color)
Sets color.
|
S |
setOrder(int order)
Sets order.
|
S |
setStyle(Styling.Style style)
Sets style.
|
void |
setStylePath(java.lang.String stylePath) |
S |
setVisible(boolean visible)
Sets visible.
|
java.lang.String |
toJson()
Transform Style to Json String.
|
java.util.Map<java.lang.String,java.lang.String> |
toMap()
Transform Style to
Map<String, String> |
java.lang.String |
toString() |
@Nullable public java.lang.String toJson()
@Nullable public java.util.Map<java.lang.String,java.lang.String> toMap()
Map<String, String>
public boolean hasStylePath()
@Nullable public java.lang.String getStylePath()
public void setStylePath(@Nullable java.lang.String stylePath)
@Nullable public java.util.Map<java.lang.String,java.lang.String> getMapStyle()
@NonNull public S setStyle(@NonNull Styling.Style style)
style
- the style@NonNull public Styling.Style getStyle()
@NonNull public int getOrder()
public S setOrder(int order)
order
- the order@NonNull public java.lang.String getColor()
public S setColor(@NonNull java.lang.String color)
Example:
Styling.setColor("#ff0000")
Color format: Named colors: red, blue, salmon, rebeccapurple Hex colors: "#fff", "#000", "#9CE6E5" RGB colors: "rgb(255, 190, 0)" RGBA colors**: "rgb(255, 190, 0, .5)" HSL colors: "hsl(180, 100%, 100%)" HSL colors**: "hsla(180, 100%, 100%, 50%)"
**Currently, alpha values are ignored in the add and multiply blend modes, and respected in the inlay and overlay modes. For more on this, see the blend entry.
color
- the color@NonNull public java.lang.String getBlend()
public S setBlend(@NonNull java.lang.String blend)
blend
- @NonNull public boolean isVisible()
public S setVisible(boolean visible)
visible
- the visiblepublic java.lang.String toString()
toString
in class java.lang.Object