Package globus.glmap
Class GLMapVectorCascadeStyle
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapVectorCascadeStyle
- All Implemented Interfaces:
AutoCloseable
GLMapVectorCascadeStyle defines appearance of GLMapVectorObject. One style
could be used with many GLMapVectorObjects.
Style, used to render map is stored inside Style.mapcss. Detailed MapCSS specification is located at: mapcss.org
MapCSS examples:
Any point with tag natural=peak should be displayed on zoom level 11+ with a triangle
icon tinted with brown color.
node|z11-[natural=peak] {
icon-image:"triangle.svg";
icon-tint:brown;
}
Any point with tag natural=peak should display its localized name on zoom level 13+.
node|z13-[natural=peak] {
text: eval( locTag('name') );
text-color:brown;
font-size:12;
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceTint function for svg files -
Method Summary
Modifier and TypeMethodDescriptionstatic GLMapVectorCascadeStylecreateStyle(String style) Creates cascade style object.String[]Returns allicon-imagevalues referenced by this style.voidsetTintFunction(GLMapVectorCascadeStyle.TintFunction tintFunction, String cacheKey) Sets a custom tint function that will be used while loading SVG files.Methods inherited from class globus.glmap.GLNativeObject
close, dispose
-
Method Details
-
createStyle
Creates cascade style object.GLMapVectorCascadeStyle style = GLMapVectorCascadeStyle.createStyle("area{fill-color:#10106050;}");- Parameters:
style- Source code of style.- Returns:
- New
GLMapVectorCascadeStyleobject ornullin case of error
-
setTintFunction
public void setTintFunction(@NonNull GLMapVectorCascadeStyle.TintFunction tintFunction, @NonNull String cacheKey) Sets a custom tint function that will be used while loading SVG files.- Parameters:
tintFunction- tint functioncacheKey- cache key for function
-
getAllIconNames
Returns allicon-imagevalues referenced by this style.- Returns:
- list of icon names
-