UsageThe different ways to load GeoJSON with Maps is currently...
... from the command line: gnome-maps file.geojson
... drag the file to a Maps window
... double click the file to open it with Maps
In order for double clicking the GeoJSON file to work we need to install the application/vnd.geo+json mime-type on the desktop. I have added the mime-type to the freedesktop.org component shared-mime-info. So you will need a release from that module or build it yourself from Git.
GeoJSON files can be used to create a custom layer above the map. For instance displaying political areas like counties or voting area. An example would be all the municipalities of Norway.
You can also add different places, for instance GUADEC this year will be at Karlsruhe. The bid I saw included four different options for venue. We could map this using GeoJSON (I used geojson.io) to create a layer showing the different options on the map.
We lift the code into Maps, we have to change the way the geojson-vt modules include each other in order to fit into the gjs way of doing things, but other than that, the code is unchanged. The code is then used to construct a libchamplain tile source and is then added as an overlay source to the map view.
LimitationsRight now the code will only handle GeoJSON files that do not change the Coordinate Reference System (crs) to something other than the one we are used to (latitude and longitude ranging from -180/-90 to 180/80).
No styling information is taken into account (except the name property for Points). There is no standard GeoJSON styling style. But we could for instance support the one from Mapbox.
FutureStyling and UX for this feature may change before we end up in 3.20. Please try it out and comment and file bugs. It will help us!
If you want to help out now there are some tasks to look at: