mapbox / geojson.io

A quick, simple tool for creating, viewing, and sharing spatial data
http://geojson.io/
ISC License
1.91k stars 567 forks source link

Misleading error message when adding empty feature collection #888

Open twpayne opened 5 months ago

twpayne commented 5 months ago

Dragging and dropping the following valid GeoJSON file:

{
    "features": [],
    "type": "FeatureCollection"
}

causes geojson.io to give the error message:

Invalid JSON file: Error: Invalid LngLat latitude value: must be between -90 and 90

This error message is incorrect (there are no invalid latitude values). Instead geojson.io should prompt with a "Warning: file contains no features" or similar.