Package globus.glmap
Class GLMapStyleParser
- java.lang.Object
-
- globus.glmap.GLNativeObject
-
- globus.glmap.GLMapStyleParser
-
public class GLMapStyleParser extends GLNativeObject
`GLMapStyleParser` is class to parse style and analyze result of parsing
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceGLMapStyleParser.ResourceLoadCallbackCalled when GLMapView need to load some image
-
Constructor Summary
Constructors Constructor Description GLMapStyleParser()Initialize parser without resourcesGLMapStyleParser(android.content.res.AssetManager assetManager, java.lang.String path)Initialize parser with resources stored in assetManager with base pathGLMapStyleParser(GLMapStyleParser.ResourceLoadCallback callback)Initialize parser with resource block
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GLMapVectorCascadeStylefinish()Finish parsingjava.lang.String[]getAllOptions()GLMapErrorgetError()GLMapVectorCascadeStyleparseFromResources()Append data from "Style.mapcss" in resources and finish parsingbooleanparseNextBuffer(byte[] data)Parse next chunk of stylebooleanparseNextString(java.lang.String string)Parse next chunk of stylevoidsetClampZoomMask(int clampZoomMask)voidsetOptions(java.util.Map<java.lang.String,java.lang.String> options, java.lang.Boolean defaultValue)Sets style options-
Methods inherited from class globus.glmap.GLNativeObject
dispose
-
-
-
-
Constructor Detail
-
GLMapStyleParser
public GLMapStyleParser(@Nullable GLMapStyleParser.ResourceLoadCallback callback)Initialize parser with resource block- Parameters:
callback- block that will provide resources
-
GLMapStyleParser
public GLMapStyleParser(@NonNull android.content.res.AssetManager assetManager, @NonNull java.lang.String path)Initialize parser with resources stored in assetManager with base path- Parameters:
assetManager- The AssetManager to be used while loading resourcespath- Path to folder in assets that contains Style.mapcss and images
-
GLMapStyleParser
public GLMapStyleParser()
Initialize parser without resources
-
-
Method Detail
-
setOptions
public void setOptions(@NonNull java.util.Map<java.lang.String,java.lang.String> options, java.lang.Boolean defaultValue)Sets style options- Parameters:
options- values for optionsdefaultValue- value used for not set options
-
setClampZoomMask
public void setClampZoomMask(int clampZoomMask)
-
getAllOptions
@Nullable public java.lang.String[] getAllOptions()
-
getError
@Nullable public GLMapError getError()
-
parseNextBuffer
public boolean parseNextBuffer(byte[] data)
Parse next chunk of style- Parameters:
data- chunk of style to parse- Returns:
- true if success
-
parseNextString
public boolean parseNextString(@NonNull java.lang.String string)Parse next chunk of style- Parameters:
string- chunk of style to parse- Returns:
- true is success
-
finish
@Nullable public GLMapVectorCascadeStyle finish()
Finish parsing- Returns:
- returns result of parsing. If error happened returned value is nil. Check error for details
-
parseFromResources
@Nullable public GLMapVectorCascadeStyle parseFromResources()
Append data from "Style.mapcss" in resources and finish parsing- Returns:
- returns result of parsing. If error happened returned value is nil. Check error for details
-
-