Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Expressions #9803

Closed
Closed

Description

@tobrun

tl:dr ticket discussing public API design for expressions #9439 on Android.

Background

With Android SDK 5.0.0, we introduced Functions to support data driven styling:

The value for any layout or paint property may be specified as a function. Functions allow you to make the appearance of a map feature change with the current zoom level and/or the feature's properties.

For example, the Android binding exposes an interval zoom function as

    layer.setProperties(
      fillColor(
        zoom(
          interval(
            stop(1, fillColor(Color.RED)),
            stop(5, fillColor(Color.BLUE)),
            stop(10, fillColor(Color.GREEN))
          )
        )
      )
    );

This will change the fillColor of FillLayer depending on the zoom level of a map.

Way forward

Project Arbex in gl-js introduces the concept of using expressions as part of Functions.

Required expression value An expression defines how one or more feature property values and/or the current zoom level are combined using logical, mathematical, string, or color operations to produce the appropriate style value.

See the style spec draft of functions for more details.

API proposal

On the Android binding we would like to continue the DSL approach taken with the initial Function implementation. We still need to identify what it will take to bring the expression concept to the Android binding. TBD.

Activity

  1. added
    Android
    on Aug 18, 2017
  2. added this to the milestone on Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Android

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions