Skip to content

icon size jump using a nested data expression in a zoom expression #8895

Description

@tristen

mapbox-gl-js version: v1.4.0
browser: Google Chrome Version 77.0.3865.120 (Official Build) (64-bit)

Steps to Trigger Behavior

Create a zoom expression for the icon-size property with a data condition within it. i.e.

[
  'interpolate',
  ['exponential', 1.5],
  ['zoom'],
  8,
  ['match', ['get', 'iso_3166_1'], ['JP'], 0.75, 1],
  14,
  1
]

Link to Demonstration

The bug looks like this:

icon-jump

The test case I have for this is pretty subtle and doesn't totally match the gif above. It's possible the addition of collision detection where there are more features on the map is causing it? https://jsfiddle.net/tristen/zn7ks40L/

Expected Behavior

There would be no jump in size but that the size of the icon would interpolate across the zoom expression set.

Actual Behavior

Icon jumps down in size when zooming from one zoom stop to another.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions