1.8.1 • Published 7 years ago

mobile-map-builder-cli v1.8.1

Weekly downloads
219
License
-
Repository
-
Last release
7 years ago

Build Status Coverage Status

Mobile Map Builder

An application that helps you build maps & data for mobile applications.

Install

$ npm install -g mobile-map-builder

Quickstart

The core application is a Command Line Interface (CLI) which can be executed in any environment.

Here's how to create your first MBTile map bundle.

$ mmb --bbox '[-76.34, 44.96, -75.24, 45.53]' --min 10 --max 14 --provider bing --service imagery ottawa.mbtiles

  downloading [====================] 100% (2655/2655)
  All done!

Help

For more information on the optional parameters enter --help at the end.

$ mmb --help

  Usage: cli [options] <filename>

  Creates MBTiles from Web Map Tile Service

  Options:

    -h, --help                         output usage information
    -V, --version                      output the version number
    --bbox [Array<number>]             BBox extent in [minX, minY, maxX, maxY] order
    --min, --min-zoom <number>         Minimum Zoom Level
    --max, --max-zoom <number>         Maximum Zoom Level
    -p, --provider [string="imagery"]  Provider name of tile server
    --scheme [string]                  [Optional] Scheme given to MBTiles DB
    --attribution [string]             [Optional] Attribution given to MBTiles DB
    --descr [string]                   [Optional] Description given to MBTiles DB
    --format [string]                  [Optional] Tile image format [png/jpg]
    --type [string]                    [Optional] Type of MBTiles layer [baselayer/overlay]
    -v, --verbose

Examples:

    $ mmb --provider imagery --bbox Ottawa --min 8 --max 17 ottawa.mbtiles

API

index

Create MBTiles

Parameters

  • filepath string Database file path
  • metadata Metadata Metadata according to the MBTile spec v1.1 (optional, default {})
  • options Object Options (optional, default {})
    • options.queue number Define total d3 queue (optional, default 5)
    • options.timeout number HTTP maximum timeout in miliseconds (optional, default 20000)
    • options.interval Object Update time interval (optional, default 64)
    • options.proxy Object? use proxy connection {host, port}
    • options.headers Object? HTTP Headers
    • options.verbose boolean? Output verbose messages on internal operations

Examples

const createMBTiles = require('mobile-map-builder-cli')
const metadata = {
  name: 'Example',
  bounds: [-110, 20, 130, 70],
  minzoom: 1,
  maxzoom: 8,
  description: 'Mobile Map Builder Example',
  url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
  format: 'png'
}
download.on('start', () => console.log('Started!'))
download.on('status', message => console.log(message))
download.on('end', () => console.log('All done! :)'))
download.emit('stop')

Returns EventEmitter

1.8.1

7 years ago

1.8.0

7 years ago

1.7.0

7 years ago

1.6.2

7 years ago

1.6.1

7 years ago

1.6.0

7 years ago

1.5.0

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.17.1

7 years ago

0.17.0

7 years ago

0.16.4

7 years ago

0.16.3

7 years ago

0.16.2

7 years ago

0.16.1

7 years ago

0.16.0

7 years ago

0.15.3

7 years ago

0.15.2

7 years ago

0.15.1

7 years ago

0.15.0

7 years ago

0.14.2

7 years ago

0.14.1

7 years ago

0.14.0

7 years ago

0.13.3

7 years ago

0.13.2

7 years ago

0.13.1

7 years ago

0.13.0

7 years ago

0.12.0

7 years ago

0.10.5

7 years ago

0.10.4

7 years ago

0.10.3

7 years ago

0.10.2

7 years ago

0.10.1

7 years ago

0.10.0

7 years ago

0.9.1

7 years ago

0.9.0

7 years ago

0.8.5

7 years ago

0.8.3

7 years ago

0.8.2

7 years ago

0.8.1

7 years ago

0.8.0

7 years ago

0.7.2

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago