Skip to content

Support for OL flat styles #841

@jahow

Description

@jahow

Introduction

OpenLayers provides a "flat style" format, see API doc here.

Support for this format brings multiple advantages:

  • flat styles are a requirement for WebGL layers (these layers do not support style functions)
  • flat styles are serializable to JSON and do not rely on symbols exported by the OpenLayers package

Using flat styles is now the recommended way to implement symbology in OpenLayers, even though they do not offer as much flexibility as the regular class-based styles and style functions.

Please note that flat styles rely heavily on expressions, see API doc here. Expressions in OpenLAyers are largely inspired by MapLibre expressions format.

Roadmap

  • Create a new OlFlatStyleParser class
  • Expose this class through a new entrypoint in the package.json (this allows tree-shaking)
  • Implement GeoStyler => OL flat style conversion
  • Implement GeoStyler expressions => OL expressions
  • Implement OL flat style => GeoStyler conversion
  • Implement OL expressions => GeoStyler expressions

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions