2.3.1 • Published 8 years ago

tilelive-bridge v2.3.1

Weekly downloads
14
License
-
Repository
github
Last release
8 years ago

tilelive-bridge

Implements the tilelive API for generating mapnik vector tiles from traditional mapnik datasources.

Build Status Coverage Status Build status

new Bridge(options, callback)

  • xml: a Mapnik XML string that will be used to generate vector tiles.
  • base: Optional, basepath for Mapnik map. Defaults to __dirname.

Installation

npm install tilelive-bridge

Though tilelive is not a dependency of tilelive-bridge you will want to install it to actually make use of tilelive-bridge through a reasonable API.

Usage

var tilelive = require('tilelive');
require('tilelive-bridge').registerProtocols(tilelive);

tilelive.load('bridge:///path/to/file.xml', function(err, source) {
    if (err) throw err;

    // Interface is in XYZ/Google coordinates.
    // Use `y = (1 << z) - 1 - y` to flip TMS coordinates.
    source.getTile(0, 0, 0, function(err, tile, headers) {
        // `err` is an error object when generation failed, otherwise null.
        // `tile` contains the compressed image file as a Buffer
        // `headers` is a hash with HTTP headers for the image.
    });

    // The `.getGrid` is implemented accordingly.
});
2.3.1

8 years ago

2.3.0

8 years ago

2.2.3

8 years ago

2.2.2

8 years ago

2.2.1

9 years ago

2.2.0

9 years ago

2.1.0

9 years ago

2.0.0

9 years ago

1.6.0

9 years ago

1.5.1

9 years ago

1.5.0

9 years ago

1.4.2

9 years ago

1.4.1

9 years ago

1.4.0

9 years ago

1.3.0

9 years ago

1.2.7

9 years ago

1.2.6

9 years ago

1.2.5

9 years ago

1.2.4

10 years ago

1.2.3

10 years ago

1.2.2

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago

0.6.0

10 years ago

0.5.0

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago