JSPM

  • Created
  • Published
  • Downloads 314
  • Score
    100M100P100Q76541F
  • License BSD-3-Clause

Transform cartocss into a draw tangram object.

Package Exports

  • tangram-cartocss

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tangram-cartocss) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

[DEPRECATED] Tangram-cartocss Build Status No Maintenance Intended

This is no longer supported.

Installation & usage

me$ npm i tangram-cartocss
// or
me$ yarn add tangram-cartocss
import CCSS from 'tangram-cartocss';

API

CCSS object

.carto2Draw

const Carto = require('carto');
const CartoCSSRenderer = new Carto.RendererJS({
    reference: tangramReference,
    strict: true
});
const css = `
  #layer {
    line-dasharray: 2,3
  }`;
const layers = CartoCSSRenderer.render(css).getLayers();
console.log('\nlayerToYAML:\n', JSON.stringify(layerToYAML(layers[1], 1), null, 4));

Limitations

Currently, this doesn't support texts, although Tangram supports it.

There are other limitations, but they are imposed by Tangram and tangram-reference.