public class MapboxVectorStyleSet extends java.lang.Object implements VectorStyleInterface
| Modifier and Type | Class and Description |
|---|---|
class |
MapboxVectorStyleSet.Source |
static class |
MapboxVectorStyleSet.SourceType |
| Modifier and Type | Field and Description |
|---|---|
protected long |
nativeHandle |
java.util.ArrayList<MapboxVectorStyleSet.Source> |
sources |
java.lang.String |
spriteURL |
| Constructor and Description |
|---|
MapboxVectorStyleSet(AttrDictionary styleDict,
VectorStyleSettings inSettings,
android.util.DisplayMetrics inDisplayMetrics,
RenderControllerInterface inControl) |
MapboxVectorStyleSet(java.lang.String styleJSON,
VectorStyleSettings inSettings,
android.util.DisplayMetrics inDisplayMetrics,
RenderControllerInterface inControl) |
| Modifier and Type | Method and Description |
|---|---|
VectorStyle[] |
allStyles()
Return the full list of styles.
|
int |
backgroundColorForZoom(double zoom)
Return a color for the background (clear color).
|
int |
backgroundColorForZoomNative(double zoom) |
double |
calculateTextWidth(java.lang.String text,
LabelInfo labelInfo) |
void |
finalize() |
LabelInfo |
labelInfoForFont(java.lang.String fontName,
float fontSize) |
boolean |
layerShouldDisplay(java.lang.String layerName,
TileID tileID)
Returns true if the given layer (by name) should be displayed at all.
|
void |
setArealShader(Shader shader)
Set this to override the regular fill shader.
|
VectorStyle |
styleForUUID(long uuid,
RenderControllerInterface controller)
Returns a vector style corresponding to the given unique ID.
|
VectorStyle[] |
stylesForFeature(AttrDictionary attrs,
TileID tileID,
java.lang.String layerName,
RenderControllerInterface controller)
These are actually implemented on the C++ side, which communicates
with itself.
|
public java.lang.String spriteURL
public java.util.ArrayList<MapboxVectorStyleSet.Source> sources
protected long nativeHandle
public MapboxVectorStyleSet(java.lang.String styleJSON,
VectorStyleSettings inSettings,
android.util.DisplayMetrics inDisplayMetrics,
RenderControllerInterface inControl)
public MapboxVectorStyleSet(AttrDictionary styleDict, VectorStyleSettings inSettings, android.util.DisplayMetrics inDisplayMetrics, RenderControllerInterface inControl)
public void setArealShader(Shader shader)
public int backgroundColorForZoom(double zoom)
VectorStyleInterfacebackgroundColorForZoom in interface VectorStyleInterfacepublic int backgroundColorForZoomNative(double zoom)
public LabelInfo labelInfoForFont(java.lang.String fontName, float fontSize)
public double calculateTextWidth(java.lang.String text,
LabelInfo labelInfo)
public VectorStyle[] stylesForFeature(AttrDictionary attrs, TileID tileID, java.lang.String layerName, RenderControllerInterface controller)
stylesForFeature in interface VectorStyleInterfaceattrs - The attribute dictionary from the vector feature.tileID - The tileID if we're building from a tile source. null if not.layerName - The layer name if the data is coming from vector tiles.controller - Maply base controller where thepublic VectorStyle[] allStyles()
VectorStyleInterfaceallStyles in interface VectorStyleInterfacepublic boolean layerShouldDisplay(java.lang.String layerName,
TileID tileID)
VectorStyleInterfacelayerShouldDisplay in interface VectorStyleInterfacelayerName - Name of the layer to be displayed (or not)tileID - If we're using a tile source, this is the tile ID. If not, it will be null.public VectorStyle styleForUUID(long uuid, RenderControllerInterface controller)
VectorStyleInterfacestyleForUUID in interface VectorStyleInterfaceuuid - Unique IDcontroller - Base controller used for the geometry.public void finalize()
finalize in class java.lang.Object