From 2a382e1f1618a4f062b322aeae04000272fcf50c Mon Sep 17 00:00:00 2001 From: yanxiong Date: Fri, 8 Dec 2023 13:46:31 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20tabs=20icon=20?= =?UTF-8?q?=E9=97=B4=E8=B7=9D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/components/map-content/index.tsx | 30 +++++++++------------------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index b8ec1da..6669d0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7-editor", - "version": "1.1.7", + "version": "1.1.8", "description": "Geographic data editing tool based on L7", "files": [ "lib", diff --git a/src/components/map-content/index.tsx b/src/components/map-content/index.tsx index adc77fc..5f2d0f4 100644 --- a/src/components/map-content/index.tsx +++ b/src/components/map-content/index.tsx @@ -4,10 +4,10 @@ import type { TabsProps } from 'antd'; import { Select, Tabs } from 'antd'; import React, { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; -import { IconFont } from '../iconfont'; import { useFeature, useGlobal } from '../../recoil'; import { AppTable } from '../app-table'; import { GeoJsonEditor } from '../geojson-editor'; +import { IconFont } from '../iconfont'; import { WktEditor } from '../wkt-editor'; import useStyle from './styles'; @@ -35,35 +35,23 @@ export const MapContent: React.FC = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [features]); - const tabItem = [ + const defaultTabItems: TabsProps['items'] = [ { key: 'geojson', - label: ( -
- - GeoJSON -
- ), + icon: , + label: 'GeoJSON', children: , }, { key: 'wkt', - label: ( -
- - WKT -
- ), + icon: , + label: 'WKT', children: , }, { key: 'table', - label: ( -
- - {t('app_header.constants.biaoGe')} -
- ), + icon: , + label: t('app_header.constants.biaoGe'), children: , }, ]; @@ -88,7 +76,7 @@ export const MapContent: React.FC = ({ activeKey={activeTab === 'code' ? 'geojson' : activeTab} className={styles.mapContentRight} defaultActiveKey="geojson" - items={tabItems ? tabItems : tabItem} + items={tabItems ? tabItems : defaultTabItems} onChange={(e) => { setActiveTab(e as 'geojson' | 'table' | 'wkt'); }} From b3a998d26175a86a8f93a87467258849226b8cdc Mon Sep 17 00:00:00 2001 From: yanxiong Date: Fri, 15 Dec 2023 11:36:21 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=9B=BE=E5=B1=82=E9=85=8D=E7=BD=AE=E6=8E=A7=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/index.md | 3 +- package.json | 2 +- src/components/app-header/btn/setting-btn.tsx | 25 +----- src/components/layer-list/index.tsx | 4 +- src/components/map-control-group/index.tsx | 4 +- .../official-layer-control/styles.ts | 2 +- .../text-layer-control/index.tsx | 73 ++++++++++++++++ src/components/text-layer/index.tsx | 86 +++++++++++++------ src/constants/iconfont.js | 2 +- src/constants/index.ts | 10 +-- src/pages/components/editor.tsx | 4 +- src/pages/index.tsx | 4 + src/recoil/atomState.ts | 17 ++-- src/recoil/global.ts | 14 ++- src/types/l7editor.ts | 10 ++- src/utils/feature.ts | 15 ++++ src/utils/index.ts | 1 + 17 files changed, 200 insertions(+), 76 deletions(-) create mode 100644 src/components/map-control-group/text-layer-control/index.tsx create mode 100644 src/utils/feature.ts diff --git a/docs/docs/index.md b/docs/docs/index.md index f42f55a..7c1da0c 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -37,7 +37,8 @@ title: API | mapControl | 控件显隐 | [MapControlProps](#mapcontrolprops) | `-` | | toolbar | 头部组件显隐 | [ToolbarProps](#toolbarprops) | `-` | | tabItems | 侧面版标签页选项卡内容 | [TabItemType](https://ant-design.antgroup.com/components/tabs-cn#tabitemtype) | `-` | -| showIndex | 是否展示元素序号 | `boolean` | `false` | +| showTextLayer | 是否展示元素文本 | `boolean` | `false` | +| textLayerFields | 展示元素文本的字段,不选则展示元素序号 | `string[] | undefined` | `undefined` | | wasmPath | sam 组件的 wasm 路径 | `string` | `\` | #### `tabItems` diff --git a/package.json b/package.json index 6669d0d..4ad586a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7-editor", - "version": "1.1.8", + "version": "1.1.9", "description": "Geographic data editing tool based on L7", "files": [ "lib", diff --git a/src/components/app-header/btn/setting-btn.tsx b/src/components/app-header/btn/setting-btn.tsx index 1567ae5..d7ba737 100644 --- a/src/components/app-header/btn/setting-btn.tsx +++ b/src/components/app-header/btn/setting-btn.tsx @@ -6,14 +6,8 @@ import { useGlobal } from '../../../recoil'; export const SettingBtn = () => { const [isModalOpen, setIsModalOpen] = useState(false); - const { - popupTrigger, - setPopupTrigger, - autoFitBounds, - setAutoFitBounds, - showIndex, - setShowIndex - } = useGlobal(); + const { popupTrigger, setPopupTrigger, autoFitBounds, setAutoFitBounds } = + useGlobal(); const { t } = useTranslation(); const [form] = Form.useForm(); @@ -55,14 +49,12 @@ export const SettingBtn = () => { initialValues={{ popupTrigger, autoFitBounds, - showIndex, }} style={{ textAlign: 'right' }} onFinish={(e) => { setIsModalOpen(false); setPopupTrigger(e.popupTrigger); setAutoFitBounds(e.autoFitBounds); - setShowIndex(e.showIndex) }} > { > - - - - {t('btn.setting_btn.kaiQi')} - - - {t('btn.setting_btn.guanBi')} - - - diff --git a/src/components/layer-list/index.tsx b/src/components/layer-list/index.tsx index d3a17cd..9c55bbe 100644 --- a/src/components/layer-list/index.tsx +++ b/src/components/layer-list/index.tsx @@ -15,11 +15,12 @@ import { FeatureKey, LayerId, LayerZIndex } from '../../constants'; import { useFilterFeatures } from '../../hooks'; import { useFeature, useGlobal } from '../../recoil'; import { getPointImage } from '../../utils/change-image-color'; +import { EditorTextLayer } from '../text-layer'; export const LayerList: React.FC = () => { const scene = useScene(); const [isMounted, setIsMounted] = useState(false); - const { layerColor, coordConvert, baseMap } = useGlobal(); + const { layerColor, coordConvert, baseMap, showTextLayer } = useGlobal(); const { transformCoord } = useFeature(); const { features: newFeatures } = useFilterFeatures(); const [features, setFeatures] = useState([]); @@ -111,6 +112,7 @@ export const LayerList: React.FC = () => { state={{ active: { color: activeColor } }} zIndex={LayerZIndex} /> + {showTextLayer && } ) : null; }; diff --git a/src/components/map-control-group/index.tsx b/src/components/map-control-group/index.tsx index f4abd5b..b54659d 100644 --- a/src/components/map-control-group/index.tsx +++ b/src/components/map-control-group/index.tsx @@ -22,6 +22,7 @@ import MapThemeControl from './map-theme-control'; import { OfficialLayerControl } from './official-layer-control'; import { SamControl } from './sam-control'; import useStyles from './styles'; +import { TextLayerControl } from './text-layer-control'; type MapControlGroupProps = { mapControl?: MapControlProps; @@ -70,7 +71,7 @@ export const MapControlGroup: React.FC = ({ {isControlGroupState.drawControl && } {isControlGroupState.clearControl && } {isControlGroupState.zoomControl && ( - + )} {isControlGroupState.mapAdministrativeControl && ( @@ -96,6 +97,7 @@ export const MapControlGroup: React.FC = ({ /> )} {layerType.includes(OfficeLayerEnum.GoogleSatellite) && } + ); }; diff --git a/src/components/map-control-group/official-layer-control/styles.ts b/src/components/map-control-group/official-layer-control/styles.ts index 5286b8f..2c77d74 100644 --- a/src/components/map-control-group/official-layer-control/styles.ts +++ b/src/components/map-control-group/official-layer-control/styles.ts @@ -26,7 +26,7 @@ const useStyle = () => { `, hideOfficeLayerBtn: css` height: 127px; - width: 20px; + width: 28px; display: flex; align-items: center; justify-content: center; diff --git a/src/components/map-control-group/text-layer-control/index.tsx b/src/components/map-control-group/text-layer-control/index.tsx new file mode 100644 index 0000000..80afc55 --- /dev/null +++ b/src/components/map-control-group/text-layer-control/index.tsx @@ -0,0 +1,73 @@ +import { CustomControl } from '@antv/larkmap'; +import { Form, Popover, Select, Switch, Tooltip } from 'antd'; +import React, { useState } from 'react'; +import { useFeature, useGlobal } from '../../../recoil'; +import { IconFont } from '../../iconfont'; +import useStyles from '../styles'; + +export type TextLayerControlProps = {}; + +export const TextLayerControl: React.FC = () => { + const styles = useStyles(); + const { + showTextLayer, + setShowTextLayer, + textLayerFields, + setTextLayerFields, + } = useGlobal(); + const { features } = useFeature(); + const [fields, setFields] = useState([]); + + const refreshFields = () => { + const newFieldSet = new Set(); + features.forEach((feature) => { + const properties = feature.properties; + if (properties) { + Object.keys(properties).forEach((key) => { + newFieldSet.add(key); + }); + } + }); + setFields(Array.from(newFieldSet)); + }; + + return ( + + + + + + + + { return { label: item, value: item }; @@ -62,7 +66,10 @@ export const TextLayerControl: React.FC = () => { } }} > - + diff --git a/src/components/map-control-group/text-layer-control/style.ts b/src/components/map-control-group/text-layer-control/style.ts new file mode 100644 index 0000000..5c21cb4 --- /dev/null +++ b/src/components/map-control-group/text-layer-control/style.ts @@ -0,0 +1,12 @@ +import { css } from '@emotion/css'; + +const useStyle = () => { + return { + textLayerForm: css` + .ant-form-item { + margin-bottom: 12px !important; + } + `, + }; +}; +export default useStyle; diff --git a/src/locales/langs/en-US.ts b/src/locales/langs/en-US.ts index 9f2aeb9..848dcb6 100644 --- a/src/locales/langs/en-US.ts +++ b/src/locales/langs/en-US.ts @@ -223,5 +223,12 @@ export default { 'official_layer_control.index.tinJiaWaPian': 'Add Tile Layer Address', 'official_layer_control.index.kongGe': 'Input cannot be a space!', 'official_layer_control.index.shangchuan': 'Please upload pictures', - + 'text-layer-control_wenBenBiaoZhu': 'Text callout layer configuration', + 'text-layer-control_shiFouZhanShiTuCeng': 'Show layer', + 'text-layer-control_zhanShiZiDuan': 'Show Fields', + 'text-layer-control_buXuan': + 'If not selected, the element serial number will be displayed by default.', + 'text-layer-control_wenBenTuCengPeiZhi': 'Text Layer Configuration', + 'text-layer-control_description': + 'Open the text layer configuration, you can display the serial number of all the current data, you can also use the multi-select box to properties fields in the data to select different data for display.', }; diff --git a/src/locales/langs/zh-CN.ts b/src/locales/langs/zh-CN.ts index be8f79b..ef8a774 100644 --- a/src/locales/langs/zh-CN.ts +++ b/src/locales/langs/zh-CN.ts @@ -173,7 +173,7 @@ export default { 'map_control_group.sam.zhiNengXuanZe': '地块智能识别', 'map_control_group.sam.ziDongShiBie': '地块识别区域边界', 'map_control_group.sam.zhiNengShiBieGuanBi': '地块智能识别功能已关闭', - 'map_control_group.sam.diKuaiShiBieShiBei':'地块智能识别模型加载失败', + 'map_control_group.sam.diKuaiShiBieShiBei': '地块智能识别模型加载失败', 'map_contorl_group.draw.draw': '单击开始绘制', 'map_contorl_group.draw.drawContinue': '单击继续绘制', 'map_contorl_group.draw.drawFinish': '单击继续绘制,双击结束绘制', @@ -191,4 +191,10 @@ export default { 'official_layer_control.index.tinJiaWaPian': '添加瓦片图层地址', 'official_layer_control.index.kongGe': '输入不能为空格!', 'official_layer_control.index.shangchuan': '请上传图片', + 'text-layer-control_wenBenBiaoZhu': '文本标注图层配置', + 'text-layer-control_shiFouZhanShiTuCeng': '是否展示图层', + 'text-layer-control_zhanShiZiDuan': '展示字段', + 'text-layer-control_buXuan': '不选则默认展示元素序号', + 'text-layer-control_wenBenTuCengPeiZhi':'文本图层配置', + 'text-layer-control_description':'开启文本图层配置,可以显示当前所有数据的序号,也可以通过多选框在数据中properties字段去选择不同的数据来进行展示' }; diff --git a/src/types/l7editor.ts b/src/types/l7editor.ts index 9c4ab1c..dc24ed9 100644 --- a/src/types/l7editor.ts +++ b/src/types/l7editor.ts @@ -19,6 +19,7 @@ export interface MapControlProps { fullscreenControl?: boolean; administrativeSelectControl?: boolean; mapAdministrativeControl?: boolean; + textLayerControl?: boolean; } export interface ToolbarProps { From 0602f6d388dc0ee795e47ebe5b90469239642849 Mon Sep 17 00:00:00 2001 From: yanxiong Date: Fri, 15 Dec 2023 16:05:05 +0800 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=9B=BE=E5=B1=82=E9=85=8D=E7=BD=AE=E6=8E=A7=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/index.md | 3 +- package.json | 2 +- src/components/app-header/btn/setting-btn.tsx | 25 +----- src/components/layer-list/index.tsx | 4 +- src/components/map-control-group/index.tsx | 4 +- .../official-layer-control/styles.ts | 2 +- .../text-layer-control/index.tsx | 73 ++++++++++++++++ src/components/text-layer/index.tsx | 86 +++++++++++++------ src/constants/iconfont.js | 2 +- src/constants/index.ts | 10 +-- src/pages/components/editor.tsx | 4 +- src/pages/index.tsx | 4 + src/recoil/atomState.ts | 17 ++-- src/recoil/global.ts | 14 ++- src/types/l7editor.ts | 10 ++- src/utils/feature.ts | 15 ++++ src/utils/index.ts | 1 + 17 files changed, 200 insertions(+), 76 deletions(-) create mode 100644 src/components/map-control-group/text-layer-control/index.tsx create mode 100644 src/utils/feature.ts diff --git a/docs/docs/index.md b/docs/docs/index.md index f42f55a..7c1da0c 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -37,7 +37,8 @@ title: API | mapControl | 控件显隐 | [MapControlProps](#mapcontrolprops) | `-` | | toolbar | 头部组件显隐 | [ToolbarProps](#toolbarprops) | `-` | | tabItems | 侧面版标签页选项卡内容 | [TabItemType](https://ant-design.antgroup.com/components/tabs-cn#tabitemtype) | `-` | -| showIndex | 是否展示元素序号 | `boolean` | `false` | +| showTextLayer | 是否展示元素文本 | `boolean` | `false` | +| textLayerFields | 展示元素文本的字段,不选则展示元素序号 | `string[] | undefined` | `undefined` | | wasmPath | sam 组件的 wasm 路径 | `string` | `\` | #### `tabItems` diff --git a/package.json b/package.json index 6669d0d..4ad586a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7-editor", - "version": "1.1.8", + "version": "1.1.9", "description": "Geographic data editing tool based on L7", "files": [ "lib", diff --git a/src/components/app-header/btn/setting-btn.tsx b/src/components/app-header/btn/setting-btn.tsx index 1567ae5..d7ba737 100644 --- a/src/components/app-header/btn/setting-btn.tsx +++ b/src/components/app-header/btn/setting-btn.tsx @@ -6,14 +6,8 @@ import { useGlobal } from '../../../recoil'; export const SettingBtn = () => { const [isModalOpen, setIsModalOpen] = useState(false); - const { - popupTrigger, - setPopupTrigger, - autoFitBounds, - setAutoFitBounds, - showIndex, - setShowIndex - } = useGlobal(); + const { popupTrigger, setPopupTrigger, autoFitBounds, setAutoFitBounds } = + useGlobal(); const { t } = useTranslation(); const [form] = Form.useForm(); @@ -55,14 +49,12 @@ export const SettingBtn = () => { initialValues={{ popupTrigger, autoFitBounds, - showIndex, }} style={{ textAlign: 'right' }} onFinish={(e) => { setIsModalOpen(false); setPopupTrigger(e.popupTrigger); setAutoFitBounds(e.autoFitBounds); - setShowIndex(e.showIndex) }} > { > - - - - {t('btn.setting_btn.kaiQi')} - - - {t('btn.setting_btn.guanBi')} - - - diff --git a/src/components/layer-list/index.tsx b/src/components/layer-list/index.tsx index d3a17cd..9c55bbe 100644 --- a/src/components/layer-list/index.tsx +++ b/src/components/layer-list/index.tsx @@ -15,11 +15,12 @@ import { FeatureKey, LayerId, LayerZIndex } from '../../constants'; import { useFilterFeatures } from '../../hooks'; import { useFeature, useGlobal } from '../../recoil'; import { getPointImage } from '../../utils/change-image-color'; +import { EditorTextLayer } from '../text-layer'; export const LayerList: React.FC = () => { const scene = useScene(); const [isMounted, setIsMounted] = useState(false); - const { layerColor, coordConvert, baseMap } = useGlobal(); + const { layerColor, coordConvert, baseMap, showTextLayer } = useGlobal(); const { transformCoord } = useFeature(); const { features: newFeatures } = useFilterFeatures(); const [features, setFeatures] = useState([]); @@ -111,6 +112,7 @@ export const LayerList: React.FC = () => { state={{ active: { color: activeColor } }} zIndex={LayerZIndex} /> + {showTextLayer && } ) : null; }; diff --git a/src/components/map-control-group/index.tsx b/src/components/map-control-group/index.tsx index f4abd5b..b54659d 100644 --- a/src/components/map-control-group/index.tsx +++ b/src/components/map-control-group/index.tsx @@ -22,6 +22,7 @@ import MapThemeControl from './map-theme-control'; import { OfficialLayerControl } from './official-layer-control'; import { SamControl } from './sam-control'; import useStyles from './styles'; +import { TextLayerControl } from './text-layer-control'; type MapControlGroupProps = { mapControl?: MapControlProps; @@ -70,7 +71,7 @@ export const MapControlGroup: React.FC = ({ {isControlGroupState.drawControl && } {isControlGroupState.clearControl && } {isControlGroupState.zoomControl && ( - + )} {isControlGroupState.mapAdministrativeControl && ( @@ -96,6 +97,7 @@ export const MapControlGroup: React.FC = ({ /> )} {layerType.includes(OfficeLayerEnum.GoogleSatellite) && } + ); }; diff --git a/src/components/map-control-group/official-layer-control/styles.ts b/src/components/map-control-group/official-layer-control/styles.ts index 5286b8f..2c77d74 100644 --- a/src/components/map-control-group/official-layer-control/styles.ts +++ b/src/components/map-control-group/official-layer-control/styles.ts @@ -26,7 +26,7 @@ const useStyle = () => { `, hideOfficeLayerBtn: css` height: 127px; - width: 20px; + width: 28px; display: flex; align-items: center; justify-content: center; diff --git a/src/components/map-control-group/text-layer-control/index.tsx b/src/components/map-control-group/text-layer-control/index.tsx new file mode 100644 index 0000000..80afc55 --- /dev/null +++ b/src/components/map-control-group/text-layer-control/index.tsx @@ -0,0 +1,73 @@ +import { CustomControl } from '@antv/larkmap'; +import { Form, Popover, Select, Switch, Tooltip } from 'antd'; +import React, { useState } from 'react'; +import { useFeature, useGlobal } from '../../../recoil'; +import { IconFont } from '../../iconfont'; +import useStyles from '../styles'; + +export type TextLayerControlProps = {}; + +export const TextLayerControl: React.FC = () => { + const styles = useStyles(); + const { + showTextLayer, + setShowTextLayer, + textLayerFields, + setTextLayerFields, + } = useGlobal(); + const { features } = useFeature(); + const [fields, setFields] = useState([]); + + const refreshFields = () => { + const newFieldSet = new Set(); + features.forEach((feature) => { + const properties = feature.properties; + if (properties) { + Object.keys(properties).forEach((key) => { + newFieldSet.add(key); + }); + } + }); + setFields(Array.from(newFieldSet)); + }; + + return ( + + + + + + + + { return { label: item, value: item }; @@ -62,7 +66,10 @@ export const TextLayerControl: React.FC = () => { } }} > - + diff --git a/src/components/map-control-group/text-layer-control/style.ts b/src/components/map-control-group/text-layer-control/style.ts new file mode 100644 index 0000000..5c21cb4 --- /dev/null +++ b/src/components/map-control-group/text-layer-control/style.ts @@ -0,0 +1,12 @@ +import { css } from '@emotion/css'; + +const useStyle = () => { + return { + textLayerForm: css` + .ant-form-item { + margin-bottom: 12px !important; + } + `, + }; +}; +export default useStyle; diff --git a/src/locales/langs/en-US.ts b/src/locales/langs/en-US.ts index 9f2aeb9..848dcb6 100644 --- a/src/locales/langs/en-US.ts +++ b/src/locales/langs/en-US.ts @@ -223,5 +223,12 @@ export default { 'official_layer_control.index.tinJiaWaPian': 'Add Tile Layer Address', 'official_layer_control.index.kongGe': 'Input cannot be a space!', 'official_layer_control.index.shangchuan': 'Please upload pictures', - + 'text-layer-control_wenBenBiaoZhu': 'Text callout layer configuration', + 'text-layer-control_shiFouZhanShiTuCeng': 'Show layer', + 'text-layer-control_zhanShiZiDuan': 'Show Fields', + 'text-layer-control_buXuan': + 'If not selected, the element serial number will be displayed by default.', + 'text-layer-control_wenBenTuCengPeiZhi': 'Text Layer Configuration', + 'text-layer-control_description': + 'Open the text layer configuration, you can display the serial number of all the current data, you can also use the multi-select box to properties fields in the data to select different data for display.', }; diff --git a/src/locales/langs/zh-CN.ts b/src/locales/langs/zh-CN.ts index be8f79b..ef8a774 100644 --- a/src/locales/langs/zh-CN.ts +++ b/src/locales/langs/zh-CN.ts @@ -173,7 +173,7 @@ export default { 'map_control_group.sam.zhiNengXuanZe': '地块智能识别', 'map_control_group.sam.ziDongShiBie': '地块识别区域边界', 'map_control_group.sam.zhiNengShiBieGuanBi': '地块智能识别功能已关闭', - 'map_control_group.sam.diKuaiShiBieShiBei':'地块智能识别模型加载失败', + 'map_control_group.sam.diKuaiShiBieShiBei': '地块智能识别模型加载失败', 'map_contorl_group.draw.draw': '单击开始绘制', 'map_contorl_group.draw.drawContinue': '单击继续绘制', 'map_contorl_group.draw.drawFinish': '单击继续绘制,双击结束绘制', @@ -191,4 +191,10 @@ export default { 'official_layer_control.index.tinJiaWaPian': '添加瓦片图层地址', 'official_layer_control.index.kongGe': '输入不能为空格!', 'official_layer_control.index.shangchuan': '请上传图片', + 'text-layer-control_wenBenBiaoZhu': '文本标注图层配置', + 'text-layer-control_shiFouZhanShiTuCeng': '是否展示图层', + 'text-layer-control_zhanShiZiDuan': '展示字段', + 'text-layer-control_buXuan': '不选则默认展示元素序号', + 'text-layer-control_wenBenTuCengPeiZhi':'文本图层配置', + 'text-layer-control_description':'开启文本图层配置,可以显示当前所有数据的序号,也可以通过多选框在数据中properties字段去选择不同的数据来进行展示' }; diff --git a/src/types/l7editor.ts b/src/types/l7editor.ts index 9c4ab1c..dc24ed9 100644 --- a/src/types/l7editor.ts +++ b/src/types/l7editor.ts @@ -19,6 +19,7 @@ export interface MapControlProps { fullscreenControl?: boolean; administrativeSelectControl?: boolean; mapAdministrativeControl?: boolean; + textLayerControl?: boolean; } export interface ToolbarProps {