Package org.geotools.mbstyle
Class MapBoxStyle
- Object
-
- MapBoxStyle
-
public class MapBoxStyle extends Object
MapBox Style facade offering utility methods for quickly working with JSON and converting toStyledLayerDescriptor
.- Author:
- Jody Garnett (Boundless)
-
-
Constructor Summary
Constructors Constructor Description MapBoxStyle()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StyledLayerDescriptor
parse(InputStream stream)
Read in the provided JSON as aStyledLayerDescriptor
.static StyledLayerDescriptor
parse(Reader reader)
Read in the provided JSON as aStyledLayerDescriptor
.static List<Exception>
validate(Reader reader)
Validate ability to read json, and parse each layer.
-
-
-
Method Detail
-
parse
public static StyledLayerDescriptor parse(Reader reader) throws IOException, ParseException
Read in the provided JSON as aStyledLayerDescriptor
.- Parameters:
reader
- JSON content- Returns:
- generated style
- Throws:
ParseException
- Invalid JSON providedIOException
- Problem reading definition from reader
-
parse
public static StyledLayerDescriptor parse(InputStream stream) throws IOException, ParseException
Read in the provided JSON as aStyledLayerDescriptor
.- Parameters:
stream
- JSON content- Returns:
- generated style
- Throws:
ParseException
- Invalid JSON providedIOException
- Problem reading definition from stream
-
-