Closed geographika closed 3 years ago
It has to be checked that geostyler works with the ol legacy version of ol 6 that is used. Either it fails on requiring the necessary classes, then we have to look if we can provide both - the es6 and the legacy way from the same library. Or it just works. We have to check that.
It seems that geostyler has bundled an own openlayers version. It can theoretically cause issues if objects created by one openlayers are used in another instance. But with style objects this does not seem to be the case.
I would suggest we use for now the bundled version. I think the only objects that are every passed from geostyler back to cpsi-mapview are styles and maybe geometries.
I am not really sure if it is possible to create a geostyler bundle without openlayers. And the openlayers that we use can probably not be bundled with geostyler as we do not provide es6 exports.
Geostyler is really only used for converting SLD styles to OL styles, so approach seems fine to me. I presume ES6 can't happen for GeoExt based projects until ExtJS allows it, which seems planned for ExtJS 8.0.
I was told by @jansule that geostyler accepts an ol
object. This is already passed. So we are on the save side already :)
As noted in #204 - if the project is updated to OL6 then we can also update both
geostyler-sld-parser
andgeostyler-openlayers-parser
that are used in the project.See https://github.com/compassinformatics/cpsi-mapview/blob/6e297c19e59ec8d5042fc3dff8faf2f19fc8e7dd/package.json#L27