Package globus.glmap
Class GLMapStyleParser
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapStyleParser
@ParametersAreNonnullByDefault 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
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 optionsMethods inherited from class globus.glmap.GLNativeObject
disposeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
GLMapStyleParser
Initialize parser with resource block- Parameters:
callback- block that will provide resources
-
GLMapStyleParser
public GLMapStyleParser(android.content.res.AssetManager assetManager, 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 Details
-
setOptions
public void setOptions(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
-
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(java.lang.String string)Parse next chunk of style- Parameters:
string- chunk of style to parse- Returns:
- true is success
-
finish
Finish parsing- Returns:
- returns result of parsing. If error happened returned value is nil. Check error for details
-
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
-