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

unhandled invalid font color error prevents drawing #627

Open
meetar opened this issue Dec 8, 2017 · 0 comments
Open

unhandled invalid font color error prevents drawing #627

meetar opened this issue Dec 8, 2017 · 0 comments

Comments

@meetar
Copy link
Member

meetar commented Dec 8, 2017

in v0.14.2, if a font: fill or a stroke: color is a function which returns an invalid color value, drawing is prevented for the related tile, and the console returns:

Tangram v0.14.2 [error]: Error building tile mapzen/9/82/198/9: TypeError: Cannot read property '3' of undefined

Example scene file:

sources:
    mapzen:
        type: TopoJSON
        url: https://tile.mapzen.com/mapzen/vector/v1/all/{z}/{x}/{y}.topojson

layers:
    places:
        data: { source: mapzen }
        draw:
            text:
                font:
                    fill: function() { return feature.nonexistant_color_property }

EXPECTED RESULT:

If a polygon style has a similar color setting it simply doesn't draw – In both cases a more descriptive error message could mention an invalid color as a clue about what was wrong.

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

No branches or pull requests

1 participant