Skip to content

fill-opacity not interpolated correctly outside of a tile's zoom range #8817

Description

@ansis

mapbox-gl-js version: 1.4.0

browser: all

Steps to Trigger Behavior

  1. Create a style with an opacity expression that uses linear interpolation with both zoom and a data property:
"fill-opacity": [
            "interpolate",
            ["linear"],
            ["zoom"],
            0.5,
            0,
            1,
            ["match", ["get", "fakeprop"], "nope", 1, 1]
        ]

  1. start at zoom 0
  2. zoom to zoom 2

Link to Demonstration

I'm opening a PR with a patch and regression test soon. This issue is just to document the problem.

Expected Behavior

Opacity is applied as intended.

Actual Behavior

Opacity is interpolated to a value greater than 1 resulting in the incorrect color for the split second before new tiles are loaded.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions