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

Update the docs to show the default limit and offset of getClusterLeaves #10403

Merged
merged 1 commit into from
Mar 8, 2021
Merged

Conversation

henk23
Copy link
Contributor

@henk23 henk23 commented Feb 21, 2021

Providing null as a limit worked great on my local dev machine with 3 leaves. When pushed to production it took me some time to figure out why I would get only 10 leaves, although 14 existed. I hope this small hint in the docs will save someone else this time.

Providing `null` as a limit worked great on my local dev machine with 3 leaves. When pushed to production it took me some time to figure out why I would get only 10 leaves, although 14 existed. I hope this small hint in the docs will save someone else this time.
@CLAassistant
Copy link

CLAassistant commented Feb 21, 2021

CLA assistant check
All committers have signed the CLA.

@asheemmamoowala asheemmamoowala added this to the v2.2 milestone Mar 5, 2021
Copy link
Contributor

@karimnaaji karimnaaji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@@ -226,8 +226,8 @@ class GeoJSONSource extends Evented implements Source {
* For clustered sources, fetches the original points that belong to the cluster (as an array of GeoJSON features).
*
* @param clusterId The value of the cluster's `cluster_id` property.
* @param limit The maximum number of features to return.
* @param offset The number of features to skip (e.g. for pagination).
* @param limit The maximum number of features to return. (Defaults to `10` if a falsy value is given.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, limit and offset defaults defined in supercluster: https://github.com/mapbox/supercluster/blob/41c28833fe79d53bc8882a4b9db866cefee795c0/index.js#L120

@karimnaaji karimnaaji merged commit df453d3 into mapbox:main Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants