@carto/api-client 0.5.15-alpha.raster-2 → 0.5.15-alpha.raster-3

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.
@@ -773,13 +773,18 @@ declare function getLayerProps(type: LayerType, config: MapLayerConfig, dataset:
773
773
  declare function domainFromValues(values: any, scaleType: ScaleType): any;
774
774
  declare function opacityToAlpha(opacity?: number): number;
775
775
  declare function getColorAccessor({ name, colorColumn }: VisualChannelField, scaleType: ScaleType, { aggregation, range }: {
776
- aggregation: string;
777
- range: any;
776
+ aggregation?: string;
777
+ range: ColorRange;
778
778
  }, opacity: number | undefined, data: TilejsonResult): {
779
779
  accessor: any;
780
- scale: any;
780
+ domain: number[] | string[];
781
+ scaleDomain: number[] | string[];
782
+ range: string[];
783
+ };
784
+ declare function calculateLayerScale(name: string, scaleType: ScaleType, range: ColorRange, data: TilejsonResult): {
785
+ scale: D3Scale;
786
+ domain: string[] | number[];
781
787
  };
782
- declare function calculateLayerScale(name: string, scaleType: ScaleType, range: ColorRange, data: TilejsonResult): D3Scale;
783
788
  declare function createColorScale<T>(scaleType: ScaleType, domain: string[] | number[], range: T[], unknown: T): D3Scale;
784
789
  declare function getIconUrlAccessor(field: VisualChannelField | null | undefined, range: CustomMarkersRange | null | undefined, { fallbackUrl, maxIconSize, useMaskedIcons, }: {
785
790
  fallbackUrl?: string | null;
@@ -789,9 +794,11 @@ declare function getIconUrlAccessor(field: VisualChannelField | null | undefined
789
794
  declare function getMaxMarkerSize(visConfig: VisConfig, visualChannels: VisualChannels): number;
790
795
  type Accessor = number | ((d: any, i: any) => number);
791
796
  declare function negateAccessor(accessor: Accessor): Accessor;
792
- declare function getSizeAccessor({ name }: VisualChannelField, scaleType: ScaleType | undefined, aggregation: string | null | undefined, range: Iterable<Range> | null | undefined, data: TilejsonResult): {
797
+ declare function getSizeAccessor({ name }: VisualChannelField, scaleType: ScaleType | undefined, aggregation: string | null | undefined, range: number[] | undefined, data: TilejsonResult): {
793
798
  accessor: any;
794
- scale: any;
799
+ domain: number[];
800
+ scaleDomain: number[];
801
+ range: number[] | undefined;
795
802
  };
796
803
  declare function getTextAccessor({ name, type }: VisualChannelField, data: any): any;
797
804
 
@@ -854,21 +861,21 @@ type VisConfig = {
854
861
  filled?: boolean;
855
862
  opacity?: number;
856
863
  enable3d?: boolean;
857
- colorAggregation?: any;
864
+ colorAggregation?: string;
858
865
  colorRange: ColorRange;
859
866
  customMarkers?: boolean;
860
867
  customMarkersRange?: CustomMarkersRange | null;
861
868
  customMarkersUrl?: string | null;
862
869
  radius: number;
863
870
  radiusRange?: number[];
864
- sizeAggregation?: any;
865
- sizeRange?: any;
866
- strokeColorAggregation?: any;
871
+ sizeAggregation?: string;
872
+ sizeRange?: number[];
873
+ strokeColorAggregation?: string;
867
874
  strokeOpacity?: number;
868
875
  strokeColorRange?: ColorRange;
869
- heightRange?: any;
870
- heightAggregation?: any;
871
- weightAggregation?: any;
876
+ heightRange?: number[];
877
+ heightAggregation?: string;
878
+ weightAggregation?: string;
872
879
  clusterLevel?: number;
873
880
  isTextVisible?: boolean;
874
881
  rasterStyleType?: 'Rgb' | 'ColorRange' | 'UniqueValues';
@@ -1035,17 +1042,21 @@ declare function getRasterTileLayerStyleProps({ layerConfig, visualChannels, ras
1035
1042
  };
1036
1043
 
1037
1044
  type Scale = {
1045
+ type: ScaleType;
1038
1046
  field: VisualChannelField;
1047
+ /** Natural domain of the scale, as defined by the data */
1039
1048
  domain: string[] | number[];
1040
- range: string[] | number[];
1041
- type: ScaleType;
1049
+ /** Domain of the user to construct d3 scale */
1050
+ scaleDomain?: string[] | number[];
1051
+ range?: string[] | number[];
1042
1052
  };
1043
1053
  type ScaleKey = 'fillColor' | 'pointRadius' | 'lineColor' | 'elevation' | 'weight';
1054
+ type Scales = Partial<Record<ScaleKey, Scale>>;
1044
1055
  type LayerDescriptor = {
1045
1056
  type: LayerType;
1046
1057
  props: Record<string, any>;
1047
1058
  filters?: Filters;
1048
- scales: Partial<Record<ScaleKey, Scale>>;
1059
+ scales: Scales;
1049
1060
  };
1050
1061
  type ParseMapResult = {
1051
1062
  /** Map id. */
@@ -2099,4 +2110,4 @@ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined
2099
2110
  */
2100
2111
  declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
2101
2112
 
2102
- export { type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, 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 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 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 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 VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, 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, _getHexagonResolution, getLog10ScaleSteps as _getLog10ScaleSteps, getRasterTileLayerStyleProps as _getRasterTileLayerStyleProps, validateVecExprSyntax as _validateVecExprSyntax, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, calculateLayerScale, clearDefaultRequestCache, clearFilters, configureSource, createColorScale, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, getLayerDescriptor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getSorter, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
2113
+ export { type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, 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 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 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 VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, 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, _getHexagonResolution, getLog10ScaleSteps as _getLog10ScaleSteps, getRasterTileLayerStyleProps as _getRasterTileLayerStyleProps, validateVecExprSyntax as _validateVecExprSyntax, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, calculateLayerScale, clearDefaultRequestCache, clearFilters, configureSource, createColorScale, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, getLayerDescriptor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getSorter, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
@@ -773,13 +773,18 @@ declare function getLayerProps(type: LayerType, config: MapLayerConfig, dataset:
773
773
  declare function domainFromValues(values: any, scaleType: ScaleType): any;
774
774
  declare function opacityToAlpha(opacity?: number): number;
775
775
  declare function getColorAccessor({ name, colorColumn }: VisualChannelField, scaleType: ScaleType, { aggregation, range }: {
776
- aggregation: string;
777
- range: any;
776
+ aggregation?: string;
777
+ range: ColorRange;
778
778
  }, opacity: number | undefined, data: TilejsonResult): {
779
779
  accessor: any;
780
- scale: any;
780
+ domain: number[] | string[];
781
+ scaleDomain: number[] | string[];
782
+ range: string[];
783
+ };
784
+ declare function calculateLayerScale(name: string, scaleType: ScaleType, range: ColorRange, data: TilejsonResult): {
785
+ scale: D3Scale;
786
+ domain: string[] | number[];
781
787
  };
782
- declare function calculateLayerScale(name: string, scaleType: ScaleType, range: ColorRange, data: TilejsonResult): D3Scale;
783
788
  declare function createColorScale<T>(scaleType: ScaleType, domain: string[] | number[], range: T[], unknown: T): D3Scale;
784
789
  declare function getIconUrlAccessor(field: VisualChannelField | null | undefined, range: CustomMarkersRange | null | undefined, { fallbackUrl, maxIconSize, useMaskedIcons, }: {
785
790
  fallbackUrl?: string | null;
@@ -789,9 +794,11 @@ declare function getIconUrlAccessor(field: VisualChannelField | null | undefined
789
794
  declare function getMaxMarkerSize(visConfig: VisConfig, visualChannels: VisualChannels): number;
790
795
  type Accessor = number | ((d: any, i: any) => number);
791
796
  declare function negateAccessor(accessor: Accessor): Accessor;
792
- declare function getSizeAccessor({ name }: VisualChannelField, scaleType: ScaleType | undefined, aggregation: string | null | undefined, range: Iterable<Range> | null | undefined, data: TilejsonResult): {
797
+ declare function getSizeAccessor({ name }: VisualChannelField, scaleType: ScaleType | undefined, aggregation: string | null | undefined, range: number[] | undefined, data: TilejsonResult): {
793
798
  accessor: any;
794
- scale: any;
799
+ domain: number[];
800
+ scaleDomain: number[];
801
+ range: number[] | undefined;
795
802
  };
796
803
  declare function getTextAccessor({ name, type }: VisualChannelField, data: any): any;
797
804
 
@@ -854,21 +861,21 @@ type VisConfig = {
854
861
  filled?: boolean;
855
862
  opacity?: number;
856
863
  enable3d?: boolean;
857
- colorAggregation?: any;
864
+ colorAggregation?: string;
858
865
  colorRange: ColorRange;
859
866
  customMarkers?: boolean;
860
867
  customMarkersRange?: CustomMarkersRange | null;
861
868
  customMarkersUrl?: string | null;
862
869
  radius: number;
863
870
  radiusRange?: number[];
864
- sizeAggregation?: any;
865
- sizeRange?: any;
866
- strokeColorAggregation?: any;
871
+ sizeAggregation?: string;
872
+ sizeRange?: number[];
873
+ strokeColorAggregation?: string;
867
874
  strokeOpacity?: number;
868
875
  strokeColorRange?: ColorRange;
869
- heightRange?: any;
870
- heightAggregation?: any;
871
- weightAggregation?: any;
876
+ heightRange?: number[];
877
+ heightAggregation?: string;
878
+ weightAggregation?: string;
872
879
  clusterLevel?: number;
873
880
  isTextVisible?: boolean;
874
881
  rasterStyleType?: 'Rgb' | 'ColorRange' | 'UniqueValues';
@@ -1035,17 +1042,21 @@ declare function getRasterTileLayerStyleProps({ layerConfig, visualChannels, ras
1035
1042
  };
1036
1043
 
1037
1044
  type Scale = {
1045
+ type: ScaleType;
1038
1046
  field: VisualChannelField;
1047
+ /** Natural domain of the scale, as defined by the data */
1039
1048
  domain: string[] | number[];
1040
- range: string[] | number[];
1041
- type: ScaleType;
1049
+ /** Domain of the user to construct d3 scale */
1050
+ scaleDomain?: string[] | number[];
1051
+ range?: string[] | number[];
1042
1052
  };
1043
1053
  type ScaleKey = 'fillColor' | 'pointRadius' | 'lineColor' | 'elevation' | 'weight';
1054
+ type Scales = Partial<Record<ScaleKey, Scale>>;
1044
1055
  type LayerDescriptor = {
1045
1056
  type: LayerType;
1046
1057
  props: Record<string, any>;
1047
1058
  filters?: Filters;
1048
- scales: Partial<Record<ScaleKey, Scale>>;
1059
+ scales: Scales;
1049
1060
  };
1050
1061
  type ParseMapResult = {
1051
1062
  /** Map id. */
@@ -2099,4 +2110,4 @@ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined
2099
2110
  */
2100
2111
  declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
2101
2112
 
2102
- export { type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, 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 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 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 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 VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, 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, _getHexagonResolution, getLog10ScaleSteps as _getLog10ScaleSteps, getRasterTileLayerStyleProps as _getRasterTileLayerStyleProps, validateVecExprSyntax as _validateVecExprSyntax, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, calculateLayerScale, clearDefaultRequestCache, clearFilters, configureSource, createColorScale, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, getLayerDescriptor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getSorter, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
2113
+ export { type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, 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 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 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 VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, 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, _getHexagonResolution, getLog10ScaleSteps as _getLog10ScaleSteps, getRasterTileLayerStyleProps as _getRasterTileLayerStyleProps, validateVecExprSyntax as _validateVecExprSyntax, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, calculateClusterRadius, calculateClusterTextFontSize, calculateLayerScale, clearDefaultRequestCache, clearFilters, configureSource, createColorScale, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, getFilter, getIconUrlAccessor, getLayerDescriptor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getSorter, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
@@ -9204,7 +9204,19 @@ var SCALE_FUNCS = {
9204
9204
  function identity2(v2) {
9205
9205
  return v2;
9206
9206
  }
9207
+ var hexToRGB = (c) => {
9208
+ const { r, g, b } = rgb(c);
9209
+ return [r, g, b];
9210
+ };
9211
+ var rgbToHex = (c) => {
9212
+ const [r, g, b] = c;
9213
+ const rStr = r.toString(16).padStart(2, "0");
9214
+ const gStr = g.toString(16).padStart(2, "0");
9215
+ const bStr = b.toString(16).padStart(2, "0");
9216
+ return `#${rStr}${gStr}${bStr}`.toUpperCase();
9217
+ };
9207
9218
  var UNKNOWN_COLOR = "#868d91";
9219
+ var UNKNOWN_COLOR_RGB = hexToRGB(UNKNOWN_COLOR);
9208
9220
  var OPACITY_MAP = {
9209
9221
  getFillColor: "opacity",
9210
9222
  getLineColor: "strokeOpacity",
@@ -9311,13 +9323,6 @@ function getLayerProps(type, config2, dataset) {
9311
9323
  };
9312
9324
  }
9313
9325
  function domainFromAttribute(attribute, scaleType, scaleLength) {
9314
- if (scaleType === "log10steps" && attribute.min !== void 0 && attribute.max !== void 0) {
9315
- return getLog10ScaleSteps({
9316
- min: attribute.min,
9317
- max: attribute.max,
9318
- steps: scaleLength
9319
- });
9320
- }
9321
9326
  if (scaleType === "ordinal" || scaleType === "point") {
9322
9327
  if (!attribute.categories) {
9323
9328
  return [0, 1];
@@ -9392,7 +9397,7 @@ function findAccessorKey(keys, properties) {
9392
9397
  return keys;
9393
9398
  }
9394
9399
  function getColorAccessor({ name, colorColumn }, scaleType, { aggregation, range }, opacity, data) {
9395
- const scale2 = calculateLayerScale(
9400
+ const { scale: scale2, domain } = calculateLayerScale(
9396
9401
  colorColumn || name,
9397
9402
  scaleType,
9398
9403
  range,
@@ -9405,18 +9410,30 @@ function getColorAccessor({ name, colorColumn }, scaleType, { aggregation, range
9405
9410
  accessorKeys = findAccessorKey(accessorKeys, properties);
9406
9411
  }
9407
9412
  const propertyValue = properties[accessorKeys[0]];
9408
- const { r, g, b } = rgb(scale2(propertyValue));
9413
+ const [r, g, b] = scale2(propertyValue);
9409
9414
  return [r, g, b, propertyValue === null ? 0 : alpha];
9410
9415
  };
9411
- return { accessor: normalizeAccessor(accessor, data), scale: scale2 };
9416
+ return {
9417
+ accessor: normalizeAccessor(accessor, data),
9418
+ scaleDomain: scale2.domain(),
9419
+ domain,
9420
+ range: scale2.range().map(rgbToHex)
9421
+ };
9412
9422
  }
9413
9423
  function calculateLayerScale(name, scaleType, range, data) {
9414
9424
  let domain = [];
9425
+ let scaleDomain;
9415
9426
  let scaleColor = [];
9416
9427
  const { colors } = range;
9417
9428
  if (scaleType === "custom") {
9418
9429
  if (range.uiCustomScaleType === "logarithmic") {
9419
- domain = calculateDomain(data, name, "log10steps", colors.length);
9430
+ domain = calculateDomain(data, name, scaleType, colors.length);
9431
+ const [min2, max2] = domain;
9432
+ scaleDomain = getLog10ScaleSteps({
9433
+ min: min2,
9434
+ max: max2,
9435
+ steps: colors.length
9436
+ });
9420
9437
  scaleColor = colors;
9421
9438
  } else if (range.colorMap) {
9422
9439
  const { colorMap } = range;
@@ -9432,7 +9449,15 @@ function calculateLayerScale(name, scaleType, range, data) {
9432
9449
  domain = domain.slice(0, scaleColor.length);
9433
9450
  }
9434
9451
  }
9435
- return createColorScale(scaleType, domain, scaleColor, UNKNOWN_COLOR);
9452
+ return {
9453
+ scale: createColorScale(
9454
+ scaleType,
9455
+ scaleDomain || domain,
9456
+ scaleColor.map(hexToRGB),
9457
+ UNKNOWN_COLOR_RGB
9458
+ ),
9459
+ domain
9460
+ };
9436
9461
  }
9437
9462
  function createColorScale(scaleType, domain, range, unknown) {
9438
9463
  const scale2 = SCALE_FUNCS[scaleType]();
@@ -9488,9 +9513,13 @@ function negateAccessor(accessor) {
9488
9513
  }
9489
9514
  function getSizeAccessor({ name }, scaleType, aggregation, range, data) {
9490
9515
  const scale2 = scaleType ? SCALE_FUNCS[scaleType]() : identity2;
9491
- if (scaleType) {
9516
+ let domain = [];
9517
+ if (scaleType && range) {
9492
9518
  if (aggregation !== AggregationTypes.Count) {
9493
- scale2.domain(calculateDomain(data, name, scaleType));
9519
+ domain = calculateDomain(data, name, scaleType);
9520
+ scale2.domain(domain);
9521
+ } else {
9522
+ domain = scale2.domain();
9494
9523
  }
9495
9524
  scale2.range(range);
9496
9525
  }
@@ -9502,7 +9531,12 @@ function getSizeAccessor({ name }, scaleType, aggregation, range, data) {
9502
9531
  const propertyValue = properties[accessorKeys[0]];
9503
9532
  return scale2(propertyValue);
9504
9533
  };
9505
- return { accessor: normalizeAccessor(accessor, data), scale: scale2 };
9534
+ return {
9535
+ accessor: normalizeAccessor(accessor, data),
9536
+ domain,
9537
+ scaleDomain: domain,
9538
+ range
9539
+ };
9506
9540
  }
9507
9541
  var FORMATS = {
9508
9542
  date: formatDate,
@@ -9847,7 +9881,7 @@ function getRasterTileLayerStylePropsScaledBand({
9847
9881
  const scaleFun = createColorScale(
9848
9882
  scaleType,
9849
9883
  domain,
9850
- colorRange.colors.map(hexToRGB),
9884
+ colorRange.colors.map(hexToRGB2),
9851
9885
  UNKNOWN_COLOR2
9852
9886
  );
9853
9887
  const bandColorScaleDataTransform = createBandColorScaleDataTransform({
@@ -9915,7 +9949,7 @@ function bufferSetRgba(target, index, r, g, b, a) {
9915
9949
  target[index + 2] = b;
9916
9950
  target[index + 3] = a;
9917
9951
  }
9918
- function hexToRGB(hexColor) {
9952
+ function hexToRGB2(hexColor) {
9919
9953
  const r = parseInt(hexColor.slice(1, 3), 16);
9920
9954
  const g = parseInt(hexColor.slice(3, 5), 16);
9921
9955
  const b = parseInt(hexColor.slice(5, 7), 16);
@@ -10056,24 +10090,7 @@ function createStyleProps(config2, mapping) {
10056
10090
  result.highlightColor = config2.visConfig.enable3d ? [255, 255, 255, 60] : [252, 242, 26, 255];
10057
10091
  return result;
10058
10092
  }
10059
- function domainAndRangeFromScale(scale2) {
10060
- return {
10061
- domain: scale2.domain(),
10062
- range: scale2.range()
10063
- };
10064
- }
10065
10093
  function createChannelProps(id, layerType, config2, visualChannels, data, dataset) {
10066
- const {
10067
- colorField,
10068
- colorScale,
10069
- radiusField,
10070
- radiusScale,
10071
- strokeColorField,
10072
- strokeColorScale,
10073
- sizeField: strokeWidthField,
10074
- sizeScale: strokeWidthScale,
10075
- weightField
10076
- } = visualChannels;
10077
10094
  if (layerType === "raster") {
10078
10095
  const rasterMetadata = data.raster_metadata;
10079
10096
  if (!rasterMetadata) {
@@ -10091,6 +10108,7 @@ function createChannelProps(id, layerType, config2, visualChannels, data, datase
10091
10108
  visualChannels
10092
10109
  }),
10093
10110
  scales: {}
10111
+ // TODO
10094
10112
  };
10095
10113
  } else {
10096
10114
  return {
@@ -10100,40 +10118,35 @@ function createChannelProps(id, layerType, config2, visualChannels, data, datase
10100
10118
  rasterMetadata
10101
10119
  }),
10102
10120
  scales: {
10103
- ...colorField && {
10104
- fillColor: {
10105
- field: colorField,
10106
- type: "ordinal",
10107
- domain: [],
10108
- range: []
10109
- }
10110
- }
10121
+ // TODO
10111
10122
  }
10112
10123
  };
10113
10124
  }
10114
10125
  }
10115
- const { heightField, heightScale } = visualChannels;
10116
10126
  const { textLabel, visConfig } = config2;
10117
10127
  const result = {};
10118
10128
  const updateTriggers = {};
10119
10129
  const scales = {};
10120
- if (colorField) {
10121
- const { colorAggregation: aggregation, colorRange: range } = visConfig;
10122
- const { accessor, scale: scale2 } = getColorAccessor(
10123
- colorField,
10124
- colorScale,
10125
- { aggregation, range },
10126
- visConfig.opacity,
10127
- data
10128
- );
10129
- result.getFillColor = accessor;
10130
- scales.fillColor = updateTriggers.getFillColor = {
10131
- field: colorField,
10132
- type: colorScale,
10133
- ...domainAndRangeFromScale(scale2)
10134
- };
10135
- } else if (visConfig.filled) {
10136
- scales.fillColor = {};
10130
+ {
10131
+ const { colorField, colorScale } = visualChannels;
10132
+ const { colorRange, colorAggregation } = visConfig;
10133
+ if (colorField && colorScale && colorRange) {
10134
+ const { accessor, ...scaleProps } = getColorAccessor(
10135
+ colorField,
10136
+ colorScale,
10137
+ { aggregation: colorAggregation, range: colorRange },
10138
+ visConfig.opacity,
10139
+ data
10140
+ );
10141
+ result.getFillColor = accessor;
10142
+ scales.fillColor = updateTriggers.getFillColor = {
10143
+ field: colorField,
10144
+ type: colorScale,
10145
+ ...scaleProps
10146
+ };
10147
+ } else {
10148
+ scales.fillColor = {};
10149
+ }
10137
10150
  }
10138
10151
  if (layerType === "clusterTile") {
10139
10152
  const aggregationExpAlias = getDefaultAggregationExpColumnAliasForLayerType(
@@ -10186,82 +10199,102 @@ function createChannelProps(id, layerType, config2, visualChannels, data, datase
10186
10199
  radiusRange: visConfig.radiusRange
10187
10200
  };
10188
10201
  }
10189
- if (radiusField) {
10190
- const { accessor, scale: scale2 } = getSizeAccessor(
10191
- radiusField,
10192
- radiusScale,
10193
- visConfig.sizeAggregation,
10194
- visConfig.radiusRange || visConfig.sizeRange,
10195
- data
10196
- );
10197
- result.getPointRadius = accessor;
10198
- scales.pointRadius = updateTriggers.getPointRadius = {
10199
- field: radiusField,
10200
- type: radiusScale || "identity",
10201
- ...domainAndRangeFromScale(scale2)
10202
- };
10202
+ {
10203
+ const radiusRange = visConfig.radiusRange;
10204
+ const { radiusField, radiusScale } = visualChannels;
10205
+ if (radiusField && radiusRange && radiusScale) {
10206
+ const { accessor, ...scaleProps } = getSizeAccessor(
10207
+ radiusField,
10208
+ radiusScale,
10209
+ visConfig.sizeAggregation,
10210
+ radiusRange,
10211
+ data
10212
+ );
10213
+ result.getPointRadius = accessor;
10214
+ scales.pointRadius = updateTriggers.getPointRadius = {
10215
+ field: radiusField,
10216
+ type: radiusScale,
10217
+ ...scaleProps
10218
+ };
10219
+ }
10203
10220
  }
10204
- if (strokeColorField) {
10205
- const opacity = visConfig.strokeOpacity !== void 0 ? visConfig.strokeOpacity : 1;
10206
- const { strokeColorAggregation: aggregation, strokeColorRange: range } = visConfig;
10207
- const { accessor, scale: scale2 } = getColorAccessor(
10208
- strokeColorField,
10209
- strokeColorScale,
10210
- { aggregation, range },
10211
- opacity,
10212
- data
10213
- );
10214
- result.getLineColor = accessor;
10215
- scales.lineColor = updateTriggers.getLineColor = {
10216
- field: strokeColorField,
10217
- type: strokeColorScale,
10218
- ...domainAndRangeFromScale(scale2)
10219
- };
10221
+ {
10222
+ const strokeColorRange = visConfig.strokeColorRange;
10223
+ const { strokeColorScale, strokeColorField } = visualChannels;
10224
+ if (strokeColorField && strokeColorRange && strokeColorScale) {
10225
+ const { strokeColorAggregation: aggregation } = visConfig;
10226
+ const opacity = visConfig.strokeOpacity !== void 0 ? visConfig.strokeOpacity : 1;
10227
+ const { accessor, ...scaleProps } = getColorAccessor(
10228
+ strokeColorField,
10229
+ strokeColorScale,
10230
+ { aggregation, range: strokeColorRange },
10231
+ opacity,
10232
+ data
10233
+ );
10234
+ result.getLineColor = accessor;
10235
+ scales.lineColor = updateTriggers.getLineColor = {
10236
+ field: strokeColorField,
10237
+ type: strokeColorScale,
10238
+ ...scaleProps
10239
+ };
10240
+ }
10220
10241
  }
10221
- if (strokeWidthField) {
10222
- const { accessor, scale: scale2 } = getSizeAccessor(
10223
- strokeWidthField,
10224
- strokeWidthScale,
10225
- visConfig.sizeAggregation,
10226
- visConfig.sizeRange,
10227
- data
10228
- );
10229
- result.getLineWidth = accessor;
10230
- scales.lineWidth = updateTriggers.getLineWidth = {
10231
- field: strokeWidthField,
10232
- type: strokeWidthScale || "identity",
10233
- ...domainAndRangeFromScale(scale2)
10234
- };
10242
+ {
10243
+ const { sizeField: strokeWidthField, sizeScale: strokeWidthScale } = visualChannels;
10244
+ const { sizeRange, sizeAggregation } = visConfig;
10245
+ if (strokeWidthField && sizeRange) {
10246
+ const { accessor, ...scaleProps } = getSizeAccessor(
10247
+ strokeWidthField,
10248
+ strokeWidthScale,
10249
+ sizeAggregation,
10250
+ sizeRange,
10251
+ data
10252
+ );
10253
+ result.getLineWidth = accessor;
10254
+ scales.lineWidth = updateTriggers.getLineWidth = {
10255
+ field: strokeWidthField,
10256
+ type: strokeWidthScale || "identity",
10257
+ ...scaleProps
10258
+ };
10259
+ }
10235
10260
  }
10236
- if (heightField && visConfig.enable3d) {
10237
- const { accessor, scale: scale2 } = getSizeAccessor(
10238
- heightField,
10239
- heightScale,
10240
- visConfig.heightAggregation,
10241
- visConfig.heightRange || visConfig.sizeRange,
10242
- data
10243
- );
10244
- result.getElevation = accessor;
10245
- scales.elevation = updateTriggers.getElevation = {
10246
- field: heightField,
10247
- type: heightScale || "identity",
10248
- ...domainAndRangeFromScale(scale2)
10249
- };
10261
+ {
10262
+ const { enable3d, heightRange } = visConfig;
10263
+ const { heightField, heightScale } = visualChannels;
10264
+ if (heightField && heightRange && enable3d) {
10265
+ const { accessor, ...scaleProps } = getSizeAccessor(
10266
+ heightField,
10267
+ heightScale,
10268
+ visConfig.heightAggregation,
10269
+ heightRange,
10270
+ data
10271
+ );
10272
+ result.getElevation = accessor;
10273
+ scales.elevation = updateTriggers.getElevation = {
10274
+ field: heightField,
10275
+ type: heightScale || "identity",
10276
+ ...scaleProps
10277
+ };
10278
+ }
10250
10279
  }
10251
- if (weightField) {
10252
- const { accessor, scale: scale2 } = getSizeAccessor(
10253
- weightField,
10254
- void 0,
10255
- visConfig.weightAggregation,
10256
- void 0,
10257
- data
10258
- );
10259
- result.getWeight = accessor;
10260
- scales.weight = updateTriggers.getWeight = {
10261
- field: weightField,
10262
- type: "identity",
10263
- ...domainAndRangeFromScale(scale2)
10264
- };
10280
+ {
10281
+ const { weightField } = visualChannels;
10282
+ const { weightAggregation } = visConfig;
10283
+ if (weightField && weightAggregation) {
10284
+ const { accessor, ...scaleProps } = getSizeAccessor(
10285
+ weightField,
10286
+ void 0,
10287
+ weightAggregation,
10288
+ void 0,
10289
+ data
10290
+ );
10291
+ result.getWeight = accessor;
10292
+ scales.weight = updateTriggers.getWeight = {
10293
+ field: weightField,
10294
+ type: "identity",
10295
+ ...scaleProps
10296
+ };
10297
+ }
10265
10298
  }
10266
10299
  if (visConfig.customMarkers) {
10267
10300
  const maxIconSize = getMaxMarkerSize(visConfig, visualChannels);