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

Additional "artifact" circles when using data-driven-styling by zoom on 'circle-radius' #6386

Closed
kdanaher opened this issue Mar 23, 2018 · 4 comments

Comments

@kdanaher
Copy link

mapbox-gl-js version: 0.44.1

Steps to Trigger Behavior

  1. Add layer of 'type': 'circle' and style circle-radius with data driven styling factoring zoom level
  2. Tested using both older stops method as well as newer expressions method.

Expected Behavior

In a previous API version (0.32.1)
v32dds

Actual Behavior

v44dds

As stated above, I've styled circle-radius using the older and newer methods:

Older "stops" method

'circle-radius': {
    property: property_id,
    type: 'exponential',
    stops: [[{"zoom": 4,"value": circle_sizes[0]}, 1],
            [{"zoom": 4,"value": circle_sizes[2]}, 9],
            [{"zoom": 5,"value": circle_sizes[0]}, 2],
            [{"zoom": 5,"value": circle_sizes[2]}, 18],
            [{"zoom": 6,"value": circle_sizes[0]}, 4],
            [{"zoom": 6,"value": circle_sizes[2]}, 36],
            [{"zoom": 7,"value": circle_sizes[0]}, 8],
            [{"zoom": 7,"value": circle_sizes[2]}, 72],
            [{"zoom": 8,"value": circle_sizes[0]}, 16],
            [{"zoom": 8,"value": circle_sizes[2]}, 144]]
}

Newer expressions method

'circle-radius': [
    "interpolate",
    ["exponential", 1],
    ["zoom"],
    4, ["sqrt", ["*", ["get", property_id], 5]],
    8, ["sqrt", ["*", ["get", property_id], 160]]
]
@jfirebaugh
Copy link
Contributor

Thanks for the report @kdanaher. Could you please create a minimal self-contained example on jsbin.com that demonstrates the issue?

@kdanaher
Copy link
Author

Surely -- http://jsbin.com/yobagowica/edit?html,output

The "artifact" circles seem to appear on exact zoom levels. In the linked jsbin, it can be noticeably triggered at z6. Depending on how I write the expression/stops it seems to get better/worse.

@jfirebaugh
Copy link
Contributor

Thanks! This is a duplicate of #5829 / #4691.

@jfirebaugh
Copy link
Contributor

#6768

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

2 participants