Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mapnik-reference

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapnik-reference

Reference for Mapnik Styling Options

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
804
decreased by-2.55%
Maintainers
1
Weekly downloads
 
Created
Source

mapnik-reference

mapnik-reference is a parse-able spec of what Mapnik can do - what symbolizers it supports and the properties they can contain. It's useful for building parsers, tests, compilers, and syntax highlighting/checking for languages.

Versioning

The version of this repository indicates the schema of the reference.json file. Schema changes of any type are expected to change the implementation requirements of a parser, so they will increment the major version of this repository in semver style.

The directories in this repository directly correspond to released versions of Mapnik and the next targeted release of Mapnik. The latest reference, usually targeted toward a pre-release, is copied into /latest for convenience.

Meaning

The structure of the file is as such:

  • version: the version of Mapnik targeted. Same as the containing directory.
  • style: properties of the Style XML element
  • font-set: properties of the FontSet XML element
  • layer: properties of the Layer XML element
  • symbolizers/*: properties that apply to all symbolizers
  • symbolizers/symbolizer: properties that apply to each type of symbolizer
  • colors: named colors supported by Mapnik. see include/mapnik/css_color_grammar.hpp

Using

This is a valid npm module and thus is pretty easy to use from node.js.

npm install mapnik-reference

Once installing it as a dependency (like it's used in Carto), it can be included and used for a specific version of Mapnik:

var mapnik_reference = require('mapnik-reference');
var data = mapnik_reference.version['2.1.0'];

Other implementations will want to simply copy the JSON file from the desired implementation, like 2.0.1/reference.json.

The file can then be parsed with any of the many json parsers.

Testing

Tests require python:

make test

Users

FAQs

Package last updated on 19 Jun 2012

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc