Package globus.glmap
Class GLMapVectorCascadeStyle
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapVectorCascadeStyle
@ParametersAreNonnullByDefault public class GLMapVectorCascadeStyle extends GLNativeObject
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: http://www.mapcss.org
MapCSS examples:
Any point with tag natural=peak, should be displayed on zoom level 11+ with trangle icon tinted with brown color.
node|z11-[natural=peak] {
icon-image:"triangle.svgpb";
icon-tint:brown;
}
Any point with tag natural=peak, should display it's localized name on zoom level 13+.
node|z13-[natural=peak] {
text: eval( locTag('name') );
text-color:brown;
font-size:12;
}
-
Method Summary
Modifier and Type Method Description static GLMapVectorCascadeStylecreateStyle(java.lang.String style)Creates cascade style object.static GLMapVectorCascadeStylecreateStyle(java.lang.String style, int clampZoom)Creates cascade style object.static java.lang.ObjectcreateStyleOrError(java.lang.String style, int clampZoom)Creates cascade style object.static GLMapVectorCascadeStylecreateStyleOrThrow(java.lang.String style, int clampZoom)Creates cascade style object.
-
Method Details
-
createStyle
Creates cascade style object.GLMapVectorCascadeStyle style = GLMapVectorCascadeStyle.createStyle("area{fill-color:#10106050;}");- Parameters:
style- Source code of style.- Returns:
- New
GLMapVectorCascadeStyleobject or `null` in case of error
-
createStyle
Creates cascade style object.- Parameters:
style- Source code of style.clampZoom- mask to clamp zoom levels- Returns:
- New
GLMapVectorCascadeStyleobject or `null` in case of error
-
createStyleOrThrow
public static GLMapVectorCascadeStyle createStyleOrThrow(java.lang.String style, int clampZoom) throws java.lang.ExceptionCreates cascade style object.- Parameters:
style- Source code of style.clampZoom- mask to clamp zoom levels- Returns:
- New
GLMapVectorCascadeStyleobject. On error throws exception - Throws:
java.lang.Exception- if error happened while parsing
-
createStyleOrError
@Nonnull public static java.lang.Object createStyleOrError(java.lang.String style, int clampZoom)Creates cascade style object.- Parameters:
style- Source code of style.clampZoom- mask to clamp zoom levels- Returns:
- New
GLMapVectorCascadeStyleobject or GLMapError on error
-