simonw / datasette-leaflet-geojson

Datasette plugin that replaces any GeoJSON column values with a Leaflet map.
17 stars 7 forks source link

Doesn't play well with truncated cells #3

Closed simonw closed 4 years ago

simonw commented 5 years ago

As of Datasette 0.24 content in cells is truncated, which doesn't play well with this plugin: https://github.com/simonw/datasette/issues/330

Need to switch to fetching the raw JSON instead.

simonw commented 4 years ago

Two options to fix this:

  1. Switch the plugin to using a fetch() against the underlying JSON API to get back the non-truncated JSON
  2. Set up a custom render_cell hook which looks for likely GeoJSON (cells with JSON values that have the right keys, using similar logic to the JavaScript) and cause those not to be truncated.

Option 2 is simpler, so I think I'll go with that.

simonw commented 4 years ago

I think this may fix #6 too - if this plugin renders the data then datasette-pretty-json should leave it unaffected.