Skip to content

A Spring Boot and GeoScript web application for your MBTiles map.

Notifications You must be signed in to change notification settings

jericks/MBTilesServer

Repository files navigation

Github Action

MBTiles Server

Serve your MBTiles map on the web.

Build

./gradlew build

Run tests

./gradlew test

Run end to end tests

./gradlew -Dwebdriver.chrome.driver=/Your/Path/To/chromedriver e2e

Run

java -jar mbtilesserver-0.4.0.jar --file=countries.mbtiles --readOnly=true

or if you are building the project:

./gradlew bootRun

or

java -jar build/libs/mbtilesserver-0.4.0.jar --file=countries.mbtiles --readOnly=true

and browse to http://localhost:8080:

alt tag

Examples

Inspect metadata

curl http://localhost:8080/metadata
curl http://localhost:8080/pyramid
curl http://localhost:8080/tile/counts

Create QGIS/GDAL Layer File

curl -o layer.xml http://localhost:8080/gdal && qgis layer.xml

alt tag

Download Tiles

curl -o tile_0_0_0.png http://localhost:8080/tile/0/0/0
curl -o tile_1_0_0.png http://localhost:8080/tile/1/0/0

Download Raster

curl -o us.png http://localhost:8080/raster/400/400/-156.533203,3.688855,-50.712891,56.800878
curl -o us.png http://localhost:8080/raster/4/-122.387/47.581/EPSG:4326/400/400

Add/Update a Tile

curl -F "file=@tile.png" http://localhost:8080/tile/5/0/0
curl -o tile_5_0_0.png http://localhost:8080/tile/5/0/0

Delete a Tile

curl -X DELETE http://localhost:8080/tile/5/0/0
curl http://localhost:8080/tile/5/0/0