https://github.com/simonw/datasette-leaflet-geojson
Datasette plugin that replaces any GeoJSON column values with a Leaflet map.
https://github.com/simonw/datasette-leaflet-geojson
datasette datasette-io datasette-plugin gis leaflet
Last synced: 3 months ago
JSON representation
Datasette plugin that replaces any GeoJSON column values with a Leaflet map.
- Host: GitHub
- URL: https://github.com/simonw/datasette-leaflet-geojson
- Owner: simonw
- Created: 2018-05-27T01:42:30.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-04-25T05:04:35.000Z (over 1 year ago)
- Last Synced: 2025-06-17T10:50:49.139Z (4 months ago)
- Topics: datasette, datasette-io, datasette-plugin, gis, leaflet
- Language: Python
- Homepage:
- Size: 95.7 KB
- Stars: 23
- Watchers: 2
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# datasette-leaflet-geojson
[](https://pypi.org/project/datasette-leaflet-geojson/)
[](https://github.com/simonw/datasette-leaflet-geojson/releases)
[](https://github.com/simonw/datasette-leaflet-geojson/actions?query=workflow%3ATest)
[](https://github.com/simonw/datasette-leaflet-geojson/blob/main/LICENSE)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

## 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`:
```json
{
"plugins": {
"datasette-leaflet-geojson": {
"default_maps_to_load": 20
}
}
}
```
Then run Datasette with `datasette mydb.db -m metadata.json`.