-
Notifications
You must be signed in to change notification settings - Fork 35
🤔 [QUESTION] 绘制enable时,如果点击点不是Map,而是map上的其他元素如 Marker,如何阻止呢? #188
Copy link
Copy link
Open
Description
🐛 Question description [Please make everyone to understand it]
绘制已经enable时,如果点击点不是Map,而是map上的其他元素如 Marker,如何阻止呢?
import type { LarkMapProps } from '@antv/larkmap';
import { LarkMap, Marker } from '@antv/larkmap';
import { message } from 'antd';
import React from 'react';
const larkmapOptions: LarkMapProps = {
mapType: 'Gaode',
mapOptions: { center: [120.210792, 30.246026], zoom: 10 },
};
export default () => (
<LarkMap {...larkmapOptions} style={{ height: '300px' }}>
<Marker
lngLat={{ lng: 120.210792, lat: 30.246026 }}
anchor="center"
onClick={(event) => {
// event.target.stopPropagation() 无作用
message.success('Marker clicked!')
}}
>
<div style={{ padding: 8, backgroundColor: 'pink' }}>杭州</div>
</Marker>
</LarkMap>
);💻 Link to minimal reproduction
Please provide a link by forking these links L7 Draw or GitHub repo. What is a minimal reproduction, and why is it required?
🏞 Expected result
🚑 Any additional [like screenshots]
- L7Draw Version:
- Platform:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels