@nativescript-community/ui-mapbox
Version:
Interactive, thoroughly customizable maps powered by vector tiles and OpenGL.
17 lines • 611 B
JavaScript
const Expression = com.mapbox.maps.extension.style.expressions.generated.Expression;
export class ExpressionParser {
static parseJson(json) {
const expression = Expression.fromRaw(JSON.stringify(json));
return expression;
}
static toJson(filter) {
if (!filter) {
return null;
}
if (!(filter instanceof com.mapbox.maps.extension.style.expressions.generated.Expression)) {
throw new Error('Filter must be a Expression.');
}
return JSON.parse(filter.toJson());
}
}
//# sourceMappingURL=expression-parser.android.js.map