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

Support property functions for icon-image #4304

Closed
jhurlb opened this issue Feb 20, 2017 · 3 comments
Closed

Support property functions for icon-image #4304

jhurlb opened this issue Feb 20, 2017 · 3 comments
Assignees

Comments

@jhurlb
Copy link

jhurlb commented Feb 20, 2017

Hey everyone,

We've been using mapbox-gl for a bit now and rely on icon-image property functionality to draw our symbols based on a property value. The property tag has worked on versions 0.22.0 to 0.31.0. Since 0.32.0 this functionality seems to be removed. I've looked around and can't find anything that says it was removed. I know the docs say that data driven styling doesn't work for this tag, but it has worked for many versions.

mapbox-gl-js version:
0.22.0 -> 0.31.0 works
0.32.0 + broken

Browser/OS version:
Chrome Version 56.0.2924.87 on Mac OS X 10.11.6

Steps to Trigger Behavior

  1. use icon-image with a property
"layout" : {
    "icon-image" : {
        "property" : "m",
        "stops"    : [
            [{
                zoom  : 0,
                value : 0
            }, ""],
            [{
                zoom  : 12,
                value : 1
            }, "marker-{c}-{d}"]
        ]
    }
}

The above example results in layout.icon-image: property functions not supported since 0.32.x

Expected Behavior

Using property for icon-image functions as it has for many versions.

Actual Behavior

Using property for icon-image results in layout.icon-image: property functions not supported since 0.32.x

@sondreb
Copy link

sondreb commented Mar 10, 2017

Attempted to upgrade from 0.31 to 0.33, getting the same type of exceptions on other properties as well, such as "line-width".

@jfirebaugh jfirebaugh changed the title layout.icon-image: property functions not supported Support property functions for icon-image Mar 10, 2017
@jfirebaugh
Copy link
Contributor

The error is correct; line-width and icon-image have never supported property functions. If they appeared to be working in prior versions, it was by accident. You'll need to remove the use of property functions until they are supported. That work is being tracked in #3045 (line-width) and #4304 (icon-image).

@jfirebaugh
Copy link
Contributor

I guess we didn't have a tracking issue for icon-image -- we can repurpose this issue for that.

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

3 participants