Skip to content

Commit

Permalink
Update the docs to show the default limit and offset of getClusterLea…
Browse files Browse the repository at this point in the history
…ves (#10403)

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.
  • Loading branch information
henk23 authored Mar 8, 2021
1 parent 69fd45c commit df453d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/source/geojson_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
* @param offset The number of features to skip (e.g. for pagination). (Defaults to `0` if a falsy value is given.)
* @param callback A callback to be called when the features are retrieved (`(error, features) => { ... }`).
* @returns {GeoJSONSource} this
* @example
Expand Down

0 comments on commit df453d3

Please sign in to comment.