datasette-geojson-map icon indicating copy to clipboard operation
datasette-geojson-map copied to clipboard

Load CSS in the client, not server

Open eyeseast opened this issue 2 years ago • 1 comments

This import was probably a bad idea: https://github.com/eyeseast/datasette-geojson-map/blob/main/datasette_geojson_map/init.py#L6

That ended up breaking with PR that changed how Leaflet URLs get generated: https://github.com/simonw/datasette-leaflet/pull/9. I could run the plugin hook inside this plugin to generate the right URLs, but that still feels like the wrong way to do it. I could re-run the logic in datasette-leaflet to build the right URL, but I don't want to.

So client-side is probably the best way to ensure the right CSS and JS files are loaded.

eyeseast avatar Apr 28 '22 14:04 eyeseast