bbl-mapbox-react 0.0.13 → 0.0.15

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.
@@ -56,7 +56,7 @@ export declare abstract class BaseCanvasRenderer<T extends BaseEntity> {
56
56
  * 获取面积标签的锚点和偏移,子类可覆盖以自定义位置
57
57
  */
58
58
  protected getAreaLabelAnchor(): {
59
- anchor: string;
59
+ anchor: 'top' | 'bottom' | 'left' | 'right' | 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
60
60
  offset: [number, number];
61
61
  };
62
62
  protected initLabelLayer(): void;
@@ -37,7 +37,7 @@ export declare class CanvasCircleRenderer extends BaseCanvasRenderer<CircleEntit
37
37
  * 面积标签在中心点上方
38
38
  */
39
39
  protected getAreaLabelAnchor(): {
40
- anchor: string;
40
+ anchor: 'top' | 'bottom' | 'left' | 'right' | 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
41
41
  offset: [number, number];
42
42
  };
43
43
  private get radiusTextStyle();
@@ -2,8 +2,11 @@ import { Map as MapboxMap } from 'mapbox-gl';
2
2
  import { EntityConfig } from '../types';
3
3
  export interface MeasureControlProps {
4
4
  map: MapboxMap | null;
5
- defaultEntityConfig?: EntityConfig;
5
+ /** 受控模式:外部传入 entityConfig */
6
+ entityConfig?: EntityConfig;
7
+ /** 受控模式:entityConfig 变更回调 */
8
+ onEntityConfigChange?: (config: EntityConfig) => void;
6
9
  className?: string;
7
10
  style?: React.CSSProperties;
8
11
  }
9
- export declare function MeasureControl({ map, defaultEntityConfig, className, style, }: MeasureControlProps): import("react/jsx-runtime").JSX.Element | null;
12
+ export declare function MeasureControl({ map, entityConfig: controlledEntityConfig, onEntityConfigChange, className, style, }: MeasureControlProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { Map as MapboxMap } from 'mapbox-gl';
3
+ import { RasterPaintConfig } from '../types';
4
+ export interface RasterPaintControlProps {
5
+ map: MapboxMap | null;
6
+ /** 受控模式值 */
7
+ value?: RasterPaintConfig;
8
+ /** 受控模式回调 */
9
+ onChange?: (config: RasterPaintConfig) => void;
10
+ /** 需要应用 rasterPaint 的地图图层 ID 列表 */
11
+ rasterPaintLayerIds?: string[];
12
+ className?: string;
13
+ style?: React.CSSProperties;
14
+ }
15
+ export default function RasterPaintControl({ map, value, onChange, rasterPaintLayerIds, className, style, }: RasterPaintControlProps): import("react/jsx-runtime").JSX.Element;