Skip to content

shortbread-tiles/shortbread-demo-maplibre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shortbread-demo-maplibre

A demo of using Shortbread Vector Tiles styled with MapLibre map rendering.

This is a very, very simple demo style, which doesn't show the range of what is possible with Shortbread.

Get some tiles

Consult the Shortbread documentation for how to get a shortbread mbtiles file.

Running

Serving vector tiles from a mbtiles file

Your browser needs the tiles in the mbtiles file to be accessible via HTTP. Tilemaker contains a simple tilemaker-server tool which does this easily. Keep this command running while you use the map.

tilemaker-server ./path/to/shortbread.mbtiles

The map style presumes the tiles are served on http://localhost:8080/, which is the default for this command.

Local files

You need to access the index.html file via HTTP, not via a file:// URL, which happens when you open the HTML file in your web browser. Use a static HTTP server like simple-http-server to serve the files in this directory. This tool

simple-http-server --cors -i .

The map style & HTML & JS presume content is server on http://localhost:8000/, which is the default for this command.

Website

View the simple map: http://localhost:8000/!

About

Rendering Shortbread tiles with MapLibre

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages