Skip to content

Commit

Permalink
docs: district-data 下架 wgs84 说明和导出 (#2493)
Browse files Browse the repository at this point in the history
* feat: 新增 Popup 支持更新 className 和 style

* docs: district-data 下架 wgs84 说明和导出

* fix: 去除无用文件提交
  • Loading branch information
heiyexing committed May 23, 2024
1 parent a092a33 commit dcd14fb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions site/.dumi/pages/custom/docs/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ npm i district-data
### option
- version 数据版本
- type 数据格式 `'wgs84' | 'gcj02'`
- type 坐标系
**注意在使用 `type` 之前请保证 `version``2024` 及以上。**
```ts
import { RDBSource } from 'district-data';
const source = new RDBSource({
version: 2024,
type: 'wgs84',
type: 'gcj02', // 默认
});
```
Expand Down
5 changes: 2 additions & 3 deletions site/.dumi/pages/custom/docs/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ version 为 2024 及以上时也可使用以下数据服务
- 'district'
- 'jiuduanxian'

#### version
#### version 数据版本

- 2023
- 2022
Expand All @@ -40,9 +40,8 @@ version 为 2024 及以上时也可使用以下数据服务
- 2016
- 2015

#### type
#### type 坐标系

- 'wgs84'
- 'gcj02'

### 数据获取
Expand Down
14 changes: 10 additions & 4 deletions site/maptools/demo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
DownloadOutlined,
InfoCircleOutlined,
PictureOutlined,
QuestionCircleOutlined,
} from '@ant-design/icons';
import type { LayerPopupProps } from '@antv/larkmap';
import {
Expand All @@ -23,6 +24,7 @@ import {
Col,
Descriptions,
Divider,
Popover,
Radio,
Row,
Select,
Expand All @@ -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';
Expand Down Expand Up @@ -69,7 +71,7 @@ export default () => {
const [loading, setLoading] = useState(false);
const size = 'middle';
const [dataInfo, setDataInfo] = useState<IDataInfo>(defaultDataInfo);
const [dataType, setDataType] = useState<'wgs84' | 'gcj02'>('wgs84');
const [dataType, setDataType] = useState<'wgs84' | 'gcj02'>('gcj02');
const [drillList, setDrillList] = useState<any[]>([
{
currentLevel: 'country',
Expand Down Expand Up @@ -334,7 +336,11 @@ export default () => {
数据格式:
</Col>
<Col span={12} style={{ textAlign: 'right' }}>
<Radio.Group
<span style={{ marginRight: 6 }}>GCJ02</span>
<Popover content="因政策原因,WGS84 坐标系数据已下线">
<QuestionCircleOutlined />
</Popover>
{/* <Radio.Group
defaultValue={dataType}
size={size}
value={dataType}
Expand All @@ -344,7 +350,7 @@ export default () => {
>
<Radio.Button value="wgs84">wgs84</Radio.Button>
<Radio.Button value="gcj02">gcj02</Radio.Button>
</Radio.Group>
</Radio.Group> */}
</Col>
</Row>

Expand Down

0 comments on commit dcd14fb

Please sign in to comment.