Skip to content

Commit

Permalink
fix: 修复设置窗口元素符号不回填问题和点击确定白屏问题 (#33)
Browse files Browse the repository at this point in the history
Co-authored-by: syb01094648 <[email protected]>
  • Loading branch information
websybin and syb01094648 authored Nov 28, 2023
1 parent d135176 commit b5fe9fa
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions src/components/map-control-group/official-layer-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,30 @@ export function OfficialLayerControl() {
form.submit();
};

const BASE_LAYER_GROUP = [
{
type: OfficeLayerEnum.VectorMap,
title: t('official_layer_control.index.shiLiangDiTu'),
image:
'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*qdFDSbvIalgAAAAAAAAAAAAADmJ7AQ/original',
layers: [],
},
{
type: OfficeLayerEnum.GoogleSatellite,
title: t('official_layer_control.index.guGeWeiXingTu'),
image:
'https://mdn.alipayobjects.com/huamei_k6sfo0/afts/img/A*zi2jSqqZ2-8AAAAAAAAAAAAADjWqAQ/original',
layers: [GOOGLE_TILE_MAP_URL, GOOGLE_TILE_MAP_ROUTER_URL],
},
];

const officeLayerGroup = useMemo(() => {
return [
{
type: OfficeLayerEnum.VectorMap,
title: t('official_layer_control.index.shiLiangDiTu'),
image:
'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*qdFDSbvIalgAAAAAAAAAAAAADmJ7AQ/original',
layers: [],
},
{
type: OfficeLayerEnum.GoogleSatellite,
title: t('official_layer_control.index.guGeWeiXingTu'),
image:
'https://mdn.alipayobjects.com/huamei_k6sfo0/afts/img/A*zi2jSqqZ2-8AAAAAAAAAAAAADjWqAQ/original',
layers: [GOOGLE_TILE_MAP_URL, GOOGLE_TILE_MAP_ROUTER_URL],
},
...customTiles,
];
}, [t, customTiles]);
if (customTiles.length) {
return [...BASE_LAYER_GROUP, ...customTiles];
}
return BASE_LAYER_GROUP;
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [customTiles, t]);

const handleBeforeUpload = (file: Blob) => {
const reader = new FileReader();
Expand Down

0 comments on commit b5fe9fa

Please sign in to comment.