diff --git a/site/.dumi/pages/custom/docs/sdk.md b/site/.dumi/pages/custom/docs/sdk.md index dd8355d48f..4cc8c07df0 100644 --- a/site/.dumi/pages/custom/docs/sdk.md +++ b/site/.dumi/pages/custom/docs/sdk.md @@ -36,7 +36,7 @@ npm i district-data ### option - version 数据版本 -- type 数据格式 `'wgs84' | 'gcj02'` +- type 坐标系 **注意在使用 `type` 之前请保证 `version` 为 `2024` 及以上。** @@ -44,7 +44,7 @@ npm i district-data import { RDBSource } from 'district-data'; const source = new RDBSource({ version: 2024, - type: 'wgs84', + type: 'gcj02', // 默认 }); ``` diff --git a/site/.dumi/pages/custom/docs/service.md b/site/.dumi/pages/custom/docs/service.md index 74d84442c7..8bbb6e6daf 100644 --- a/site/.dumi/pages/custom/docs/service.md +++ b/site/.dumi/pages/custom/docs/service.md @@ -28,7 +28,7 @@ version 为 2024 及以上时也可使用以下数据服务 - 'district' - 'jiuduanxian' -#### version +#### version 数据版本 - 2023 - 2022 @@ -40,9 +40,8 @@ version 为 2024 及以上时也可使用以下数据服务 - 2016 - 2015 -#### type +#### type 坐标系 -- 'wgs84' - 'gcj02' ### 数据获取 diff --git a/site/maptools/demo/index.tsx b/site/maptools/demo/index.tsx index 8f6f20e7ca..aa3fd88803 100644 --- a/site/maptools/demo/index.tsx +++ b/site/maptools/demo/index.tsx @@ -8,6 +8,7 @@ import { DownloadOutlined, InfoCircleOutlined, PictureOutlined, + QuestionCircleOutlined, } from '@ant-design/icons'; import type { LayerPopupProps } from '@antv/larkmap'; import { @@ -23,6 +24,7 @@ import { Col, Descriptions, Divider, + Popover, Radio, Row, Select, @@ -34,7 +36,7 @@ import { import type { BaseSource, DataLevel } from 'district-data'; import { DataSourceMap } from 'district-data'; import { debounce } from 'lodash-es'; -import { useEffect, useMemo, useState } from 'react'; +import React, { useEffect, useMemo, useState } from 'react'; import { downloadData, exportSVG } from '../utils/util'; import './index.less'; import type { IDataInfo } from './util'; @@ -69,7 +71,7 @@ export default () => { const [loading, setLoading] = useState(false); const size = 'middle'; const [dataInfo, setDataInfo] = useState(defaultDataInfo); - const [dataType, setDataType] = useState<'wgs84' | 'gcj02'>('wgs84'); + const [dataType, setDataType] = useState<'wgs84' | 'gcj02'>('gcj02'); const [drillList, setDrillList] = useState([ { currentLevel: 'country', @@ -334,7 +336,11 @@ export default () => { 数据格式: - GCJ02 + + + + {/* { > wgs84 gcj02 - + */}