Skip to content

Commit

Permalink
CARTO: Correct SpatialDataType for geo (#8218)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpalmer authored Oct 24, 2023
1 parent b46d59b commit 0c8e216
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/carto/src/sources/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export type TilesetSourceOptions = {
tableName: string;
};

export type SpatialDataType = 'geometry' | 'h3' | 'quadbin';
export type SpatialDataType = 'geo' | 'h3' | 'quadbin';

export const SOURCE_DEFAULTS: SourceOptionalOptions = {
apiBaseUrl: 'https://gcp-us-east1.api.carto.com',
Expand Down
2 changes: 1 addition & 1 deletion modules/carto/src/sources/vector-query-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const vectorQuerySource: TypedSource<VectorQuerySourceOptions> = async function
options: VectorQuerySourceOptions
): Promise<any> {
const {spatialDataColumn, sqlQuery, queryParameters} = options;
const urlParameters: UrlParameters = {spatialDataType: 'geometry', q: sqlQuery};
const urlParameters: UrlParameters = {spatialDataType: 'geo', q: sqlQuery};

if (spatialDataColumn) {
urlParameters.spatialDataColumn = spatialDataColumn;
Expand Down
2 changes: 1 addition & 1 deletion modules/carto/src/sources/vector-table-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const vectorTableSource: TypedSource<VectorTableSourceOptions> = async function
options: VectorTableSourceOptions
): Promise<any> {
const {columns, spatialDataColumn, tableName} = options;
const urlParameters: UrlParameters = {name: tableName, spatialDataType: 'geometry'};
const urlParameters: UrlParameters = {name: tableName, spatialDataType: 'geo'};

if (columns) {
urlParameters.columns = columns.join(',');
Expand Down

0 comments on commit 0c8e216

Please sign in to comment.