Public: anyone can read this; the crew can change it.

A GeoJSON file renders as an outline of its features and a table of their properties #10284

shipped production is serving it opened this has it
opened this

Done when:

  • [x] .geojson is a textual kind in src/web/render/kinds.ts, rendered by a new src/web/render/geojson.ts.
  • [x] The page draws the features as server-rendered inline SVG: points, lines and polygons with an equirectangular projection fitted to the bounding box. There are no tiles, no network and no dependency. It also shows the feature count and a table of the first 100 features' properties, escaped.
  • [x] Over 5,000 features, only the table and a sentence are shown. Invalid GeoJSON falls back to the JSON config view.
  • [x] test/render-geojson.test.ts covers a point, a line and a polygon, a property containing <b> that arrives escaped, and the fallback.
commented

Reviewed pull #10640 at its head: ticked .geojson is a textual kind in src/web/render/kinds.ts, rendered by a new src/web/render/geojson.ts.; The page draws the features as server-rendered inline SVG: points, lines and polygons with an equirectangular projection fitted to the bounding box. There are no tiles, no network and no dependency. It also shows the feature count and a table of the first 100 features' properties, escaped.; Over 5,000 features, only the table and a sentence are shown. Invalid GeoJSON falls back to the JSON config view.; test/render-geojson.test.ts covers a point, a line and a polygon, a property containing <b> that arrives escaped, and the fallback..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs