@carto/api-client 0.5.4 → 0.5.5-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6111,6 +6111,7 @@ function executeModel(props) {
6111
6111
  filters,
6112
6112
  filtersLogicalOperator = "and",
6113
6113
  spatialDataType = "geo",
6114
+ spatialDataColumn = DEFAULT_GEO_COLUMN,
6114
6115
  spatialFiltersMode = "intersects"
6115
6116
  } = source;
6116
6117
  const queryParams = {
@@ -6122,18 +6123,13 @@ function executeModel(props) {
6122
6123
  filters,
6123
6124
  filtersLogicalOperator
6124
6125
  };
6125
- const spatialDataColumn = source.spatialDataColumn || DEFAULT_GEO_COLUMN;
6126
- if (model === "pick") {
6127
- queryParams.spatialDataColumn = spatialDataColumn;
6128
- }
6129
- const spatialFilters = source.spatialFilter ? { [spatialDataColumn]: source.spatialFilter } : void 0;
6130
- if (spatialFilters) {
6131
- queryParams.spatialFilters = spatialFilters;
6132
- queryParams.spatialDataColumn = spatialDataColumn;
6133
- queryParams.spatialDataType = spatialDataType;
6134
- }
6135
- if (spatialDataType !== "geo") {
6136
- queryParams.spatialFiltersMode = spatialFiltersMode;
6126
+ queryParams.spatialDataType = spatialDataType;
6127
+ queryParams.spatialDataColumn = spatialDataColumn;
6128
+ if (source.spatialFilter) {
6129
+ queryParams.spatialFilters = { [spatialDataColumn]: source.spatialFilter };
6130
+ if (spatialDataType !== "geo") {
6131
+ queryParams.spatialFiltersMode = spatialFiltersMode;
6132
+ }
6137
6133
  }
6138
6134
  const urlWithSearchParams = url + "?" + objectToURLSearchParams(queryParams).toString();
6139
6135
  const isGet = urlWithSearchParams.length <= REQUEST_GET_MAX_URL_LENGTH;