Skip to main content

Mapping tile server for Datasette, serving tiles from MBTiles packages

Project description

datasette-tiles

PyPI Changelog Tests License

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 - this can also be accessed via the table and database action menus for that database.

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

datasette-tiles-0.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datasette_tiles-0.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file datasette-tiles-0.2.tar.gz.

File metadata

  • Download URL: datasette-tiles-0.2.tar.gz
  • Upload date:
  • Size: 4.2 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

Hashes for datasette-tiles-0.2.tar.gz
Algorithm Hash digest
SHA256 27b379d5886bc98b3d83760d98f4bfb305fcea442cd740e107faf6c3416452f6
MD5 7e9f705a353bb661aa7c2083754e798d
BLAKE2b-256 3afe6643894e81f053208fa28222d35a70605b58e9272547af815b4e49ed474c

See more details on using hashes here.

File details

Details for the file datasette_tiles-0.2-py3-none-any.whl.

File metadata

  • Download URL: datasette_tiles-0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.0 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

Hashes for datasette_tiles-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f083d16078001ff5ea70614d1e4378854f37d44c34d8f6ff47aa8ef7763e1676
MD5 f05b319f7b77663d6c9f5d2bf7c18a66
BLAKE2b-256 558031df256d22f72758087541b3980d5041aef0ed958f3d67f64a2e8c178d51

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page