Code Monkey home page Code Monkey logo

go-mbtiles-server's Introduction

go-mtile-server

A very simple server ready to serve your mbtiles file.
By default a mapbox-gl-js interface is used.

Note: This is more a demo on how to use the very simple mbtiles format in Go than a robust server.

If you want a more advanced server still in Go you should look at consbio/mbtileserver

And if you need to support old browser and generate raster tile from your vector tiles you should look at tileserverGL (NodeJS based)

How to build

run :

$ ./set_go_path.sh

export your GOPATH as displayed, then :

$ go build

How to run

You need an mbtiles file and the associated style.
The easy way is to download vectortile from openmaptile : download andorra for exemple.
You can also generate your own vector tile with openmaptile or tippecanoe

If you want to use Open Sans font are ready to use as pbf : just decompress "demo_public/fonts/open sans ressource.7z".
Look at demo_public/fonts/Readme.md to see how to generate your own.

Put your mbtiles file somewhere and run :

$ ./gomtileserver -mbtiles path/to/your/file.mbtiles

By default style osm-bright is used. To change it you need to change the path "style" in demo_public/index.html

For ease gomtileserver transform style in demo_public/style_src/bright and generate one with current server IP (by changing the {{{HOST}}} value).
TODO: do it better or allow to overwrite the HOST

go-mbtiles-server's People

Contributors

tristangio avatar

Watchers

James Cloos avatar  avatar

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.