public class SLDStyleSet extends java.lang.Object implements VectorStyleInterface
for SLD v1.1.0,
for SLD v1.0.0,
VectorStyleInterface| Constructor and Description |
|---|
SLDStyleSet(RenderControllerInterface viewC,
AssetWrapper assetWrapper,
java.lang.String sldFileName,
android.util.DisplayMetrics displayMetrics,
boolean useLayerNames,
int relativeDrawPriority)
Constructs a SLDStyleSet object.
|
| 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).
|
boolean |
layerShouldDisplay(java.lang.String layerName,
TileID tileID)
Returns true if the given layer (by name) should be displayed at all.
|
void |
loadSldInputStream()
Parses the desired SLD document tree and create the corresponding symbolizers.
|
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)
Return the styles that match to the given list of attributes.
|
public SLDStyleSet(RenderControllerInterface viewC, AssetWrapper assetWrapper, java.lang.String sldFileName, android.util.DisplayMetrics displayMetrics, boolean useLayerNames, int relativeDrawPriority) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException
viewC - The map or globe view controllerassetWrapper - Wrapper around the asset manager.sldFileName - The file name of the SLD documentdisplayMetrics - The DisplayMetrics instanceuseLayerNames - Whether to use names of NamedLayer elements as a criteria in matching styles.relativeDrawPriority - The z-order relative to other vector features. This will be incremented internally for each style rule, so if you have multiple SLDStyleSets, leave some space between the relativeDrawPriority of each.org.xmlpull.v1.XmlPullParserExceptionjava.io.IOExceptionpublic void loadSldInputStream()
throws org.xmlpull.v1.XmlPullParserException,
java.io.IOException
org.xmlpull.v1.XmlPullParserExceptionjava.io.IOExceptionpublic VectorStyle[] stylesForFeature(AttrDictionary attrs, TileID tileID, java.lang.String layerName, RenderControllerInterface controller)
VectorStyleInterfacestylesForFeature 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 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 VectorStyle[] allStyles()
VectorStyleInterfaceallStyles in interface VectorStyleInterfacepublic int backgroundColorForZoom(double zoom)
VectorStyleInterfacebackgroundColorForZoom in interface VectorStyleInterface