Socket
Book a DemoInstallSign in
Socket

mapnik-xml-to-mapbox-gl-json

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapnik-xml-to-mapbox-gl-json

Transform Mapnik XML to Mapbox GL JSON

0.0.2
latest
Source
npmnpm
Version published
Maintainers
2
Created
Source

npm version

Mapnik XML to Mapbox GL JSON

Converts Mapnik XML styles into the Mapbox GL JSON format

Installation

$ npm install -g mapnik-xml-to-mapbox-gl-json

Or download source and run

$ npm install

Usage

mapnik-xml-to-mapbox-gl-json [settings file] [input XML file] [output JSON file]

$ ./bin/mapnik-xml-to-mapbox-gl-json bin/settings.json files/input.xml files/output.json

Optional flags

-v Validates generated JSON using mapbox-gl-style-lint

-c Adds an 'paint.hide-*' class to all layers where the asterix is the layers 'source-layer'

Conversion implementation

The converter does not support all Mapnik XML rules. Below are the rules that are converted to a corresponding Mapbox GL JSON style property:

  • Filter
  • MinScaleDenominator
  • MaxScaleDenominator
  • PolygonSymbolizer
  • LineSymbolizer
  • TextSymbolizer

Notice that all of the existing Mapnik XML parameters for these rules are not converted due to the lack of corresponding Mapbox GL JSON counterparts, or to the fact that they was not needed for our use case. Some parts are specific for our use case and needs modification to suit different Mapnik XMLs.

FAQs

Package last updated on 08 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.