GIS module for Sahana Eden 2.0
Upgrade to new JavaScript libraries
The core JavaScript Mapping Library that we use is still OpenLayers 2.x
This is very old and we would benefit from upgrading to the current 6.x release
- no need to maintain the old one for browser changes (Just 1 instance of that so far: )
- we can take advantage of new features & performance upgrades (like TileJSON)
At the core this isn't too hard and much progress has already been made (& UCCE already uses OL6 within the DC Editor)
The big issue is the User Interface, especially for the main map.
This is currently built on GeoExt 1.1 & ExtJS 3.4.
The obvious solution would be to upgrade to the current GeoExt, and hence ExtJS 6.2, however that version of ExtJS is no longer available and has strict GPL licensing around it, which doesn't really make it suitable for us.
GeoExt are also not moving very fast and a dependency on that seems unwise if we're making a big change anyway.
Although we could bring in the GeoExt code that we use and maintain it ourselves (it is BSD-licensed), it depends on !ExtJS, which is not, so this isn't really an option.
So what UI toolkit should we use instead?
An obvious option would be jQueryUI, since we already use that extensively for custom widgets in Eden, and we already use the widget factory for our OL6-version of the Map
Although it is in maintenance mode.
It has limited Widgets available: Buttons, Dialog, Menus, Tabs all there, but no Toolbar (we can probably use Controlgroup for this) Panels or Tree (we can either use the separate LayerSwitcher or else use JSTree, as we already use this elsewhere & it's well-maintained).
We can also see about bringing in components from PrimeUI...that isn't maintained, however the Apache 2 license means we can take anything we want from there.
There are other options which we could consider:
- VueJS
- https://vue3openlayers.github.io/
- https://vuelayers.github.io/
- https://meggsimum.github.io/wegue/#/
- Basic Tree example: https://v3.vuejs.org/examples/tree-view.html
- PrimeVue has widgets: https://primefaces.org/primevue/
- Angular
- TypeScript-only :/
- BackBone/Mustache
- BluePrint
- https://blog.palantir.com/scaling-product-design-with-blueprint-25492827bb4a
- looks good, but Palantir :/ & no Mobile :/ & TS :/
- Ember
- Lit (lightweight web components)
- React
- Webix
- GPL, but can be combined with MIT
- Has a Tree
Other Issues
- Import / Export SLD <> gis_style
- Should be pretty easy as our model is basically a JSON version of SLD anyway
- Import / Export WMC <> gis_config
- Import for Shapefile needs completing
- Export to Shapefile should use Python-GDAL bindings not shell utilities
- Filtered Maps (e.g. Summary/Map methods) trigger 2x requests to the server for the GeoJSON