Closed the-kenny closed 7 months ago
This is a great improvement, thanks. Do you have any tips on how I can manually test it?
Sure! With this patch, the following SQL when run in Datasette should display an error for the first row and a LineString for the second. Without the patch, it will display an empty map for the first (plus an error in the inspector) and no map at all for the second row.
select '{"type": "MultiLineString"}' as geojson
UNION ALL
select '{"type": "LineString", "coordinates": [[8,51],[9,52]]}' as geojson
Thanks, that was just what I needed:
This modifies
addMap
to display an error message in case anything fails while creating the map. This fixes an issue where invalid GeoJSON would prevent maps in "later" rows from being displayed.