public class MapCSSStyleSource extends StyleSource
| Modifier and Type | Field and Description |
|---|---|
private Color |
backgroundColorOverride |
private String |
css |
List<MapCSSRule> |
rules |
private ZipFile |
zipFile |
icon, zipIconsactive, isZip, name, title, url, zipEntryPath| Constructor and Description |
|---|
MapCSSStyleSource(SourceEntry entry) |
MapCSSStyleSource(String css)
Creates a new style source from the MapCSS styles supplied in
css |
MapCSSStyleSource(String url,
String name,
String shortdescription) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(MultiCascade mc,
OsmPrimitive osm,
double scale,
OsmPrimitive multipolyOuterWay,
boolean pretendWayIsClosed) |
void |
closeSourceInputStream(InputStream is)
Closes the source input stream previously returned by
StyleSource.getSourceInputStream() and other linked resources, if applicable. |
private Cascade |
constructSpecial(String type) |
Color |
getBackgroundColorOverride() |
InputStream |
getSourceInputStream()
Returns a new
InputStream to the style source. |
private void |
loadCanvas() |
private void |
loadMeta()
load meta info from a selector "meta"
|
void |
loadStyleSource() |
String |
toString() |
getErrors, getIcon, getLastMTime, getSourceIcon, getToolTipText, init, logError, setLastMTimeequals, getDisplayString, getFileNamePart, getLocalSourceDir, getPrefName, getZipEntryDirName, hashCode, isLocalpublic final List<MapCSSRule> rules
private Color backgroundColorOverride
public MapCSSStyleSource(String url, String name, String shortdescription)
public MapCSSStyleSource(SourceEntry entry)
public MapCSSStyleSource(String css) throws IllegalArgumentException
Creates a new style source from the MapCSS styles supplied in
css
css - the MapCSS style declaration. Must not be null.IllegalArgumentException - thrown if css is nullpublic void loadStyleSource()
loadStyleSource in class StyleSourcepublic InputStream getSourceInputStream() throws IOException
StyleSourceInputStream to the style source. When finished, StyleSource.closeSourceInputStream(InputStream) must be called.getSourceInputStream in class StyleSourceInputStream to the style source that must be closed by the callerIOException - if any I/O error occurs.StyleSource.closeSourceInputStream(InputStream)public void closeSourceInputStream(InputStream is)
StyleSourceStyleSource.getSourceInputStream() and other linked resources, if applicable.closeSourceInputStream in class StyleSourceis - The source input stream that must be closedStyleSource.getSourceInputStream()private void loadMeta()
private void loadCanvas()
private Cascade constructSpecial(String type)
public Color getBackgroundColorOverride()
getBackgroundColorOverride in class StyleSourcepublic void apply(MultiCascade mc, OsmPrimitive osm, double scale, OsmPrimitive multipolyOuterWay, boolean pretendWayIsClosed)
apply in class StyleSourcepublic String toString()
toString in class SourceEntry