@carto/api-client 0.5.31 → 0.5.32-alpha.307c0b4.122
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.
- package/CHANGELOG.md +2 -0
- package/build/api-client.cjs +57 -3
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.d.cts +23 -5
- package/build/api-client.d.ts +23 -5
- package/build/api-client.js +56 -3
- package/build/api-client.js.map +1 -1
- package/package.json +2 -2
- package/src/fetch-map/layer-map.ts +20 -0
- package/src/fetch-map/parse-map.ts +62 -10
- package/src/fetch-map/types.ts +19 -0
package/build/api-client.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Polygon, MultiPolygon, Feature, BBox, FeatureCollection, Geometry } from 'geojson';
|
|
2
|
+
import { BinaryFeature, BinaryFeatureCollection } from '@loaders.gl/schema';
|
|
3
3
|
import jsep from 'jsep';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -863,6 +863,11 @@ declare function getIconUrlAccessor(field: VisualChannelField | null | undefined
|
|
|
863
863
|
maxIconSize: number;
|
|
864
864
|
useMaskedIcons?: boolean;
|
|
865
865
|
}, data: any): any;
|
|
866
|
+
declare function getLineStyleAccessor(field: VisualChannelField, range: LineStyleRange, data: any): {
|
|
867
|
+
accessor: any;
|
|
868
|
+
domain: string[];
|
|
869
|
+
range: [number, number][];
|
|
870
|
+
};
|
|
866
871
|
declare function getMaxMarkerSize(visConfig: VisConfig, visualChannels: VisualChannels): number;
|
|
867
872
|
type Accessor = number | ((d: any, i: any) => number);
|
|
868
873
|
declare function negateAccessor(accessor: Accessor): Accessor;
|
|
@@ -908,6 +913,8 @@ type VisualChannels = {
|
|
|
908
913
|
sizeScale?: ScaleType;
|
|
909
914
|
strokeColorField?: VisualChannelField;
|
|
910
915
|
strokeColorScale?: ScaleType;
|
|
916
|
+
lineStyleField?: VisualChannelField;
|
|
917
|
+
lineStyleScale?: ScaleType;
|
|
911
918
|
heightField?: VisualChannelField;
|
|
912
919
|
heightScale?: ScaleType;
|
|
913
920
|
weightField?: VisualChannelField;
|
|
@@ -928,6 +935,13 @@ type CustomMarkersRange = {
|
|
|
928
935
|
}[];
|
|
929
936
|
othersMarker?: string;
|
|
930
937
|
};
|
|
938
|
+
type LineStyleRange = {
|
|
939
|
+
dashArrayMap: {
|
|
940
|
+
value: string;
|
|
941
|
+
dashArray: [number, number];
|
|
942
|
+
}[];
|
|
943
|
+
othersDashArray?: [number, number];
|
|
944
|
+
};
|
|
931
945
|
type ColorBand = 'red' | 'green' | 'blue' | 'alpha';
|
|
932
946
|
type RasterLayerConfigColorBand = {
|
|
933
947
|
band: ColorBand;
|
|
@@ -963,6 +977,10 @@ type VisConfig = {
|
|
|
963
977
|
strokeColorAggregationDomain?: [number, number];
|
|
964
978
|
strokeOpacity?: number;
|
|
965
979
|
strokeColorRange?: ColorRange;
|
|
980
|
+
stroked?: boolean;
|
|
981
|
+
lineStyle?: 'solid' | 'dashed' | 'dotted';
|
|
982
|
+
dashArray?: [number, number];
|
|
983
|
+
lineStyleRange?: LineStyleRange | null;
|
|
966
984
|
heightRange?: number[];
|
|
967
985
|
heightAggregation?: string;
|
|
968
986
|
heightAggregationExp?: string;
|
|
@@ -1149,9 +1167,9 @@ type Scale = {
|
|
|
1149
1167
|
domain?: string[] | number[];
|
|
1150
1168
|
/** Domain of the user to construct d3 scale */
|
|
1151
1169
|
scaleDomain?: string[] | number[];
|
|
1152
|
-
range?: string[] | number[];
|
|
1170
|
+
range?: string[] | number[] | number[][];
|
|
1153
1171
|
};
|
|
1154
|
-
type ScaleKey = 'fillColor' | 'pointRadius' | 'lineColor' | 'lineWidth' | 'elevation' | 'weight';
|
|
1172
|
+
type ScaleKey = 'fillColor' | 'pointRadius' | 'lineColor' | 'lineWidth' | 'elevation' | 'weight' | 'lineStyle';
|
|
1155
1173
|
type Scales = Partial<Record<ScaleKey, Scale>>;
|
|
1156
1174
|
type LayerDescriptor = {
|
|
1157
1175
|
type: LayerType;
|
|
@@ -2362,4 +2380,4 @@ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined
|
|
|
2362
2380
|
*/
|
|
2363
2381
|
declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
|
|
2364
2382
|
|
|
2365
|
-
export { type APIErrorContext, type APIRequestType, AUDIT_TAGS, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, type AggregationsRequestOptions, type AggregationsResponse, ApiVersion, type Attribute, type AuthMode, type AuthOptions, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CARTO_SOURCES, CartoAPIError, type CategoryOrderBy, type CategoryRequestOptions, type CategoryResponse, type CategoryResponseEntry, type CategoryResponseRaw, CellSet, type ColumnsOption, type D3Scale, DEFAULT_API_BASE_URL, type ExtentRequestOptions, type ExtentResponse, FEATURE_GEOM_PROPERTY, type FeaturesRequestOptions, type FeaturesResponse, type FetchMapOptions, type FetchMapResult, type Filter, type FilterFunction, type FilterInterval, type FilterIntervalComplete, type FilterIntervalExtremum, type FilterLogicalOperator, type FilterOptions, FilterType, type Filters, type Format, type FormulaRequestOptions, type FormulaResponse, type GeometrySpatialFilter, type GetFilterOptions, type GoogleBasemap, type GroupByFeature, type GroupDateType, type H3QuerySourceOptions, type H3QuerySourceResponse, type H3TableSourceOptions, type H3TableSourceResponse, type H3TilesetSourceOptions, type H3TilesetSourceResponse, type HasFilterOptions, type HistogramRequestOptions, type HistogramResponse, type KeplerMapConfig, type Layer, type LayerDescriptor, type LayerType, type MapLibreBasemap, type MapType, type NamedQueryParameter, OPACITY_MAP, OTHERS_CATEGORY_NAME, type ParseMapResult, type PositionalQueryParameter, Provider, type ProviderType, type QuadbinQuerySourceOptions, type QuadbinQuerySourceResponse, type QuadbinTableSourceOptions, type QuadbinTableSourceResponse, type QuadbinTilesetSourceOptions, type QuadbinTilesetSourceResponse, type QueryOptions, type QueryParameterValue, type QueryParameters, type QueryResult, type QuerySourceOptions, type RangeRequestOptions, type RangeResponse, type Raster, RasterBandColorinterp, type RasterBandType, type RasterMetadata, type RasterMetadataBand, type RasterMetadataBandStats, type RasterSourceOptions, type RasterTile, type RemoveFilterOptions, SOURCE_DEFAULTS, type Scale, type ScaleKey, type ScaleType, type Scales, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SchemaField, SchemaFieldType, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexFilter, type SpatialIndexTile, type StringSearchOptions, TEXT_LABEL_INDEX, TEXT_NUMBER_FORMATTER, TEXT_OUTLINE_OPACITY, type TableRequestOptions, type TableResponse, type TableSourceOptions, type Tile, type TileFeatureExtractOptions, type TileFeatures, type TileFeaturesSpatialIndexOptions, TileFormat, type TileResolution, type Tilejson, type TilejsonResult, type TilesetSourceOptions, type Tilestats, type TimeSeriesRequestOptions, type TimeSeriesResponse, type TrajectoryQuerySourceOptions, type TrajectoryQuerySourceResponse, type TrajectoryTableSourceOptions, type TrajectoryTableSourceResponse, type VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, type WidgetFeatureGeometryType, WidgetQuerySource, type WidgetQuerySourceResult, WidgetRasterSource, type WidgetRasterSourceProps, type WidgetRasterSourceResult, WidgetRemoteSource, type WidgetRemoteSourceProps, WidgetSource, type WidgetSourceProps, WidgetTableSource, type WidgetTableSourceResult, WidgetTilesetSource, type WidgetTilesetSourceProps, type WidgetTilesetSourceResult, type _DataFilterExtensionProps, ErrorCode as _ErrorCode, type VecExprResult as _VecExprResult, applyLayerGroupFilters as _applyLayerGroupFilters, _buildFeatureFilter, createVecExprEvaluator as _createVecExprEvaluator, domainFromValues as _domainFromValues, evaluateVecExpr as _evaluateVecExpr, fillInMapDatasets as _fillInMapDatasets, fillInTileStats as _fillInTileStats, _getHexagonResolution, getLog10ScaleSteps as _getLog10ScaleSteps, getPointsAggregationLevel as _getPointsAggregationLevel, getRasterTileLayerStyleProps as _getRasterTileLayerStyleProps, validateVecExprSyntax as _validateVecExprSyntax, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildAuthHeaders, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, calculateLayerScale, clearDefaultRequestCache, clearFilters, compileCustomAggregation, configureSource, createColorScale, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getAuthCredentials, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, getLayerDescriptor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getSorter, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, isSpatialIndexFilter, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, rewriteUrlForSessionMode, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, trajectoryQuerySource, trajectoryTableSource, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
|
|
2383
|
+
export { type APIErrorContext, type APIRequestType, AUDIT_TAGS, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, type AggregationsRequestOptions, type AggregationsResponse, ApiVersion, type Attribute, type AuthMode, type AuthOptions, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CARTO_SOURCES, CartoAPIError, type CategoryOrderBy, type CategoryRequestOptions, type CategoryResponse, type CategoryResponseEntry, type CategoryResponseRaw, CellSet, type ColumnsOption, type D3Scale, DEFAULT_API_BASE_URL, type ExtentRequestOptions, type ExtentResponse, FEATURE_GEOM_PROPERTY, type FeaturesRequestOptions, type FeaturesResponse, type FetchMapOptions, type FetchMapResult, type Filter, type FilterFunction, type FilterInterval, type FilterIntervalComplete, type FilterIntervalExtremum, type FilterLogicalOperator, type FilterOptions, FilterType, type Filters, type Format, type FormulaRequestOptions, type FormulaResponse, type GeometrySpatialFilter, type GetFilterOptions, type GoogleBasemap, type GroupByFeature, type GroupDateType, type H3QuerySourceOptions, type H3QuerySourceResponse, type H3TableSourceOptions, type H3TableSourceResponse, type H3TilesetSourceOptions, type H3TilesetSourceResponse, type HasFilterOptions, type HistogramRequestOptions, type HistogramResponse, type KeplerMapConfig, type Layer, type LayerDescriptor, type LayerType, type MapLibreBasemap, type MapType, type NamedQueryParameter, OPACITY_MAP, OTHERS_CATEGORY_NAME, type ParseMapResult, type PositionalQueryParameter, Provider, type ProviderType, type QuadbinQuerySourceOptions, type QuadbinQuerySourceResponse, type QuadbinTableSourceOptions, type QuadbinTableSourceResponse, type QuadbinTilesetSourceOptions, type QuadbinTilesetSourceResponse, type QueryOptions, type QueryParameterValue, type QueryParameters, type QueryResult, type QuerySourceOptions, type RangeRequestOptions, type RangeResponse, type Raster, RasterBandColorinterp, type RasterBandType, type RasterMetadata, type RasterMetadataBand, type RasterMetadataBandStats, type RasterSourceOptions, type RasterTile, type RemoveFilterOptions, SOURCE_DEFAULTS, type Scale, type ScaleKey, type ScaleType, type Scales, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SchemaField, SchemaFieldType, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexFilter, type SpatialIndexTile, type StringSearchOptions, TEXT_LABEL_INDEX, TEXT_NUMBER_FORMATTER, TEXT_OUTLINE_OPACITY, type TableRequestOptions, type TableResponse, type TableSourceOptions, type Tile, type TileFeatureExtractOptions, type TileFeatures, type TileFeaturesSpatialIndexOptions, TileFormat, type TileResolution, type Tilejson, type TilejsonResult, type TilesetSourceOptions, type Tilestats, type TimeSeriesRequestOptions, type TimeSeriesResponse, type TrajectoryQuerySourceOptions, type TrajectoryQuerySourceResponse, type TrajectoryTableSourceOptions, type TrajectoryTableSourceResponse, type VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, type WidgetFeatureGeometryType, WidgetQuerySource, type WidgetQuerySourceResult, WidgetRasterSource, type WidgetRasterSourceProps, type WidgetRasterSourceResult, WidgetRemoteSource, type WidgetRemoteSourceProps, WidgetSource, type WidgetSourceProps, WidgetTableSource, type WidgetTableSourceResult, WidgetTilesetSource, type WidgetTilesetSourceProps, type WidgetTilesetSourceResult, type _DataFilterExtensionProps, ErrorCode as _ErrorCode, type VecExprResult as _VecExprResult, applyLayerGroupFilters as _applyLayerGroupFilters, _buildFeatureFilter, createVecExprEvaluator as _createVecExprEvaluator, domainFromValues as _domainFromValues, evaluateVecExpr as _evaluateVecExpr, fillInMapDatasets as _fillInMapDatasets, fillInTileStats as _fillInTileStats, _getHexagonResolution, getLog10ScaleSteps as _getLog10ScaleSteps, getPointsAggregationLevel as _getPointsAggregationLevel, getRasterTileLayerStyleProps as _getRasterTileLayerStyleProps, validateVecExprSyntax as _validateVecExprSyntax, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildAuthHeaders, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, calculateLayerScale, clearDefaultRequestCache, clearFilters, compileCustomAggregation, configureSource, createColorScale, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getAuthCredentials, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, getLayerDescriptor, getLayerProps, getLineStyleAccessor, getMaxMarkerSize, getSizeAccessor, getSorter, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, isSpatialIndexFilter, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, rewriteUrlForSessionMode, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, trajectoryQuerySource, trajectoryTableSource, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
|
package/build/api-client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Polygon, MultiPolygon, Feature, BBox, FeatureCollection, Geometry } from 'geojson';
|
|
2
|
+
import { BinaryFeature, BinaryFeatureCollection } from '@loaders.gl/schema';
|
|
3
3
|
import jsep from 'jsep';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -863,6 +863,11 @@ declare function getIconUrlAccessor(field: VisualChannelField | null | undefined
|
|
|
863
863
|
maxIconSize: number;
|
|
864
864
|
useMaskedIcons?: boolean;
|
|
865
865
|
}, data: any): any;
|
|
866
|
+
declare function getLineStyleAccessor(field: VisualChannelField, range: LineStyleRange, data: any): {
|
|
867
|
+
accessor: any;
|
|
868
|
+
domain: string[];
|
|
869
|
+
range: [number, number][];
|
|
870
|
+
};
|
|
866
871
|
declare function getMaxMarkerSize(visConfig: VisConfig, visualChannels: VisualChannels): number;
|
|
867
872
|
type Accessor = number | ((d: any, i: any) => number);
|
|
868
873
|
declare function negateAccessor(accessor: Accessor): Accessor;
|
|
@@ -908,6 +913,8 @@ type VisualChannels = {
|
|
|
908
913
|
sizeScale?: ScaleType;
|
|
909
914
|
strokeColorField?: VisualChannelField;
|
|
910
915
|
strokeColorScale?: ScaleType;
|
|
916
|
+
lineStyleField?: VisualChannelField;
|
|
917
|
+
lineStyleScale?: ScaleType;
|
|
911
918
|
heightField?: VisualChannelField;
|
|
912
919
|
heightScale?: ScaleType;
|
|
913
920
|
weightField?: VisualChannelField;
|
|
@@ -928,6 +935,13 @@ type CustomMarkersRange = {
|
|
|
928
935
|
}[];
|
|
929
936
|
othersMarker?: string;
|
|
930
937
|
};
|
|
938
|
+
type LineStyleRange = {
|
|
939
|
+
dashArrayMap: {
|
|
940
|
+
value: string;
|
|
941
|
+
dashArray: [number, number];
|
|
942
|
+
}[];
|
|
943
|
+
othersDashArray?: [number, number];
|
|
944
|
+
};
|
|
931
945
|
type ColorBand = 'red' | 'green' | 'blue' | 'alpha';
|
|
932
946
|
type RasterLayerConfigColorBand = {
|
|
933
947
|
band: ColorBand;
|
|
@@ -963,6 +977,10 @@ type VisConfig = {
|
|
|
963
977
|
strokeColorAggregationDomain?: [number, number];
|
|
964
978
|
strokeOpacity?: number;
|
|
965
979
|
strokeColorRange?: ColorRange;
|
|
980
|
+
stroked?: boolean;
|
|
981
|
+
lineStyle?: 'solid' | 'dashed' | 'dotted';
|
|
982
|
+
dashArray?: [number, number];
|
|
983
|
+
lineStyleRange?: LineStyleRange | null;
|
|
966
984
|
heightRange?: number[];
|
|
967
985
|
heightAggregation?: string;
|
|
968
986
|
heightAggregationExp?: string;
|
|
@@ -1149,9 +1167,9 @@ type Scale = {
|
|
|
1149
1167
|
domain?: string[] | number[];
|
|
1150
1168
|
/** Domain of the user to construct d3 scale */
|
|
1151
1169
|
scaleDomain?: string[] | number[];
|
|
1152
|
-
range?: string[] | number[];
|
|
1170
|
+
range?: string[] | number[] | number[][];
|
|
1153
1171
|
};
|
|
1154
|
-
type ScaleKey = 'fillColor' | 'pointRadius' | 'lineColor' | 'lineWidth' | 'elevation' | 'weight';
|
|
1172
|
+
type ScaleKey = 'fillColor' | 'pointRadius' | 'lineColor' | 'lineWidth' | 'elevation' | 'weight' | 'lineStyle';
|
|
1155
1173
|
type Scales = Partial<Record<ScaleKey, Scale>>;
|
|
1156
1174
|
type LayerDescriptor = {
|
|
1157
1175
|
type: LayerType;
|
|
@@ -2362,4 +2380,4 @@ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined
|
|
|
2362
2380
|
*/
|
|
2363
2381
|
declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
|
|
2364
2382
|
|
|
2365
|
-
export { type APIErrorContext, type APIRequestType, AUDIT_TAGS, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, type AggregationsRequestOptions, type AggregationsResponse, ApiVersion, type Attribute, type AuthMode, type AuthOptions, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CARTO_SOURCES, CartoAPIError, type CategoryOrderBy, type CategoryRequestOptions, type CategoryResponse, type CategoryResponseEntry, type CategoryResponseRaw, CellSet, type ColumnsOption, type D3Scale, DEFAULT_API_BASE_URL, type ExtentRequestOptions, type ExtentResponse, FEATURE_GEOM_PROPERTY, type FeaturesRequestOptions, type FeaturesResponse, type FetchMapOptions, type FetchMapResult, type Filter, type FilterFunction, type FilterInterval, type FilterIntervalComplete, type FilterIntervalExtremum, type FilterLogicalOperator, type FilterOptions, FilterType, type Filters, type Format, type FormulaRequestOptions, type FormulaResponse, type GeometrySpatialFilter, type GetFilterOptions, type GoogleBasemap, type GroupByFeature, type GroupDateType, type H3QuerySourceOptions, type H3QuerySourceResponse, type H3TableSourceOptions, type H3TableSourceResponse, type H3TilesetSourceOptions, type H3TilesetSourceResponse, type HasFilterOptions, type HistogramRequestOptions, type HistogramResponse, type KeplerMapConfig, type Layer, type LayerDescriptor, type LayerType, type MapLibreBasemap, type MapType, type NamedQueryParameter, OPACITY_MAP, OTHERS_CATEGORY_NAME, type ParseMapResult, type PositionalQueryParameter, Provider, type ProviderType, type QuadbinQuerySourceOptions, type QuadbinQuerySourceResponse, type QuadbinTableSourceOptions, type QuadbinTableSourceResponse, type QuadbinTilesetSourceOptions, type QuadbinTilesetSourceResponse, type QueryOptions, type QueryParameterValue, type QueryParameters, type QueryResult, type QuerySourceOptions, type RangeRequestOptions, type RangeResponse, type Raster, RasterBandColorinterp, type RasterBandType, type RasterMetadata, type RasterMetadataBand, type RasterMetadataBandStats, type RasterSourceOptions, type RasterTile, type RemoveFilterOptions, SOURCE_DEFAULTS, type Scale, type ScaleKey, type ScaleType, type Scales, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SchemaField, SchemaFieldType, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexFilter, type SpatialIndexTile, type StringSearchOptions, TEXT_LABEL_INDEX, TEXT_NUMBER_FORMATTER, TEXT_OUTLINE_OPACITY, type TableRequestOptions, type TableResponse, type TableSourceOptions, type Tile, type TileFeatureExtractOptions, type TileFeatures, type TileFeaturesSpatialIndexOptions, TileFormat, type TileResolution, type Tilejson, type TilejsonResult, type TilesetSourceOptions, type Tilestats, type TimeSeriesRequestOptions, type TimeSeriesResponse, type TrajectoryQuerySourceOptions, type TrajectoryQuerySourceResponse, type TrajectoryTableSourceOptions, type TrajectoryTableSourceResponse, type VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, type WidgetFeatureGeometryType, WidgetQuerySource, type WidgetQuerySourceResult, WidgetRasterSource, type WidgetRasterSourceProps, type WidgetRasterSourceResult, WidgetRemoteSource, type WidgetRemoteSourceProps, WidgetSource, type WidgetSourceProps, WidgetTableSource, type WidgetTableSourceResult, WidgetTilesetSource, type WidgetTilesetSourceProps, type WidgetTilesetSourceResult, type _DataFilterExtensionProps, ErrorCode as _ErrorCode, type VecExprResult as _VecExprResult, applyLayerGroupFilters as _applyLayerGroupFilters, _buildFeatureFilter, createVecExprEvaluator as _createVecExprEvaluator, domainFromValues as _domainFromValues, evaluateVecExpr as _evaluateVecExpr, fillInMapDatasets as _fillInMapDatasets, fillInTileStats as _fillInTileStats, _getHexagonResolution, getLog10ScaleSteps as _getLog10ScaleSteps, getPointsAggregationLevel as _getPointsAggregationLevel, getRasterTileLayerStyleProps as _getRasterTileLayerStyleProps, validateVecExprSyntax as _validateVecExprSyntax, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildAuthHeaders, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, calculateLayerScale, clearDefaultRequestCache, clearFilters, compileCustomAggregation, configureSource, createColorScale, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getAuthCredentials, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, getLayerDescriptor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getSorter, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, isSpatialIndexFilter, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, rewriteUrlForSessionMode, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, trajectoryQuerySource, trajectoryTableSource, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
|
|
2383
|
+
export { type APIErrorContext, type APIRequestType, AUDIT_TAGS, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, type AggregationsRequestOptions, type AggregationsResponse, ApiVersion, type Attribute, type AuthMode, type AuthOptions, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CARTO_SOURCES, CartoAPIError, type CategoryOrderBy, type CategoryRequestOptions, type CategoryResponse, type CategoryResponseEntry, type CategoryResponseRaw, CellSet, type ColumnsOption, type D3Scale, DEFAULT_API_BASE_URL, type ExtentRequestOptions, type ExtentResponse, FEATURE_GEOM_PROPERTY, type FeaturesRequestOptions, type FeaturesResponse, type FetchMapOptions, type FetchMapResult, type Filter, type FilterFunction, type FilterInterval, type FilterIntervalComplete, type FilterIntervalExtremum, type FilterLogicalOperator, type FilterOptions, FilterType, type Filters, type Format, type FormulaRequestOptions, type FormulaResponse, type GeometrySpatialFilter, type GetFilterOptions, type GoogleBasemap, type GroupByFeature, type GroupDateType, type H3QuerySourceOptions, type H3QuerySourceResponse, type H3TableSourceOptions, type H3TableSourceResponse, type H3TilesetSourceOptions, type H3TilesetSourceResponse, type HasFilterOptions, type HistogramRequestOptions, type HistogramResponse, type KeplerMapConfig, type Layer, type LayerDescriptor, type LayerType, type MapLibreBasemap, type MapType, type NamedQueryParameter, OPACITY_MAP, OTHERS_CATEGORY_NAME, type ParseMapResult, type PositionalQueryParameter, Provider, type ProviderType, type QuadbinQuerySourceOptions, type QuadbinQuerySourceResponse, type QuadbinTableSourceOptions, type QuadbinTableSourceResponse, type QuadbinTilesetSourceOptions, type QuadbinTilesetSourceResponse, type QueryOptions, type QueryParameterValue, type QueryParameters, type QueryResult, type QuerySourceOptions, type RangeRequestOptions, type RangeResponse, type Raster, RasterBandColorinterp, type RasterBandType, type RasterMetadata, type RasterMetadataBand, type RasterMetadataBandStats, type RasterSourceOptions, type RasterTile, type RemoveFilterOptions, SOURCE_DEFAULTS, type Scale, type ScaleKey, type ScaleType, type Scales, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SchemaField, SchemaFieldType, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexFilter, type SpatialIndexTile, type StringSearchOptions, TEXT_LABEL_INDEX, TEXT_NUMBER_FORMATTER, TEXT_OUTLINE_OPACITY, type TableRequestOptions, type TableResponse, type TableSourceOptions, type Tile, type TileFeatureExtractOptions, type TileFeatures, type TileFeaturesSpatialIndexOptions, TileFormat, type TileResolution, type Tilejson, type TilejsonResult, type TilesetSourceOptions, type Tilestats, type TimeSeriesRequestOptions, type TimeSeriesResponse, type TrajectoryQuerySourceOptions, type TrajectoryQuerySourceResponse, type TrajectoryTableSourceOptions, type TrajectoryTableSourceResponse, type VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, type WidgetFeatureGeometryType, WidgetQuerySource, type WidgetQuerySourceResult, WidgetRasterSource, type WidgetRasterSourceProps, type WidgetRasterSourceResult, WidgetRemoteSource, type WidgetRemoteSourceProps, WidgetSource, type WidgetSourceProps, WidgetTableSource, type WidgetTableSourceResult, WidgetTilesetSource, type WidgetTilesetSourceProps, type WidgetTilesetSourceResult, type _DataFilterExtensionProps, ErrorCode as _ErrorCode, type VecExprResult as _VecExprResult, applyLayerGroupFilters as _applyLayerGroupFilters, _buildFeatureFilter, createVecExprEvaluator as _createVecExprEvaluator, domainFromValues as _domainFromValues, evaluateVecExpr as _evaluateVecExpr, fillInMapDatasets as _fillInMapDatasets, fillInTileStats as _fillInTileStats, _getHexagonResolution, getLog10ScaleSteps as _getLog10ScaleSteps, getPointsAggregationLevel as _getPointsAggregationLevel, getRasterTileLayerStyleProps as _getRasterTileLayerStyleProps, validateVecExprSyntax as _validateVecExprSyntax, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildAuthHeaders, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, calculateLayerScale, clearDefaultRequestCache, clearFilters, compileCustomAggregation, configureSource, createColorScale, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getAuthCredentials, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, getLayerDescriptor, getLayerProps, getLineStyleAccessor, getMaxMarkerSize, getSizeAccessor, getSorter, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, isSpatialIndexFilter, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, rewriteUrlForSessionMode, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, trajectoryQuerySource, trajectoryTableSource, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
|
package/build/api-client.js
CHANGED
|
@@ -9796,6 +9796,19 @@ function getIconUrlAccessor(field, range, {
|
|
|
9796
9796
|
};
|
|
9797
9797
|
return normalizeAccessor(accessor, data);
|
|
9798
9798
|
}
|
|
9799
|
+
function getLineStyleAccessor(field, range, data) {
|
|
9800
|
+
const fallback = range.othersDashArray ?? [0, 0];
|
|
9801
|
+
const mapping = {};
|
|
9802
|
+
for (const { value, dashArray } of range.dashArrayMap) {
|
|
9803
|
+
mapping[value] = dashArray;
|
|
9804
|
+
}
|
|
9805
|
+
const accessor = (properties) => mapping[properties[field.name]] ?? fallback;
|
|
9806
|
+
return {
|
|
9807
|
+
accessor: normalizeAccessor(accessor, data),
|
|
9808
|
+
domain: range.dashArrayMap.map(({ value }) => value),
|
|
9809
|
+
range: range.dashArrayMap.map(({ dashArray }) => dashArray)
|
|
9810
|
+
};
|
|
9811
|
+
}
|
|
9799
9812
|
function getMaxMarkerSize(visConfig, visualChannels) {
|
|
9800
9813
|
const { radiusRange, radius, sizeMaxPixels } = visConfig;
|
|
9801
9814
|
const { radiusField, sizeField } = visualChannels;
|
|
@@ -10505,6 +10518,10 @@ function createChannelProps(id, layerType, config2, visualChannels, data, datase
|
|
|
10505
10518
|
const result = {};
|
|
10506
10519
|
const updateTriggers = {};
|
|
10507
10520
|
const scales = {};
|
|
10521
|
+
const isVectorTile = layerType === "mvt" || layerType === "tileset";
|
|
10522
|
+
const geometry = data.tilestats?.layers?.[0]?.geometry;
|
|
10523
|
+
const isLine = geometry === "Line" || geometry === "LineString" || geometry === "MultiLineString";
|
|
10524
|
+
const isPolygon = geometry === "Polygon" || geometry === "MultiPolygon";
|
|
10508
10525
|
{
|
|
10509
10526
|
const { colorField, colorScale } = visualChannels;
|
|
10510
10527
|
const { colorRange } = visConfig;
|
|
@@ -10665,6 +10682,43 @@ function createChannelProps(id, layerType, config2, visualChannels, data, datase
|
|
|
10665
10682
|
};
|
|
10666
10683
|
}
|
|
10667
10684
|
}
|
|
10685
|
+
{
|
|
10686
|
+
const strokeVisible = isLine || isPolygon && Boolean(visConfig.stroked);
|
|
10687
|
+
if (isVectorTile && strokeVisible) {
|
|
10688
|
+
const { lineStyleField, lineStyleScale } = visualChannels;
|
|
10689
|
+
const { lineStyleRange } = visConfig;
|
|
10690
|
+
if (visConfig.lineStyle && visConfig.lineStyle !== "solid") {
|
|
10691
|
+
if (visConfig.lineStyle === "dotted") {
|
|
10692
|
+
result.lineCapRounded = true;
|
|
10693
|
+
}
|
|
10694
|
+
result.lineStyle = visConfig.lineStyle;
|
|
10695
|
+
if (visConfig.dashArray) {
|
|
10696
|
+
result.dashArray = visConfig.dashArray;
|
|
10697
|
+
result.getDashArray = visConfig.dashArray;
|
|
10698
|
+
}
|
|
10699
|
+
}
|
|
10700
|
+
if (lineStyleField && lineStyleScale && lineStyleRange) {
|
|
10701
|
+
const { accessor, ...scaleProps } = getLineStyleAccessor(
|
|
10702
|
+
lineStyleField,
|
|
10703
|
+
lineStyleRange,
|
|
10704
|
+
data
|
|
10705
|
+
);
|
|
10706
|
+
result.getDashArray = accessor;
|
|
10707
|
+
scales.lineStyle = updateTriggers.getDashArray = {
|
|
10708
|
+
field: lineStyleField,
|
|
10709
|
+
type: lineStyleScale,
|
|
10710
|
+
...scaleProps
|
|
10711
|
+
};
|
|
10712
|
+
const dashArrays = [
|
|
10713
|
+
...lineStyleRange.dashArrayMap.map(({ dashArray }) => dashArray),
|
|
10714
|
+
...lineStyleRange.othersDashArray ? [lineStyleRange.othersDashArray] : []
|
|
10715
|
+
];
|
|
10716
|
+
if (dashArrays.some(([dash]) => dash === 0)) {
|
|
10717
|
+
result.lineCapRounded = true;
|
|
10718
|
+
}
|
|
10719
|
+
}
|
|
10720
|
+
}
|
|
10721
|
+
}
|
|
10668
10722
|
{
|
|
10669
10723
|
const { heightField, heightScale } = visualChannels;
|
|
10670
10724
|
const { enable3d, heightRange } = visConfig;
|
|
@@ -10793,9 +10847,7 @@ function createChannelProps(id, layerType, config2, visualChannels, data, datase
|
|
|
10793
10847
|
} = secondaryLabel || {};
|
|
10794
10848
|
result.getText = mainLabel.field && getTextAccessor(mainLabel.field, data);
|
|
10795
10849
|
const getSecondaryText = secondaryField && getTextAccessor(secondaryField, data);
|
|
10796
|
-
|
|
10797
|
-
const isLineOrPolygon = geometry === "Polygon" || geometry === "MultiPolygon" || geometry === "Line" || geometry === "LineString" || geometry === "MultiLineString";
|
|
10798
|
-
if (isLineOrPolygon && (layerType === "tileset" || layerType === "mvt")) {
|
|
10850
|
+
if ((isLine || isPolygon) && isVectorTile) {
|
|
10799
10851
|
const uniqueIdProperty = visConfig.textLabelUniqueIdField;
|
|
10800
10852
|
result.autoLabels = uniqueIdProperty ? { uniqueIdProperty } : true;
|
|
10801
10853
|
result.pointType = "text";
|
|
@@ -11572,6 +11624,7 @@ export {
|
|
|
11572
11624
|
getIconUrlAccessor,
|
|
11573
11625
|
getLayerDescriptor,
|
|
11574
11626
|
getLayerProps,
|
|
11627
|
+
getLineStyleAccessor,
|
|
11575
11628
|
getMaxMarkerSize,
|
|
11576
11629
|
getSizeAccessor,
|
|
11577
11630
|
getSorter,
|