Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

line-patterns that use a step expression don't work at all zoom levels #4787

Open
lkskrt opened this issue Oct 1, 2024 · 1 comment
Open
Labels
bug Something isn't working PR is more than welcomed Extra attention is needed

Comments

@lkskrt
Copy link

lkskrt commented Oct 1, 2024

Hi, I think I have identified an issue that affects line-patterns that use a step expression.

maplibre-gl-js version: 4.7.1
browser: At least Chrome and Firefox

Steps to Trigger Behavior

Configure a style that uses a step expression as a value for line-pattern paint:

new Map({
  style: {
    layers: [
      {
        paint: {
          'line-pattern': [
            'step',
            ['zoom'],
            'railway-small',
            13,
            'railway-large',
          ],
        },
      },
    ],
  },
  zoom: 13.1,
};

Link to Demonstration

https://stackblitz.com/edit/maplibre-sprite-test

Expected Behavior

The sprite railway-large should be rendered when the zoom level is greater than 13.

image

Actual Behavior

Only thin lines are rendered after the map mounts at zoom level 13.1:

image

It is necessary to zoom in and out again a couple of times for the correct sprites to show up.

@HarelM
Copy link
Collaborator

HarelM commented Oct 1, 2024

Might be similar to the following bug:

@HarelM HarelM added bug Something isn't working PR is more than welcomed Extra attention is needed labels Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR is more than welcomed Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants