|
|
|
@ -38,11 +38,12 @@ const IconWithTip = ({
|
|
|
|
|
|
|
|
|
|
type OverlayToolProps = { |
|
|
|
|
type: OverlayTypes; |
|
|
|
|
hotkey: string; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const OverlayTool = (props: OverlayToolProps) => { |
|
|
|
|
const { type } = props; |
|
|
|
|
const text = OverlayNamePrefixs[type]; |
|
|
|
|
const { type, hotkey } = props; |
|
|
|
|
const text = `创建${OverlayNamePrefixs[type]}(${hotkey})`; |
|
|
|
|
|
|
|
|
|
const overlayType = useSelector(overlayTypeSelector); |
|
|
|
|
const status = useSelector(statusSelector); |
|
|
|
@ -57,18 +58,18 @@ const Tools = () => {
|
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
|
<div className="marker-tools"> |
|
|
|
|
<OverlayTool type={OverlayTypes.Rectangle} /> |
|
|
|
|
<OverlayTool type={OverlayTypes.Polygon} /> |
|
|
|
|
<OverlayTool type={OverlayTypes.Polyline} /> |
|
|
|
|
<OverlayTool type={OverlayTypes.Circle} /> |
|
|
|
|
<OverlayTool type={OverlayTypes.Rectangle} hotkey="Alt+1" /> |
|
|
|
|
<OverlayTool type={OverlayTypes.Polygon} hotkey="Alt+2" /> |
|
|
|
|
<OverlayTool type={OverlayTypes.Polyline} hotkey="Alt+3" /> |
|
|
|
|
<OverlayTool type={OverlayTypes.Circle} hotkey="Alt+4" /> |
|
|
|
|
</div> |
|
|
|
|
<div className="common-tools"> |
|
|
|
|
<div className="tools-group"> |
|
|
|
|
<IconWithTip type="search" text="搜索定位" placement="right" /> |
|
|
|
|
</div> |
|
|
|
|
<div className="tools-group"> |
|
|
|
|
{/* <div className="tools-group"> |
|
|
|
|
<IconWithTip type="select" text="选择" placement="right" /> |
|
|
|
|
</div> |
|
|
|
|
</div> */} |
|
|
|
|
</div> |
|
|
|
|
</> |
|
|
|
|
); |
|
|
|
|