Skip to main content

A Datasette plugin that renders GeoJSON columns using Leaflet

Project description

datasette-leaflet-geojson

PyPI Changelog Tests 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?MNG_AGENCY=Palo+Alto%2C+City+of

datasette-leaflet-geojson in action

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

datasette-leaflet-geojson-0.8.tar.gz (4.2 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page