Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fifty-humans-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@feltmaps/js-sdk": minor
---

Add pageSize and select to getFeatures
22 changes: 12 additions & 10 deletions docs/Layers/LayersController.md
Original file line number Diff line number Diff line change
Expand Up @@ -669,21 +669,23 @@ const feature = await felt.getFeature({ layerId: "layer-1", id: 123 });

## getFeatures()

> **getFeatures**(`params`: \{ `layerId`: `string`; `filters`: [`Filters`](Filters.md); `sorting`: [`SortConfig`](../Shared/SortConfig.md); `boundary`: [`GeometryFilter`](GeometryFilter.md); `search`: `string`; `pagination`: `null` | `string`; }): `Promise`\<\{ `features`: [`LayerFeature`](LayerFeature.md)\[]; `count`: `number`; `previousPage`: `null` | `string`; `nextPage`: `null` | `string`; }>
> **getFeatures**(`params`: \{ `layerId`: `string`; `filters`: [`Filters`](Filters.md); `sorting`: [`SortConfig`](../Shared/SortConfig.md); `boundary`: [`GeometryFilter`](GeometryFilter.md); `search`: `string`; `pagination`: `null` | `string`; `pageSize`: `number`; `select`: `string`\[]; }): `Promise`\<\{ `features`: [`LayerFeature`](LayerFeature.md)\[]; `count`: `number`; `previousPage`: `null` | `string`; `nextPage`: `null` | `string`; }>

Get a list of layer features.

### Parameters

| Parameter | Type | Description |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `params` | \{ `layerId`: `string`; `filters`: [`Filters`](Filters.md); `sorting`: [`SortConfig`](../Shared/SortConfig.md); `boundary`: [`GeometryFilter`](GeometryFilter.md); `search`: `string`; `pagination`: `null` \| `string`; } | - |
| `params.layerId` | `string` | The ID of the layer to get features from. |
| `params.filters`? | [`Filters`](Filters.md) | Filters to be applied. These filters will merge with layer's own filters. |
| `params.sorting`? | [`SortConfig`](../Shared/SortConfig.md) | Attribute to sort by. |
| `params.boundary`? | [`GeometryFilter`](GeometryFilter.md) | The spatial boundary to be applied. |
| `params.search`? | `string` | Search term to search by. Search is case-insensitive and looks for matches across all feature properties. |
| `params.pagination`? | `null` \| `string` | Pagination token. It comes from either the `previousPage` or `nextPage` properties of the previous response. |
| Parameter | Type | Description |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `params` | \{ `layerId`: `string`; `filters`: [`Filters`](Filters.md); `sorting`: [`SortConfig`](../Shared/SortConfig.md); `boundary`: [`GeometryFilter`](GeometryFilter.md); `search`: `string`; `pagination`: `null` \| `string`; `pageSize`: `number`; `select`: `string`\[]; } | - |
| `params.layerId` | `string` | The ID of the layer to get features from. |
| `params.filters`? | [`Filters`](Filters.md) | Filters to be applied. These filters will merge with layer's own filters. |
| `params.sorting`? | [`SortConfig`](../Shared/SortConfig.md) | Attribute to sort by. |
| `params.boundary`? | [`GeometryFilter`](GeometryFilter.md) | The spatial boundary to be applied. |
| `params.search`? | `string` | Search term to search by. Search is case-insensitive and looks for matches across all feature properties. |
| `params.pagination`? | `null` \| `string` | Pagination token. It comes from either the `previousPage` or `nextPage` properties of the previous response. |
| `params.pageSize`? | `number` | The number of features to return per page. Defaults to 20. Note: The larger the page size, the longer this is likely to take to respond. |
| `params.select`? | `string`\[] | The attributes to select from the features. If not provided, all attributes will be returned. If you set this to an empty array, no attributes will be returned. |

### Returns

Expand Down
22 changes: 12 additions & 10 deletions docs/Main/FeltController.md
Original file line number Diff line number Diff line change
Expand Up @@ -968,21 +968,23 @@ const feature = await felt.getFeature({ layerId: "layer-1", id: 123 });

