Skip to content

Commit

Permalink
fix vector source types
Browse files Browse the repository at this point in the history
  • Loading branch information
juandjara committed Dec 2, 2024
1 parent aceef33 commit c4d7332
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/sources/vector-query-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type UrlParameters = {
};

export const vectorQuerySource = async function (
options: VectorQuerySourceOptions
options: Omit<VectorQuerySourceOptions, 'spatialDataType'>
): Promise<TilejsonResult & WidgetQuerySourceResult> {
const {
columns,
Expand Down Expand Up @@ -66,7 +66,10 @@ export const vectorQuerySource = async function (
return baseSource<UrlParameters>('query', options, urlParameters).then(
(result) => ({
...(result as TilejsonResult),
widgetSource: new WidgetQuerySource(options),
widgetSource: new WidgetQuerySource({
...options,
spatialDataType: 'geo',
}),
})
);
};
7 changes: 5 additions & 2 deletions src/sources/vector-table-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type UrlParameters = {
};

export const vectorTableSource = async function (
options: VectorTableSourceOptions
options: Omit<VectorTableSourceOptions, 'spatialDataType'>
): Promise<TilejsonResult & WidgetTableSourceResult> {
const {
columns,
Expand All @@ -61,7 +61,10 @@ export const vectorTableSource = async function (
return baseSource<UrlParameters>('table', options, urlParameters).then(
(result) => ({
...(result as TilejsonResult),
widgetSource: new WidgetTableSource(options),
widgetSource: new WidgetTableSource({
...options,
spatialDataType: 'geo',
}),
})
);
};

0 comments on commit c4d7332

Please sign in to comment.