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

Using dash with function() does not work #794

Open
westnordost opened this issue Mar 28, 2022 · 0 comments
Open

Using dash with function() does not work #794

westnordost opened this issue Mar 28, 2022 · 0 comments

Comments

@westnordost
Copy link

TANGRAM VERSION: 0.21.1

ENVIRONMENT: Firefox 98.0.2, Windows 11

TO REPRODUCE THE ISSUE, FOLLOW THESE STEPS:

Copy and paste this style

sources:
    jawg:
        type: MVT
        url: https://tile.jawg.io/streets-v2/{z}/{x}/{y}.pbf
        max_zoom: 16
        url_params:
            access-token: Rqx0Qqc3TAHCG5MVXmxSAkaSgwm5nVSq4fV8IeTxiq9cieOQFfOt5BsYjK8Cwkqr

layers:
    road:
        data: { source: jawg }
        filter: { class: [main] }
        draw:
            lines:
                order: 1
                color: "#fff"
                width: 16m
                dash: [1,1] # function() { return [1,1] }

into https://play.tangram.city/?#14.4750/40.7252/-73.9982

You should see something like this

image

Now, replace the [1,1] behind dash: with the commented out part.

RESULT:

play.tangram.city freezes, the map is not rendered.

EXPECTED RESULT:

The map is rendered exactly the same as before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant