diff --git a/.changeset/eighty-dingos-sing.md b/.changeset/eighty-dingos-sing.md new file mode 100644 index 0000000..f522a9e --- /dev/null +++ b/.changeset/eighty-dingos-sing.md @@ -0,0 +1,5 @@ +--- +'@antv/gpt-vis': patch +--- + +fix: add style props for map diff --git a/src/Map/index.tsx b/src/Map/index.tsx index 441e153..3327c85 100644 --- a/src/Map/index.tsx +++ b/src/Map/index.tsx @@ -2,12 +2,12 @@ import { LarkMap } from '@antv/larkmap'; import React, { useMemo, type FC } from 'react'; import type { BaseMapProps } from '../types'; import { formatMapStyle } from '../utils/map'; -import { MapView, Marker, Polyline } from './Component/'; +import { MapView, Marker, Polyline } from './Component'; export type MapProps = Omit, 'data'>; const Map: FC = (props) => { - const { className, containerStyle, children } = props; + const { className, containerStyle, style, children } = props; const mapConfig = useMemo(() => formatMapStyle(props), [props]); const onSceneLoaded = async () => { if (props.onInitComplete) { @@ -18,7 +18,7 @@ const Map: FC = (props) => { return ( diff --git a/src/types/chart.ts b/src/types/chart.ts index 763ba73..32ea655 100644 --- a/src/types/chart.ts +++ b/src/types/chart.ts @@ -43,6 +43,7 @@ export interface BasePlotProps extends BaseChartProps { } export interface BaseMapProps extends BaseChartProps, Map { + style?: CSSProperties; data: T[]; // 高德地图密钥 token?: string;