@carto/api-client 0.5.32-alpha.307c0b4.122 → 0.5.32-alpha.48cef4f.127
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 +1 -0
- package/build/api-client.cjs +245 -0
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.d.cts +21 -2
- package/build/api-client.d.ts +21 -2
- package/build/api-client.js +239 -0
- package/build/api-client.js.map +1 -1
- package/package.json +1 -1
- package/src/fetch-map/layer-map.ts +28 -0
- package/src/fetch-map/parse-map.ts +56 -1
- package/src/fetch-map/pattern-atlas.ts +215 -0
- package/src/fetch-map/patterns/checker-large.png +0 -0
- package/src/fetch-map/patterns/checker-medium.png +0 -0
- package/src/fetch-map/patterns/checker-small.png +0 -0
- package/src/fetch-map/patterns/cross-hatch-large.png +0 -0
- package/src/fetch-map/patterns/cross-hatch-medium.png +0 -0
- package/src/fetch-map/patterns/cross-hatch-small.png +0 -0
- package/src/fetch-map/patterns/diag-left-large.png +0 -0
- package/src/fetch-map/patterns/diag-left-medium.png +0 -0
- package/src/fetch-map/patterns/diag-left-small.png +0 -0
- package/src/fetch-map/patterns/diag-right-large.png +0 -0
- package/src/fetch-map/patterns/diag-right-medium.png +0 -0
- package/src/fetch-map/patterns/diag-right-small.png +0 -0
- package/src/fetch-map/patterns/dots-large.png +0 -0
- package/src/fetch-map/patterns/dots-medium.png +0 -0
- package/src/fetch-map/patterns/dots-small.png +0 -0
- package/src/fetch-map/patterns/hlines-large.png +0 -0
- package/src/fetch-map/patterns/hlines-medium.png +0 -0
- package/src/fetch-map/patterns/hlines-small.png +0 -0
- package/src/fetch-map/patterns/solid.png +0 -0
- package/src/fetch-map/patterns/vlines-large.png +0 -0
- package/src/fetch-map/patterns/vlines-medium.png +0 -0
- package/src/fetch-map/patterns/vlines-small.png +0 -0
- package/src/fetch-map/types.ts +25 -0
- package/src/global.d.ts +10 -0
package/build/api-client.d.cts
CHANGED
|
@@ -868,6 +868,11 @@ declare function getLineStyleAccessor(field: VisualChannelField, range: LineStyl
|
|
|
868
868
|
domain: string[];
|
|
869
869
|
range: [number, number][];
|
|
870
870
|
};
|
|
871
|
+
declare function getFillPatternAccessor(field: VisualChannelField, range: FillPatternRange, density: 'small' | 'medium' | 'large' | undefined, data: any): {
|
|
872
|
+
accessor: any;
|
|
873
|
+
domain: string[];
|
|
874
|
+
range: string[];
|
|
875
|
+
};
|
|
871
876
|
declare function getMaxMarkerSize(visConfig: VisConfig, visualChannels: VisualChannels): number;
|
|
872
877
|
type Accessor = number | ((d: any, i: any) => number);
|
|
873
878
|
declare function negateAccessor(accessor: Accessor): Accessor;
|
|
@@ -915,6 +920,8 @@ type VisualChannels = {
|
|
|
915
920
|
strokeColorScale?: ScaleType;
|
|
916
921
|
lineStyleField?: VisualChannelField;
|
|
917
922
|
lineStyleScale?: ScaleType;
|
|
923
|
+
fillPatternField?: VisualChannelField;
|
|
924
|
+
fillPatternScale?: ScaleType;
|
|
918
925
|
heightField?: VisualChannelField;
|
|
919
926
|
heightScale?: ScaleType;
|
|
920
927
|
weightField?: VisualChannelField;
|
|
@@ -942,6 +949,13 @@ type LineStyleRange = {
|
|
|
942
949
|
}[];
|
|
943
950
|
othersDashArray?: [number, number];
|
|
944
951
|
};
|
|
952
|
+
type FillPatternRange = {
|
|
953
|
+
patternMap: {
|
|
954
|
+
value: string;
|
|
955
|
+
pattern: string;
|
|
956
|
+
}[];
|
|
957
|
+
othersPattern?: string;
|
|
958
|
+
};
|
|
945
959
|
type ColorBand = 'red' | 'green' | 'blue' | 'alpha';
|
|
946
960
|
type RasterLayerConfigColorBand = {
|
|
947
961
|
band: ColorBand;
|
|
@@ -981,6 +995,11 @@ type VisConfig = {
|
|
|
981
995
|
lineStyle?: 'solid' | 'dashed' | 'dotted';
|
|
982
996
|
dashArray?: [number, number];
|
|
983
997
|
lineStyleRange?: LineStyleRange | null;
|
|
998
|
+
fillPatternEnabled?: boolean;
|
|
999
|
+
fillPattern?: string;
|
|
1000
|
+
fillPatternDensity?: 'small' | 'medium' | 'large';
|
|
1001
|
+
fillPatternSize?: number;
|
|
1002
|
+
fillPatternRange?: FillPatternRange | null;
|
|
984
1003
|
heightRange?: number[];
|
|
985
1004
|
heightAggregation?: string;
|
|
986
1005
|
heightAggregationExp?: string;
|
|
@@ -1169,7 +1188,7 @@ type Scale = {
|
|
|
1169
1188
|
scaleDomain?: string[] | number[];
|
|
1170
1189
|
range?: string[] | number[] | number[][];
|
|
1171
1190
|
};
|
|
1172
|
-
type ScaleKey = 'fillColor' | 'pointRadius' | 'lineColor' | 'lineWidth' | 'elevation' | 'weight' | 'lineStyle';
|
|
1191
|
+
type ScaleKey = 'fillColor' | 'pointRadius' | 'lineColor' | 'lineWidth' | 'elevation' | 'weight' | 'lineStyle' | 'fillPattern';
|
|
1173
1192
|
type Scales = Partial<Record<ScaleKey, Scale>>;
|
|
1174
1193
|
type LayerDescriptor = {
|
|
1175
1194
|
type: LayerType;
|
|
@@ -2380,4 +2399,4 @@ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined
|
|
|
2380
2399
|
*/
|
|
2381
2400
|
declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
|
|
2382
2401
|
|
|
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 };
|
|
2402
|
+
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, getFillPatternAccessor, 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
|
@@ -868,6 +868,11 @@ declare function getLineStyleAccessor(field: VisualChannelField, range: LineStyl
|
|
|
868
868
|
domain: string[];
|
|
869
869
|
range: [number, number][];
|
|
870
870
|
};
|
|
871
|
+
declare function getFillPatternAccessor(field: VisualChannelField, range: FillPatternRange, density: 'small' | 'medium' | 'large' | undefined, data: any): {
|
|
872
|
+
accessor: any;
|
|
873
|
+
domain: string[];
|
|
874
|
+
range: string[];
|
|
875
|
+
};
|
|
871
876
|
declare function getMaxMarkerSize(visConfig: VisConfig, visualChannels: VisualChannels): number;
|
|
872
877
|
type Accessor = number | ((d: any, i: any) => number);
|
|
873
878
|
declare function negateAccessor(accessor: Accessor): Accessor;
|
|
@@ -915,6 +920,8 @@ type VisualChannels = {
|
|
|
915
920
|
strokeColorScale?: ScaleType;
|
|
916
921
|
lineStyleField?: VisualChannelField;
|
|
917
922
|
lineStyleScale?: ScaleType;
|
|
923
|
+
fillPatternField?: VisualChannelField;
|
|
924
|
+
fillPatternScale?: ScaleType;
|
|
918
925
|
heightField?: VisualChannelField;
|
|
919
926
|
heightScale?: ScaleType;
|
|
920
927
|
weightField?: VisualChannelField;
|
|
@@ -942,6 +949,13 @@ type LineStyleRange = {
|
|
|
942
949
|
}[];
|
|
943
950
|
othersDashArray?: [number, number];
|
|
944
951
|
};
|
|
952
|
+
type FillPatternRange = {
|
|
953
|
+
patternMap: {
|
|
954
|
+
value: string;
|
|
955
|
+
pattern: string;
|
|
956
|
+
}[];
|
|
957
|
+
othersPattern?: string;
|
|
958
|
+
};
|
|
945
959
|
type ColorBand = 'red' | 'green' | 'blue' | 'alpha';
|
|
946
960
|
type RasterLayerConfigColorBand = {
|
|
947
961
|
band: ColorBand;
|
|
@@ -981,6 +995,11 @@ type VisConfig = {
|
|
|
981
995
|
lineStyle?: 'solid' | 'dashed' | 'dotted';
|
|
982
996
|
dashArray?: [number, number];
|
|
983
997
|
lineStyleRange?: LineStyleRange | null;
|
|
998
|
+
fillPatternEnabled?: boolean;
|
|
999
|
+
fillPattern?: string;
|
|
1000
|
+
fillPatternDensity?: 'small' | 'medium' | 'large';
|
|
1001
|
+
fillPatternSize?: number;
|
|
1002
|
+
fillPatternRange?: FillPatternRange | null;
|
|
984
1003
|
heightRange?: number[];
|
|
985
1004
|
heightAggregation?: string;
|
|
986
1005
|
heightAggregationExp?: string;
|
|
@@ -1169,7 +1188,7 @@ type Scale = {
|
|
|
1169
1188
|
scaleDomain?: string[] | number[];
|
|
1170
1189
|
range?: string[] | number[] | number[][];
|
|
1171
1190
|
};
|
|
1172
|
-
type ScaleKey = 'fillColor' | 'pointRadius' | 'lineColor' | 'lineWidth' | 'elevation' | 'weight' | 'lineStyle';
|
|
1191
|
+
type ScaleKey = 'fillColor' | 'pointRadius' | 'lineColor' | 'lineWidth' | 'elevation' | 'weight' | 'lineStyle' | 'fillPattern';
|
|
1173
1192
|
type Scales = Partial<Record<ScaleKey, Scale>>;
|
|
1174
1193
|
type LayerDescriptor = {
|
|
1175
1194
|
type: LayerType;
|
|
@@ -2380,4 +2399,4 @@ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined
|
|
|
2380
2399
|
*/
|
|
2381
2400
|
declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
|
|
2382
2401
|
|
|
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 };
|
|
2402
|
+
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, getFillPatternAccessor, 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
|
@@ -9809,6 +9809,21 @@ function getLineStyleAccessor(field, range, data) {
|
|
|
9809
9809
|
range: range.dashArrayMap.map(({ dashArray }) => dashArray)
|
|
9810
9810
|
};
|
|
9811
9811
|
}
|
|
9812
|
+
function getFillPatternAccessor(field, range, density, data) {
|
|
9813
|
+
const d = density ?? "medium";
|
|
9814
|
+
const toKey = (pattern) => pattern === "solid" || pattern === "none" ? pattern : `${pattern}-${d}`;
|
|
9815
|
+
const fallback = toKey(range.othersPattern ?? "none");
|
|
9816
|
+
const mapping = {};
|
|
9817
|
+
for (const { value, pattern } of range.patternMap) {
|
|
9818
|
+
mapping[value] = toKey(pattern);
|
|
9819
|
+
}
|
|
9820
|
+
const accessor = (properties) => mapping[properties[field.name]] ?? fallback;
|
|
9821
|
+
return {
|
|
9822
|
+
accessor: normalizeAccessor(accessor, data),
|
|
9823
|
+
domain: range.patternMap.map(({ value }) => value),
|
|
9824
|
+
range: range.patternMap.map(({ pattern }) => pattern)
|
|
9825
|
+
};
|
|
9826
|
+
}
|
|
9812
9827
|
function getMaxMarkerSize(visConfig, visualChannels) {
|
|
9813
9828
|
const { radiusRange, radius, sizeMaxPixels } = visConfig;
|
|
9814
9829
|
const { radiusField, sizeField } = visualChannels;
|
|
@@ -10295,6 +10310,196 @@ function hexToRGB2(hexColor) {
|
|
|
10295
10310
|
return [r, g, b];
|
|
10296
10311
|
}
|
|
10297
10312
|
|
|
10313
|
+
// src/fetch-map/patterns/hlines-large.png
|
|
10314
|
+
var hlines_large_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAABBSURBVHic7dixAQAgDMOwwP8/wxfNUOkCz04AYK2T5LUjmm47AAAAAOb5Ae0AAAAAmOcHtAMAAABgnh/QDgAAaj69GwQJx6ek3QAAAABJRU5ErkJggg==";
|
|
10315
|
+
|
|
10316
|
+
// src/fetch-map/patterns/hlines-medium.png
|
|
10317
|
+
var hlines_medium_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAABOSURBVHic7daxAQAgDMOwwv8/wxkeKl3gLTkz8wYAVjrbZ/DWAQDQ8QPqAADo+AF1AAB0/IA6AAA6fkAdAAAdP6AOAICOH1AHAEBn/Q/4F6kJD4qx2asAAAAASUVORK5CYII=";
|
|
10318
|
+
|
|
10319
|
+
// src/fetch-map/patterns/hlines-small.png
|
|
10320
|
+
var hlines_small_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAABrSURBVHic7dSxAQAgDMOwwv8/wxkeKl3gJTkz8wbWOtsncOsAaPmAOgBaPqAOgJYPqAOg5QPqAGj5gDoAWj6gDoCWD6gDoOUD6gBo+YA6AFo+oA6Alg+oA6DlA+oAaPmAOgBaPqAOgNb6D/gRbhEfmYiEGgAAAABJRU5ErkJggg==";
|
|
10321
|
+
|
|
10322
|
+
// src/fetch-map/patterns/vlines-large.png
|
|
10323
|
+
var vlines_large_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAACkSURBVHic7dAxCsAwEMRAk///2W5Sp7CLMUGCK28RGuOb+d4u1/8/B+O/oABaQFMALaApgBbQFEALaAqgBTQF0AKaAmgBTQG0gKYAWkBTAC2gKYAW0BRAC2gKoAU0BdACmgJoAU0BtICmAFpAUwAtoCmAFtAUQAtoCqAFNAXQApoCaAFNAbSApgBaQFMALaApgBbQFEALaAqgBTQF0AKaAmgBzQIgxAh3o/Zl8AAAAABJRU5ErkJggg==";
|
|
10324
|
+
|
|
10325
|
+
// src/fetch-map/patterns/vlines-medium.png
|
|
10326
|
+
var vlines_medium_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAACfSURBVHic7dCxDYBQAITQi/vv/J1A25cotDSEbTt75nzdXy/yFzRAB2gaoAM0DdABmgboAE0DdICmATpA0wAdoGmADtA0QAdoGqADNA3QAZoG6ABNA3SApgE6QNMAHaBpgA7QNEAHaBqgAzQN0AGaBugATQN0gKYBOkDTAB2gaYAO0DRAB2gaoAM0DdABmgboAE0DdICmATpA0wAdoLkBMJgQb6A8qDAAAAAASUVORK5CYII=";
|
|
10327
|
+
|
|
10328
|
+
// src/fetch-map/patterns/vlines-small.png
|
|
10329
|
+
var vlines_small_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAACcSURBVHic7dCxDcAwAMMwo///nIw9gUPEzZuhbTv7ndf2t8cVQB/QCqAPaAXQB7QC6ANaAfQBrQD6gFYAfUArgD6gFUAf0AqgD2gF0Ae0AugDWgH0Aa0A+oBWAH1AK4A+oBVAH9AKoA9oBdAHtALoA1oB9AGtAPqAVgB9QCuAPqAVQB/QCqAPaAXQB7QC6ANaAfQBrQD6gFYAfUC7UEAgXxU1dpkAAAAASUVORK5CYII=";
|
|
10330
|
+
|
|
10331
|
+
// src/fetch-map/patterns/diag-left-large.png
|
|
10332
|
+
var diag_left_large_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAACtSURBVHic7dkxCsMwEETRuf/lfKSkmBCiflUseR/cDuYhN3KSvD7PVM+FzfxsPsOb3+F/RTiGIUCAACEQzmEIECBACIRzGAIECBAC4RyGAGEpwvQd2zaE8eOwDeHKN7EJIYHQIEBoECA0CBAaBAgNAoQGAUKDAKFBgNAgbEWYltiGcOU4bEJY9QfmBkICoUGA0CBAaBAgNAgQGgQIDQKEBgFCgwChrUWYfOF1CG/KcyXf7pwUyQAAAABJRU5ErkJggg==";
|
|
10333
|
+
|
|
10334
|
+
// src/fetch-map/patterns/diag-left-medium.png
|
|
10335
|
+
var diag_left_medium_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAAD+SURBVHic7dqxDYAwDADB7L9cRoIGaiQk81cQKZ3l+wG81lrH9Z/ePbcf5vaLnaVPRJQ+EVH7RETtExG1T0TUPhFR+0RE7RMRtU9EjPtEROgTEaVPRJQ+EVH7RETtExG1T0TUPhFR+0RE7RMRn/hEROgTEaVPRJQ+EVH7RETtExG1T0TUPhFR+0RE7RMRtU9EjPtEROgTEaVPRJQ+EVH7RETtExG1T0TUPhFR+0RE7RMRtU9EjPtEROgTEaVPRJQ+EVH7RETtExG1T0TUPhFR+0RE7RMR/33Afx8w7xMRpU9E1D4RUftERO0TEbVPRNQ+EVH7RETtExHjPhFR+SdUtUu99aAoTAAAAABJRU5ErkJggg==";
|
|
10336
|
+
|
|
10337
|
+
// src/fetch-map/patterns/diag-left-small.png
|
|
10338
|
+
var diag_left_small_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAADqSURBVHic7dgxCsMwAARB/f9zflLS2JDC/U7gDG4EA4s63TnnfO7/+a6Xs/Nzdr2c/bMnIkpPRNSeiMg8ERF6IqL0RETpiYjaExG1JyIST0SEnogoPRFReiKi9kRE5omI0BMRpSciSk9E1J6IyDwREXoiYnvAXoG7hNwTEYknIkJPRJSeiCg9EVF7ImJ7wPaAxhMRpSciak9EZJ6ICD0RsT1gr8BdQu6JiMQTEaEnIkpPRJSeiKg9EbE9YHtA44mI0hMRtSciMk9EhJ6I2B6wV+AuIfdEROKJiNATEaUnIkpPRNSeiNgeUPgvaSqXeT0fItoAAAAASUVORK5CYII=";
|
|
10339
|
+
|
|
10340
|
+
// src/fetch-map/patterns/diag-right-large.png
|
|
10341
|
+
var diag_right_large_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAAClSURBVHic7djBCQMgFAXB339zlmQuOaSAFSLOFvBwEC/OzOzpWt+9cnN+NteBzawb8dlZ4eHb4OH7TfgiePg2ePh+E74IHr4NHr7fhK9HT2z+O37N4/jafh3+yFOCjzfho+Dhw+Dh+034KHj4MHj4fhM+Ch4+DP5V/DyO3/M4/shTugmfXT48fBc8fBs8fDwIHwUP3wYPHw/CR8HDt8HH33hP4/cHynMl31YK/QUAAAAASUVORK5CYII=";
|
|
10342
|
+
|
|
10343
|
+
// src/fetch-map/patterns/diag-right-medium.png
|
|
10344
|
+
var diag_right_medium_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAADKSURBVHic7doxCsMwEAXRf//L6UhKkyJVVmkyRn8M6pYdHhg3VpLszM9+nzXMrY/Z0510H43T+HFWvHggTvfFiwfidF98Kz7l+J1y/Dh3O/5rX7x4IE73xYsH4nS/Gp9y/Eo5/mTf1fhxp3jxQJzuixcPxOm++FZ8yvE75fif3pAb8cffB/H/jtN98eKBON0XLx6IP6Bfjd8px49zt+P9Y/TION0XLx6I033xrfiU470fcLDvavy4U7x4IE73xYsH4nRffCs+5fj9AlS1S72cv9TCAAAAAElFTkSuQmCC";
|
|
10345
|
+
|
|
10346
|
+
// src/fetch-map/patterns/diag-right-small.png
|
|
10347
|
+
var diag_right_small_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAADbSURBVHic7dgxCsNAEMXQuf/lfCSnCdiFqx01AqXLwgP90jMzc8/zu/7/32/zers+3uxeHY95dXzjd14dT3h1POHV8ahXxze+8cdeHU94dTzh1fGYV8c3fufV8YRXxxNeHY95dXzjd14d3z0A8Op41KvjG9/47gGnXh1PeHV8n8SN33t1POHV8YRXx2NeHd/4nVfHdw8AvDoe9er4xje+e8CpV8cTXh3fJ3Hj914dT3h1POHV8ZhXxzd+59Xx3QMAr45HvTq+8Y3vHnDq1fGEV8f3Sdz4vVfHr/0PaSqXeV716iAAAAAASUVORK5CYII=";
|
|
10348
|
+
|
|
10349
|
+
// src/fetch-map/patterns/cross-hatch-large.png
|
|
10350
|
+
var cross_hatch_large_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAALoSURBVHic1ZpdUiwxCIUpV3D3/zJL0qXcHeiLsVokCT8fPRmq5kErnOGcTgMKIiKf3x/CHhc8ClMU5juMiQX8UEFSIliYVRH+cK6KcCX/7/t3hAgW4aoIU65ZESzywyoirIhmRdhyjIqwIj8sI4KHYFQENzfvQQ/5YRERIsS8Z8O3e+cQIT/MI0Lmau980vlt5pghP2wlQiW5zXzLFU4DVMgPs0QgypvGwPqRT+OTJT/s3cAkGhwrVsRI8sPIxuZqOHnd3lLAd2CWhdXvPBXwNUCqbdaxlUWYJbyqCFZgVRFmMaVF2GX7rAirgLIi7GIJi+AtdVERPIFERfDG4BYhWufxAAIi4A8g2+TgV9AhAv4KVjs8PAktRMCTMNHeWoERtViL0FGGEfIaGGtEJm0zYT9YVKAamAq0C/NxFYASQT8pIuAOzIfGIkTQGETAGoNom6c5ryLCzLciwsy3IsI24WdE2PlkRNj5ZERwV7uICN6zERG8ZyMihEu9h1j0tniIRW+LR4R0n7MimM0XK4LZfLESodzkWUSrFcMiWq0YlghUh/uLMNUzWLW9Wt+v8WHkrYDp8TTV3IjRNm/Jv0FffIp9qJ//E6Cv8gq07Ce8ShJs2U94lTLYsp/wKo1Qy35ChJj3bISY92zLfkLmau98Mld759Oyn1BJbjPfSnKb+bbsJxDlTWMQ5U1jtOwnkB0eXdtnmOR+AkZ+GEnewqT3E9Bg9ZMihO3eTzh3Pn/TfoLIifP5m/cTRE6azz9pP0HkhPn8k/cTRJ45nz9kP0HkGfP5w/YTRO6czx+6nyBy03z+5P0EkRvm8wT5GSbW4dLkxfgfHmV4rFpVAthqb4/8Y0wDdc3nCRE0RlmEGUDXfL4iwsw3LcLOsWs+nxFh5xMWwevQNZ+PiOA96xYhqlbXfN5DLHpbttyy70vXfH5FMJsvphyrGbNrPm8RrVaMP1ypmtk1n78SpnqGX5zJrik8n3ca3TD9YH4B52HxPNYfWfcAAAAASUVORK5CYII=";
|
|
10351
|
+
|
|
10352
|
+
// src/fetch-map/patterns/cross-hatch-medium.png
|
|
10353
|
+
var cross_hatch_medium_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAAKASURBVHic7ZpNbgMxCIWtnqD33+RI7VF6g2STSg4/D2zTAaIiZVEb8zEeG/WhGWOM+/OH7D79voDfjfh6Y2byzQUzGCVxU3ytB8rmywMCHI3N8M/nmJaExIrk/9oKX5xAuz3PSQ+vJYHedgSf2gqfOVj3jfrSh5eSsO7mCV+zFT4LjIzeuYiY6XxvYaLVFiXhjZnOp4G0BdKd15KgMVB1TuV7A6CC530AKYlU/s4R0gqe97hJhSmLv1xENLjki8z6x+YqvuksFRwP3Howb8y/5sPCRO8cSoLOoSTmuWz+0DZBKzhSElpiUhLSWDafJYGqLQVaR3MGoreSzWdJWAXHey+pL7qXl/M/iOM3+fvHCBxtqfyuej6EX0nPX86vpOcz+GbBuUrPZ/FNRxrYMq9vlX6CmYS32Kz4VuonvCxsq+cP+UsByun5ID5bgI5QJT0fyWcLkFXR86F8765Kvpq16SdQB5TEPJet50P42oSUhDSWreeP+NbRmIHorWTr+V2+q+B472W7fgLtB5xay35C1BHs2k+Am+AtQt37CeIE2u15LlvPR/GZg1VwqO879BNYYGRV9Hwo31uYKun5MD4NpC2oqOeP+d4AlfX8Nn/nCFXV8zv85SJSWs9v8E3nNnp+k/8eev6AP7RNaKPnA/gsiU56PorPkrAKjvdeUt9S/YT/7wMm66rnQ/in39ufFqEy3wdQ66Tnd/lmEemk53f4piMNbJnXt0o/wUzCW2xWfCv1E14WttXzh/ylAOX0fBCfLUBHqJKej+SzBciq6PlQvndXJV/N2vQTqANKYp7L1vMhfG1CSkIay9bzR3zraMxA9Fay9fwu31VwvPeyXT/hAZMuKfjIf3HUAAAAAElFTkSuQmCC";
|
|
10354
|
+
|
|
10355
|
+
// src/fetch-map/patterns/cross-hatch-small.png
|
|
10356
|
+
var cross_hatch_small_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAAHqSURBVHic7ZhRagMxDERFT5D7/+RI26PkBu5PFipZirqmE41aB/wRR89LhoG3WERkPJeIyP3b93NPzN7h7HXmp4POoZ/sRasTPyV0e+4dBvZmGXm5ytvaDGcw2jv+AK+S9wa86niHVfPRH8z45YrdzYO68uoQm1S0vNp15aeEXmnGPuTWnJcPufb5NN8fzXmRxQp18nzGq9qIGfT2qj3/2+8J6gcvqWpPo/k2nke9J4QVYfE0nLepDDJPo3mVBpun4bx9D2Dz9Ft4rxZMnkbzUwjVnn47z+5pNK+S8wa6eH6Vv1wxrzmdeXWITSpanTyf8VNCVJ5G8//9PuAhixXq5PmMV7URM+jttfN8wqthL6lqT+/7ADAf1obF03DepjLIPI3mVRp0nkbz+z4gqAWTp9H8FAKbp+E8u6fRvErOG6j29L4PAPPqEJtUtDp5PuOnhKg8jeb3fcBihTp5PuNVbcQMenvtPJ/wathLqtrT+z4AzIe1YfE0nLepDDJPo3mVBp2n0fy+DwhqweRpND+FcH5YPA3n2T2N5tOBak/v+wAwrw6xSUWrk+czfkqIytNoft8HLFaok+czXtVGzOCrvTaeT3g17CVV7Wma+4DoAeyez/iwNiyehvM2lUHmaTSv0rBDXkitPJ/xX9QhcjSKhBtGAAAAAElFTkSuQmCC";
|
|
10357
|
+
|
|
10358
|
+
// src/fetch-map/patterns/dots-large.png
|
|
10359
|
+
var dots_large_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAABJSURBVHic7dixEQAgDAMxH/vvDDskBReQ+h/ATpKduv1ADwAAwJduz9Gr/WrEAAAAMNjoPe8PAAAAgJLRe94fAAAAACWj93y3PwvzJ98DYTY6AAAAAElFTkSuQmCC";
|
|
10360
|
+
|
|
10361
|
+
// src/fetch-map/patterns/dots-medium.png
|
|
10362
|
+
var dots_medium_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAABdSURBVHic7daxDcBADAMxI/vv/Jkg6YQXYLLVAKeZmTPfzoIdgNVuZ+jq/vyMALBAdaf9AACIqu60HwAAUdWd9gMAIKq6034AAERVd9oPAICo6k77AQAQVd3p9P4CKgaPf9S3g48AAAAASUVORK5CYII=";
|
|
10363
|
+
|
|
10364
|
+
// src/fetch-map/patterns/dots-small.png
|
|
10365
|
+
var dots_small_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAAB8SURBVHic7dSxDQAxDAMx4/ffOSl/A0WAyc69TzMzZ35n4c16r1/w6f0NrFfVpA2AuKombQDEVTVpAyCuqkkbAHFVTdoAiKtq0gZAXFWTNgDiqpq0ARBX1aQNgLiqJm0AxFU1aQMgrqpJGwBxVU3aAIiratIGQFxVk+n7ApyMHh3vKZDHAAAAAElFTkSuQmCC";
|
|
10366
|
+
|
|
10367
|
+
// src/fetch-map/patterns/checker-large.png
|
|
10368
|
+
var checker_large_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAAC7SURBVHic7dhRCsJQEMXQV/e/57oD56scHZPfciGEFnGuc859PnMNz396/xrG6ymAFtBM39fR3+jT+79/AwqgBTQF0AKaAmgBzfXtv9P9F3iYAmgBTQG0gKYAWkDTPWAYr6cAWkBTAC2gKYAW0HQPGMbrKYAW0BRAC2gKoAU03QOG8XoKoAU0BdACmgJoAU33gGG8ngJoAU0BtICmAFpA0z1gGK+nAFpAUwAtoCmAFtB0DxjG6ymAFtC8AfltJHRjA+VQAAAAAElFTkSuQmCC";
|
|
10369
|
+
|
|
10370
|
+
// src/fetch-map/patterns/checker-medium.png
|
|
10371
|
+
var checker_medium_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAACpSURBVHic7dYxDoNAAAPBvfz/z6EOD2AjvNOhayzDCR/gy69ze371+Ydx97aw38jT5/NfQAXYAWzn3+5kf4GHVYAdwNYOYFwF2AFs7QDGVYAdwNYOYFwF2AFs7QDGVYAdwNYOYFwF2AFs7QDGVYAdwNYOYFwF2AFs7QDGVYAdwNYOYFwF2AFs7QDGVYAdwNYOYFwF2AFs7QDGVYAdwNYOYFwF2AFs7QDGXajSiGiQ1/fcAAAAAElFTkSuQmCC";
|
|
10372
|
+
|
|
10373
|
+
// src/fetch-map/patterns/checker-small.png
|
|
10374
|
+
var checker_small_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAACgSURBVHic7dRBCoNQFEPR1P3vuZ1UEBcQAv8ccPB0am6SfP/P7aj78/rwfHfEfYWtX7J9H/8HaEDY2qQGlGlA2NqkBpRpQNjapAaUaUDY2qQGlGlA2NqkBpRpQNjapAaUaUDY2qQGlGlA2NqkBpRpQNjapAaUaUDY2qQGlGlA2NqkBpRpQNjapAaUaUDY2qQGlGlA2NqkBpRpQNjaZPv+AQpgHkxA3R9BAAAAAElFTkSuQmCC";
|
|
10375
|
+
|
|
10376
|
+
// src/fetch-map/patterns/solid.png
|
|
10377
|
+
var solid_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAFzUkdCAK7OHOkAAACWSURBVHic7dBBEcAwAMOwrPw5dzD0qIXA52/b3cOODtAaoAO0BugArQE6QGuADtAaoAO0BugArQE6QGuADtAaoAO0BugArQE6QGuADtAaoAO0BugArQE6QGuADtAaoAO0BugArQE6QGuADtAaoAO0BugArQE6QGuADtAaoAO0BugArQE6QGuADtAaoAO0BugArQE6QPsBULQBfwAqZPkAAAAASUVORK5CYII=";
|
|
10378
|
+
|
|
10379
|
+
// src/fetch-map/pattern-atlas.ts
|
|
10380
|
+
var DEFAULT_CELL_SIZE = 128;
|
|
10381
|
+
var PATTERN_ROWS = [
|
|
10382
|
+
"hlines",
|
|
10383
|
+
"vlines",
|
|
10384
|
+
"diag-left",
|
|
10385
|
+
"diag-right",
|
|
10386
|
+
"cross-hatch",
|
|
10387
|
+
"dots",
|
|
10388
|
+
"checker"
|
|
10389
|
+
];
|
|
10390
|
+
var DENSITY_COLUMNS = ["large", "medium", "small"];
|
|
10391
|
+
var CELL_URLS = {
|
|
10392
|
+
"hlines-large": hlines_large_default,
|
|
10393
|
+
"hlines-medium": hlines_medium_default,
|
|
10394
|
+
"hlines-small": hlines_small_default,
|
|
10395
|
+
"vlines-large": vlines_large_default,
|
|
10396
|
+
"vlines-medium": vlines_medium_default,
|
|
10397
|
+
"vlines-small": vlines_small_default,
|
|
10398
|
+
"diag-left-large": diag_left_large_default,
|
|
10399
|
+
"diag-left-medium": diag_left_medium_default,
|
|
10400
|
+
"diag-left-small": diag_left_small_default,
|
|
10401
|
+
"diag-right-large": diag_right_large_default,
|
|
10402
|
+
"diag-right-medium": diag_right_medium_default,
|
|
10403
|
+
"diag-right-small": diag_right_small_default,
|
|
10404
|
+
"cross-hatch-large": cross_hatch_large_default,
|
|
10405
|
+
"cross-hatch-medium": cross_hatch_medium_default,
|
|
10406
|
+
"cross-hatch-small": cross_hatch_small_default,
|
|
10407
|
+
"dots-large": dots_large_default,
|
|
10408
|
+
"dots-medium": dots_medium_default,
|
|
10409
|
+
"dots-small": dots_small_default,
|
|
10410
|
+
"checker-large": checker_large_default,
|
|
10411
|
+
"checker-medium": checker_medium_default,
|
|
10412
|
+
"checker-small": checker_small_default,
|
|
10413
|
+
solid: solid_default
|
|
10414
|
+
};
|
|
10415
|
+
function debugGlobals() {
|
|
10416
|
+
return globalThis;
|
|
10417
|
+
}
|
|
10418
|
+
function getPatternCellSize() {
|
|
10419
|
+
const cell = debugGlobals().__CARTO_PATTERN_CELL_SIZE__;
|
|
10420
|
+
return typeof cell === "number" && cell > 0 ? cell : DEFAULT_CELL_SIZE;
|
|
10421
|
+
}
|
|
10422
|
+
function getPatternTextureParameters() {
|
|
10423
|
+
const params = debugGlobals().__CARTO_PATTERN_TEXTURE_PARAMS__;
|
|
10424
|
+
return params && typeof params === "object" ? params : void 0;
|
|
10425
|
+
}
|
|
10426
|
+
function getPatternAtlasMapping(cell = getPatternCellSize()) {
|
|
10427
|
+
const mapping = {};
|
|
10428
|
+
const frame = (col, row) => ({
|
|
10429
|
+
x: col * cell,
|
|
10430
|
+
y: row * cell,
|
|
10431
|
+
width: cell,
|
|
10432
|
+
height: cell,
|
|
10433
|
+
mask: true
|
|
10434
|
+
});
|
|
10435
|
+
PATTERN_ROWS.forEach((pattern, row) => {
|
|
10436
|
+
DENSITY_COLUMNS.forEach((density, col) => {
|
|
10437
|
+
mapping[`${pattern}-${density}`] = frame(col, row);
|
|
10438
|
+
});
|
|
10439
|
+
});
|
|
10440
|
+
mapping.none = frame(0, PATTERN_ROWS.length);
|
|
10441
|
+
mapping.solid = frame(1, PATTERN_ROWS.length);
|
|
10442
|
+
return mapping;
|
|
10443
|
+
}
|
|
10444
|
+
function createCanvas(w, h) {
|
|
10445
|
+
if (typeof OffscreenCanvas !== "undefined") return new OffscreenCanvas(w, h);
|
|
10446
|
+
if (typeof document !== "undefined") {
|
|
10447
|
+
const c = document.createElement("canvas");
|
|
10448
|
+
c.width = w;
|
|
10449
|
+
c.height = h;
|
|
10450
|
+
return c;
|
|
10451
|
+
}
|
|
10452
|
+
throw new Error(
|
|
10453
|
+
"carto-api-client: no Canvas available to assemble the pattern atlas"
|
|
10454
|
+
);
|
|
10455
|
+
}
|
|
10456
|
+
async function loadImage(dataUrl) {
|
|
10457
|
+
if (typeof createImageBitmap !== "undefined" && typeof fetch !== "undefined") {
|
|
10458
|
+
const blob = await (await fetch(dataUrl)).blob();
|
|
10459
|
+
return createImageBitmap(blob);
|
|
10460
|
+
}
|
|
10461
|
+
return new Promise((resolve, reject) => {
|
|
10462
|
+
const img = new Image();
|
|
10463
|
+
img.onload = () => resolve(img);
|
|
10464
|
+
img.onerror = reject;
|
|
10465
|
+
img.src = dataUrl;
|
|
10466
|
+
});
|
|
10467
|
+
}
|
|
10468
|
+
var atlasPromises = /* @__PURE__ */ new Map();
|
|
10469
|
+
function getPatternAtlas(cell = getPatternCellSize()) {
|
|
10470
|
+
let promise = atlasPromises.get(cell);
|
|
10471
|
+
if (!promise) {
|
|
10472
|
+
promise = build(cell);
|
|
10473
|
+
promise.catch(() => {
|
|
10474
|
+
});
|
|
10475
|
+
atlasPromises.set(cell, promise);
|
|
10476
|
+
}
|
|
10477
|
+
return promise;
|
|
10478
|
+
}
|
|
10479
|
+
async function build(cell) {
|
|
10480
|
+
const mapping = getPatternAtlasMapping(cell);
|
|
10481
|
+
const canvas = createCanvas(cell * 3, cell * (PATTERN_ROWS.length + 1));
|
|
10482
|
+
const ctx = canvas.getContext("2d");
|
|
10483
|
+
if (!ctx)
|
|
10484
|
+
throw new Error(
|
|
10485
|
+
"carto-api-client: 2D context unavailable for pattern atlas"
|
|
10486
|
+
);
|
|
10487
|
+
const images = {};
|
|
10488
|
+
await Promise.all(
|
|
10489
|
+
Object.entries(CELL_URLS).map(async ([key, url]) => {
|
|
10490
|
+
images[key] = await loadImage(url);
|
|
10491
|
+
})
|
|
10492
|
+
);
|
|
10493
|
+
ctx.imageSmoothingEnabled = false;
|
|
10494
|
+
for (const [key, frame] of Object.entries(mapping)) {
|
|
10495
|
+
const img = images[key];
|
|
10496
|
+
if (img) ctx.drawImage(img, frame.x, frame.y, cell, cell);
|
|
10497
|
+
}
|
|
10498
|
+
if (typeof createImageBitmap !== "undefined")
|
|
10499
|
+
return createImageBitmap(canvas);
|
|
10500
|
+
return canvas;
|
|
10501
|
+
}
|
|
10502
|
+
|
|
10298
10503
|
// src/fetch-map/parse-map.ts
|
|
10299
10504
|
function getLayerDescriptor({
|
|
10300
10505
|
mapConfig,
|
|
@@ -10719,6 +10924,39 @@ function createChannelProps(id, layerType, config2, visualChannels, data, datase
|
|
|
10719
10924
|
}
|
|
10720
10925
|
}
|
|
10721
10926
|
}
|
|
10927
|
+
{
|
|
10928
|
+
result.fillPatternEnabled = Boolean(visConfig.fillPatternEnabled);
|
|
10929
|
+
if (visConfig.filled && visConfig.fillPatternEnabled) {
|
|
10930
|
+
result.fillPatternAtlas = getPatternAtlas();
|
|
10931
|
+
result.fillPatternMapping = getPatternAtlasMapping();
|
|
10932
|
+
result.fillPatternMask = true;
|
|
10933
|
+
const textureParameters = getPatternTextureParameters();
|
|
10934
|
+
if (textureParameters) {
|
|
10935
|
+
result.textureParameters = textureParameters;
|
|
10936
|
+
}
|
|
10937
|
+
result.getFillPatternScale = visConfig.fillPatternSize ?? 1;
|
|
10938
|
+
result.fillPattern = visConfig.fillPattern;
|
|
10939
|
+
const { fillPatternField, fillPatternScale } = visualChannels;
|
|
10940
|
+
const { fillPatternRange, fillPatternDensity } = visConfig;
|
|
10941
|
+
if (fillPatternField && fillPatternScale && fillPatternRange) {
|
|
10942
|
+
const { accessor, ...scaleProps } = getFillPatternAccessor(
|
|
10943
|
+
fillPatternField,
|
|
10944
|
+
fillPatternRange,
|
|
10945
|
+
fillPatternDensity,
|
|
10946
|
+
data
|
|
10947
|
+
);
|
|
10948
|
+
result.getFillPattern = accessor;
|
|
10949
|
+
scales.fillPattern = updateTriggers.getFillPattern = {
|
|
10950
|
+
field: fillPatternField,
|
|
10951
|
+
type: fillPatternScale,
|
|
10952
|
+
...scaleProps
|
|
10953
|
+
};
|
|
10954
|
+
} else {
|
|
10955
|
+
const key = `${visConfig.fillPattern}-${fillPatternDensity ?? "medium"}`;
|
|
10956
|
+
result.getFillPattern = () => key;
|
|
10957
|
+
}
|
|
10958
|
+
}
|
|
10959
|
+
}
|
|
10722
10960
|
{
|
|
10723
10961
|
const { heightField, heightScale } = visualChannels;
|
|
10724
10962
|
const { enable3d, heightRange } = visConfig;
|
|
@@ -11620,6 +11858,7 @@ export {
|
|
|
11620
11858
|
getColumnNameFromGeoColumn,
|
|
11621
11859
|
getDataFilterExtensionProps,
|
|
11622
11860
|
getDefaultAggregationExpColumnAliasForLayerType,
|
|
11861
|
+
getFillPatternAccessor,
|
|
11623
11862
|
getFilter,
|
|
11624
11863
|
getIconUrlAccessor,
|
|
11625
11864
|
getLayerDescriptor,
|