Skip to content

geostyler/geostyler-masterportal-parser

Repository files navigation

geostyler-masterportal-parser

Coverage Status License npm version

GeoStyler-Style-Parser implementation for Masterportal Styles

How to use

ES6:

import MasterportalParser from "geostyler-masterportal-parser";

const pointSimplePoint = {
  name: "My Style",
  rules: [
    {
      name: "My Rule",
      symbolizers: [
        {
          kind: "Mark",
          wellKnownName: "circle",
          color: "#FF0000",
          radius: 6
        }
      ]
    }
  ]
};

const parser = new MasterportalParser();

const { output: mpStyle } = await parser.writeStyle(pointSimplePoint);
console.log(mpStyle);

Browser:

const pointSimplePoint = {
  name: "My Style",
  rules: [
    {
      name: "My Rule",
      symbolizers: [
        {
          kind: "Mark",
          wellKnownName: "Circle",
          color: "#FF0000",
          radius: 6
        }
      ]
    }
  ]
};
var parser = new GeoStylerMasterportalParser.MasterportalStyleParser();
parser
  .writeStyle(pointSimplePoint)
  .then(function(res) {
    var mpStyle = res.output;
    console.log(mpStyle);
  });

Funding & financial sponsorship

Maintenance and further development of this code can be funded through the GeoStyler Open Collective. All contributions and expenses can transparently be reviewed by anyone; you see what we use the donated money for. Thank you for any financial support you give the GeoStyler project 💞

About

GeoStyler-Style-Parser implementation for Masterportal Styles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published