Stores Style
@Serializable
Class to structure a Woosmap Store Style
The same JSON style can be used than with the JavaScript library.
StoresStyle.buildFromJson("""
{
breakPoint: 14,
default: {
color: "#008a2f",
size: 8,
minSize: 1,
icon: {
url: 'https://images.woosmap.com/starbucks-marker.svg',
scaledSize: {
height: 40,
width: 34
},
anchor: {
x: 0,
y: 5
}
},
selectedIcon: {
url: 'https://images.woosmap.com/starbucks-selected-marker.svg',
...
}
}
}
""")
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(breakPoint: Int, default: StoresStyle.DefaultRule, rules: List<StoresStyle.TypedRule> = listOf())
Types
Link copied to clipboard
@Serializable
Structure for the default rule.
Functions
Link copied to clipboard
Get the icon for a given type or the default icon if no rules apply to that type.
Link copied to clipboard
Get the rule that apply to a given type, the default rule will be returned if there is none.
Link copied to clipboard
Get the selection icon for a given type or the default selection icon if no rules apply.
Link copied to clipboard