## getFeatures()

> **getFeatures**(`params`: \{ `layerId`: `string`; `filters`: [`Filters`](../Layers/Filters.md); `sorting`: [`SortConfig`](../Shared/SortConfig.md); `boundary`: [`GeometryFilter`](../Layers/GeometryFilter.md); `search`: `string`; `pagination`: `null` | `string`; }): `Promise`\<\{ `features`: [`LayerFeature`](../Layers/LayerFeature.md)\[]; `count`: `number`; `previousPage`: `null` | `string`; `nextPage`: `null` | `string`; }>
> **getFeatures**(`params`: \{ `layerId`: `string`; `filters`: [`Filters`](../Layers/Filters.md); `sorting`: [`SortConfig`](../Shared/SortConfig.md); `boundary`: [`GeometryFilter`](../Layers/GeometryFilter.md); `search`: `string`; `pagination`: `null` | `string`; `pageSize`: `number`; `select`: `string`\[]; }): `Promise`\<\{ `features`: [`LayerFeature`](../Layers/LayerFeature.md)\[]; `count`: `number`; `previousPage`: `null` | `string`; `nextPage`: `null` | `string`; }>

Get a list of layer features.

### Parameters

| Parameter | Type | Description |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `params` | \{ `layerId`: `string`; `filters`: [`Filters`](../Layers/Filters.md); `sorting`: [`SortConfig`](../Shared/SortConfig.md); `boundary`: [`GeometryFilter`](../Layers/GeometryFilter.md); `search`: `string`; `pagination`: `null` \| `string`; } | - |
| `params.layerId` | `string` | The ID of the layer to get features from. |
| `params.filters`? | [`Filters`](../Layers/Filters.md) | Filters to be applied. These filters will merge with layer's own filters. |
| `params.sorting`? | [`SortConfig`](../Shared/SortConfig.md) | Attribute to sort by. |
| `params.boundary`? | [`GeometryFilter`](../Layers/GeometryFilter.md) | The spatial boundary to be applied. |
| `params.search`? | `string` | Search term to search by. Search is case-insensitive and looks for matches across all feature properties. |
| `params.pagination`? | `null` \| `string` | Pagination token. It comes from either the `previousPage` or `nextPage` properties of the previous response. |
| Parameter | Type | Description |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `params` | \{ `layerId`: `string`; `filters`: [`Filters`](../Layers/Filters.md); `sorting`: [`SortConfig`](../Shared/SortConfig.md); `boundary`: [`GeometryFilter`](../Layers/GeometryFilter.md); `search`: `string`; `pagination`: `null` \| `string`; `pageSize`: `number`; `select`: `string`\[]; } | - |
| `params.layerId` | `string` | The ID of the layer to get features from. |
| `params.filters`? | [`Filters`](../Layers/Filters.md) | Filters to be applied. These filters will merge with layer's own filters. |
| `params.sorting`? | [`SortConfig`](../Shared/SortConfig.md) | Attribute to sort by. |
| `params.boundary`? | [`GeometryFilter`](../Layers/GeometryFilter.md) | The spatial boundary to be applied. |
| `params.search`? | `string` | Search term to search by. Search is case-insensitive and looks for matches across all feature properties. |
| `params.pagination`? | `null` \| `string` | Pagination token. It comes from either the `previousPage` or `nextPage` properties of the previous response. |
| `params.pageSize`? | `number` | The number of features to return per page. Defaults to 20. Note: The larger the page size, the longer this is likely to take to respond. |
| `params.select`? | `string`\[] | The attributes to select from the features. If not provided, all attributes will be returned. If you set this to an empty array, no attributes will be returned. |

### Returns

Expand Down
2 changes: 1 addition & 1 deletion docs/Tools/PinToolSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ the "Oil barrel" symbol is `oil-barrel`.

## afterCreation

> **afterCreation**: `"enter name"` | `"add another"` | `"select"`
> **afterCreation**: `"select"` | `"enter name"` | `"add another"`

What to do after creating the Place element.

Expand Down
Loading