compassinformatics / cpsi-mapview

GNU General Public License v3.0
6 stars 14 forks source link

Update geostyler-openlayers-parser #415

Closed geographika closed 3 years ago

geographika commented 3 years ago

As noted in #204 - if the project is updated to OL6 then we can also update both geostyler-sld-parser and geostyler-openlayers-parser that are used in the project.

See https://github.com/compassinformatics/cpsi-mapview/blob/6e297c19e59ec8d5042fc3dff8faf2f19fc8e7dd/package.json#L27

simonseyock commented 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.

simonseyock commented 3 years ago

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.

geographika commented 3 years ago

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.

simonseyock commented 3 years ago

I was told by @jansule that geostyler accepts an ol object. This is already passed. So we are on the save side already :)