A Datasette plugin that renders GeoJSON columns using Leaflet
Project description
datasette-leaflet-geojson
Datasette plugin that replaces any GeoJSON column values with a Leaflet map
Installation
Install this plugin in the same environment as Datasette.
$ datasette install datasette-leaflet-geojson
Usage
Any columns containing valid GeoJSON strings will have their contents replaced with a Leaflet map when they are displayed in the Datasette interface.
Demo
You can try this plugin out at https://calands.datasettes.com/calands/superunits_with_maps?MNG_AGENCY=Palo+Alto%2C+City+of
Configuration
By default this plugin displays maps for the first ten rows, and shows a "Click to load map" prompt for rows past the first ten.
You can change this limit using the default_maps_to_load
plugin configuration setting. Add this to your metadata.json
:
{
"plugins": {
"datasette-leaflet-geojson": {
"default_maps_to_load": 20
}
}
}
Then run Datasette with datasette mydb.db -m metadata.json
.
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
Hashes for datasette-leaflet-geojson-0.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cc0910b66e37b547c235a595b3239c51d607fb1a452438a9850df9a1c403f36 |
|
MD5 | 6836c0cb233e42f9c62e4875cff0992b |
|
BLAKE2b-256 | bea4fb47840eba21967757190ba1fc71084dabbb05b288ce2f852e8a5503f604 |
Hashes for datasette_leaflet_geojson-0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d921b45e2923e5dd897f8d4291b34842356eb1d4c4f86f0725466474a8e6c902 |
|
MD5 | 0219253b3134018bbe77bb9219cdf420 |
|
BLAKE2b-256 | 0ae3d97b5a1cd23051eab3b593b9b4712b23995802a03d9443c6143845f07aa4 |