Package Exports
- mbtiles-server
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 (mbtiles-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
MBTiles Server
Provides a compatible WMTS Tile Server from MBTiles.
Install
$ npm install -g mbtiles-serverQuickstart
$ mbtiles-server --cache /Users/mac/mbtiles --verbose --port 3000
MBTiles Server Service
cache: /Users/mac/mbtiles
protocol: http
port: 3000
domain: localhost
verbose: trueBackground Service
You can also run this server as a native OS background service.
$ sudo mbtiles-server-service start
Starting: mbtiles-serverEnvironment Variables
You can also define the CLI options as environment variables using the following:
$ export MBTILES_SERVER_PROTOCOL=http
$ export MBTILES_SERVER_DOMAIN=localhost
$ export MBTILES_SERVER_CACHE=/home/ubuntu/mbtiles
$ export MBTILES_SERVER_PORT=5000
$ export MBTILES_SERVER_VERBOSE=trueDocker
A Dockerfile is provided for easy Docker deployment
$ docker pull deniscarriere/mbtiles-server
$ docker run --rm -it \
-p 5000:5000 \
-v /home/ubuntu/mbtiles/:/root/mbtiles \
deniscarriere/mbtiles-serverStart containers automatically
https://docs.docker.com/engine/admin/host_integration/
$ docker run -d \
--name mbtiles-server \
-p 5000:5000 \
-v /home/ubuntu/mbtiles/:/root/mbtiles \
deniscarriere/mbtiles-serverCLI Help
For any additional help using the CLI, use the --help flag.
Provides a compatible WMTS Tile Server from MBTiles.
Usage
$ mbtiles-server
Options
--cache [~/mbtiles] Cache
--protocol [http] Protocol
--port [5000] Port
--domain [localhost] Domain
--verbose [false] Verbose output
Examples
$ mbtiles-server --cache /Users/mac/mbtiles --port 5000 --verboseWMTS
The goal of providing a WMTS enabled service is to be performance oriented and scalable. Therefore, servers must be able to return tiles quickly. A good way to achieve that is to use locally stored pre-rendered tiles that will not require any image manipulation or geo-processing.
API
start
Start Server
Parameters
options[string] Server Optionsoptions.cache[string] CACHE file path (optional, default~/mbtiles)options.protocol[string] URL Protocol (optional, default'http')options.domain[string] URL Domain (optional, default'localhost')options.port[string] URL Port (optional, default5000)options.verbose[string] Verbose output (optional, defaultfalse)
Examples
server.start({cache: '/Users/mac/mbtiles', port: 5000, verbose: true})Returns void System output for logs