Class MapStyle
java.lang.Object
com.flowingcode.vaadin.addons.googlemaps.maptypestyle.MapStyle
- All Implemented Interfaces:
Serializable
Representation for the collection of selectors and stylers that define how the map should be
styled.
A map style consists of one selector and its corresponding style rules. Selectors specify the map features and/or elements that should be affected, while the style rule define how those features and elements should be modified by using stylers.
This class provides methods to convert the style information into a JSON representation.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMapStyle(FeatureType featureType, ElementType elementType, StyleRules styleRules) Creates a newMapStylewith the specified feature type, element type, and style rules.MapStyle(FeatureType featureType, StyleRules styleRules) Creates a newMapStylewith the specified feature type and style rules. -
Method Summary
Modifier and TypeMethodDescriptionelemental.json.JsonObjectgetJson()Converts theMapStyleto a JSON object.
-
Constructor Details
-
MapStyle
Creates a newMapStylewith the specified feature type and style rules.- Parameters:
featureType- the feature type to be styledstyleRules- the style rules to apply
-
MapStyle
Creates a newMapStylewith the specified feature type, element type, and style rules.- Parameters:
featureType- the feature type to be styledelementType- the element type to be styledstyleRules- the style rules to apply
-
-
Method Details
-
getJson
public elemental.json.JsonObject getJson()Converts theMapStyleto a JSON object.This method includes the feature type, element type, and style rules, if present.
- Returns:
- a
JsonObjectrepresenting the map style
-