Git Product home page Git Product logo

mbtiles-server's Introduction

mbtiles-server

Wow. It's really easy to serve mbtiles files without having to host them with Mapbox, just serve them yourself.

First, just create an mbtiles file (via Tilemill probably cause it's freaking amazing), then:

  1. npm install
  2. node server.js TILEFILE [PORT]

Visit http://localhost:3000/3/1/2.png

mbtiles-server's People

Contributors

ajturner avatar chelm avatar contolini avatar kevinschaul avatar stevage avatar tobinbradley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mbtiles-server's Issues

Server fails to start up - not creating an express app

I've just installed the latest version of the mbtiles-server and it appears to be missing something. Executing it results in... nothing. From a quick glance at the code, it looks like you're not creating an express app. The port variable is unused. Any chance you're latest check-in wasn't what you expected?

Tile does not exist

In the browser it shows:
Tile rendering error: Error: Tile does not exist

In Terminal it says:
$ node server.js ~/TESTtiles/importfile.json
express deprecated req.param(name): Use req.params, req.body, or req.query instead server.js:20:25
express deprecated req.param(name): Use req.params, req.body, or req.query instead server.js:23:29
express deprecated req.param(name): Use req.params, req.body, or req.query instead server.js:23:45
express deprecated req.param(name): Use req.params, req.body, or req.query instead server.js:23:61

path with filename

Hi,
great project!
would it be possible to serve multiple files using a path with the filename?

for example a folder like:

./my_tiles1.mbtiles
./my_tiles2.mbtiles

and serving them like:

localhost:3000/my_tiles1/z/x/y.png
localhost:3000/my_tiles2/z/x/y.png

thx!

better way of handling get tile errors

Refer to mapbox/mapbox-gl-js#1800 -

Need better way to handle errors when no tiles are present. This one is beyond me, but for the moment I am just sending

res.status(204)

instead of the 404 error, but there must be a better way. Maybe when mapbox figures it out we can roll that into this server.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.