How to use the geostyler-sld-parser.default function in geostyler-sld-parser

To help you get started, we’ve selected a few geostyler-sld-parser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github geosolutions-it / MapStore2 / web / client / utils / VectorStyleUtils.js View on Github external
/*
 * Copyright 2018, GeoSolutions Sas.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree.
 */

const {isNil} = require('lodash');
const {set} = require('./ImmutableUtils');
const {colorToRgbaStr} = require('./ColorUtils');
const axios = require('axios');
const SLDParser = require('geostyler-sld-parser').default;
const StyleParsers = {
    sld: new SLDParser()
};

/**
 * checks if there is at least one attrbute in the object
 * @param {object} style the object to use for filtering the list of attributes
 * @param {string[]} attributes to use as filter list
 * @return {boolean} the result of the check
*/
const isAttrPresent = (style = {}, attributes) => (attributes.filter(prop => !isNil(style[prop])).length > 0);

/**
 * check if the style is assignable to an ol.Stroke style
 * @param {object} style to check
 * @param {string[]} attibutes of a stroke style
 * @return {boolean} if the style is compatible with an ol.Stroke
*/

geostyler-sld-parser

GeoStyler Style Parser implementation for SLD

BSD-2-Clause
Latest version published 2 months ago

Package Health Score

81 / 100
Full package analysis

Popular geostyler-sld-parser functions