Mapping tile server for Datasette, serving tiles from MBTiles packages
Project description
datasette-tiles
Datasette plugin for serving MBTiles map tiles
Installation
Install this plugin in the same environment as Datasette.
$ datasette install datasette-tiles
Demo
You can try this plugin out at https://datasette-tiles-demo.datasette.io/-/tiles
Usage
This plugin scans all database files connected to Datasette to see if any of them are valid MBTiles databases.
It can then serve tiles from those databases at the following URL:
/-/tiles/db-name/zoom/x/y.png
An example map for each database demonstrating the configured minimum and maximum zoom for that database can be found at /-/tiles/db-name
Visit /-/tiles for an index page of attached valid databases.
You can install the datasette-basemap plugin to get a basemap default set of tiles, handling zoom levels 0 to 6 using OpenStreetMap.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-tiles
python3 -mvenv venv
source venv/bin/activate
Or if you are using pipenv:
pipenv shell
Now install the dependencies and tests:
pip install -e '.[test]'
To run the tests:
pytest
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datasette-tiles-0.1.1.tar.gz.
File metadata
- Download URL: datasette-tiles-0.1.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4934928dc0be0a187a0450fe98f0e347e184c3c9edc28222dc4ea79136aaff7
|
|
| MD5 |
9b71868fb44a76703b5a6052682bd580
|
|
| BLAKE2b-256 |
d79eaeb7b3bcf50f0e0a59931ba31168e32f81d2465551c068296c5b22882e4a
|
File details
Details for the file datasette_tiles-0.1.1-py3-none-any.whl.
File metadata
- Download URL: datasette_tiles-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fc23ef5dd0c4b66883add16e4b29007913e3985028b581acc447606a0725d9c
|
|
| MD5 |
e0d076143cf7a4c90228eb04ec3b1d72
|
|
| BLAKE2b-256 |
04f56621a8afe019513c22c252b028542b052635d17e445553982c5c8df5a3ea
|