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.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65fc69d0ef0c2a059b86245052870ae6274a208da6c2431d7a5227afe1e7a654 |
|
MD5 | 4fa6b1c267075c1ad235b0eb8d189e9e |
|
BLAKE2b-256 | 4bd569d010fb3b5f426fbbedf3664a21168adcaaca24a0e5eb0c3f2183352a7c |
Hashes for datasette_leaflet_geojson-0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b3212e213eeecb9f3ca5e68cc3ff111c9179e3a30e22a24af06cc1033fd3b9e |
|
MD5 | 64858c539442cbfbe9b4f42bc67b2ec2 |
|
BLAKE2b-256 | 994969dc9a7c0dc1b733d83c4841ba07445ca8763090d1d0a0db825ca8b04b47 |