Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading