Skip to content

Support for all maplibre expression types #322

@Maximkaaa

Description

@Maximkaaa

This is the list of all expression types in Maplibre styles. We want eventually to support correct rendering for all these properties, so we need to convert all of them into Galileo Expr. For some of the expressions this is straightforward (like math functions), others would need some deep considerations first (like heatmap temperature).

If you want to help with this list

  • pick an item
  • implement Galileo counterpart
  • add unit tests to confirm it works
  • add it to the parser
  • add unit tests for parser
  • add conversion method from ML to Galileo
  • visually confirm that the style using this value is rendered correctly (e.g. same in just mljs as in just ml).

Variable binding

  • let
  • var

Ramps / Curves

  • step
  • interpolate
  • interpolate-hcl
  • interpolate-lab

Lookup

  • get
  • has
  • !has
  • at
  • in
  • !in
  • index-of
  • slice
  • length
  • global-state

Decision

  • case
  • match
  • coalesce
  • all
  • any
  • !
  • ==
  • !=
  • >
  • >=
  • <
  • <=
  • within

Math

  • +
  • *
  • -
  • /
  • %
  • ^
  • sqrt
  • abs
  • ceil
  • floor
  • round
  • min
  • max
  • log2
  • log10
  • ln
  • sin
  • cos
  • tan
  • asin
  • acos
  • atan
  • ln2
  • pi
  • e
  • distance

Color

  • rgb
  • rgba
  • to-rgba

Type operators

  • literal (bare JSON primitive via Literal)
  • literal (array/object wrapper via LiteralExpr)
  • typeof
  • to-string
  • to-number
  • to-boolean
  • to-color
  • number
  • string
  • boolean
  • object
  • array
  • collator
  • format
  • image
  • number-format

Feature data

  • feature-state
  • geometry-type
  • id
  • properties
  • accumulated
  • line-progress

Camera

  • zoom

Heatmap

  • heatmap-density

Color relief

  • elevation

String

  • upcase
  • downcase
  • concat
  • is-supported-script
  • resolved-locale
  • split
  • join

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions