Add GeoJSON support for viewing files
What does this MR do and why?
Add GeoJSON support for viewing files
Implements rendering a Leaflet map for valid GeoJSON files
(Thanks @MihajloNesic for the initial implementation)
The remaining work from !107944 (closed) is completed by this MR:
-
Sandbox the viewer (security concern). - I believe sandboxing is no longer needed since we're now rendering user-controlled content as text.
-
Fail early for invalid JSON (security concern). - We now fail early if JSON is invalid.
-
Needs tests. -
Couple of minor tweaks I picked up from scanning through the code.
Screenshots or screen recordings
How to set up and validate locally
- Open a
.geojson
file via the repository files browser - A map should be rendered containing the GeoJSON data
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #14134 (closed)
Edited by Jacques Erasmus