Investigate OpenLayers update
Description
Bump OL to the latest stable version(e.g. v6.14.1).
What kind of improvement you want to add? (check one with "x", remove the others)
- [ ] Minor changes to existing features
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [X] Other... Please describe: OL lib update
Other useful information
@dsuren1 we should start investigating this to report relevant findings to consider as part of the update in MS. Let's see if there are relevant blocking things on this that are preventing us to do the update.
@tdipisa
In general, I don't find anything major that breaks the core feature used in Mapstore with some amendements to existing configuration to support latest version
Major change: The ability to compose layers with different renderer types. Previously, the map used a single rendering strategy, and all layers in your map had to implement that strategy. Now it is possible to have a map with layers that use different rendering technologies. This makes it possible, for example, to have Canvas (2D) layer composed together with a WebGL based layer in the same map. It is also possible to create layers with custom renderers. So you could have a map that uses another library (like d3) to render one layer and use OpenLayers to render the other layers. Ref
This opens up further possibilities to our framework.
Note: Supporting improvement mentioned above, the RenderType from Vector and Vector tile layer and LayerType from has been removed. Ref .
Need fixes:
- Measurement support - Draw interaction is unable to determine if the event is within the snapping tolerance of the start coord which eventually fails to dispatch
drawEnd. This is due tosegmentOverlayelements to show segment lengths in measurement interferes withfinishDrawing -
Custom Graticule Layerin Mapstore needs to be revisited and analyzed to see ifol/layer/Graticulecan be used instead else the custom one needs to be aligned with latest Ol version. As thevectorContextproperty that allowed us to render features or geometries directly to the map has been modified such that it needs to be explicitly created first (viagetVectorContext) to be used. - Tests
- Cases depending on render type and layer type needs update
- Cases where assertion inside the map dispatch event and mock events fails and needs to be investigated
- Need to keep an eye if performance improvement in latest version is not inversely affecting us in any scenario
General Amendments:
- ol/View - View is constrained so only one world is visible by default. To get the previous behavior, view has to be configured with
multiWorld: trueexplicitly - Map - Unlisten a map event requires listener argument to not be null
- Replace existing
precomposeandpostcomposeevents, and register forprerenderandpostrenderevents on layers. And furthermorerenderevent, should now listen forpostrender
With the above general amendements the following works fine, hoping I haven't accidentally missed anything
- [x] Map
- [x] All layers types
- [x] CUSTOM HOOKS
- [x] Vector styling
- [x] Annotations
- [x] Draw tools (except Measure tool)
- [x] Geostory
- [x] Dashboard
@offtherailz @allyoucanmap @MV88 it would be good to have your review of the above before proceeding with the creation of a dedicated issue for the update.