mirror of https://gitee.com/antv-l7/antv-l7
docs: 更新文档
This commit is contained in:
parent
37b6f0dc7a
commit
67dfdb8084
|
@ -596,6 +596,7 @@ layer.on('inited', (option) => {});
|
|||
### boxSelect
|
||||
|
||||
参数 option
|
||||
|
||||
- box [x1: number, y1: number, x2: number, y2: number] 相较于
|
||||
- cb (...args: any[]) => void 传入的回调方法,返回框选内部的 feature
|
||||
|
||||
|
|
|
@ -86,10 +86,8 @@ export default class Amap2demo_text extends React.Component {
|
|||
// textAllowOverlap: true,
|
||||
});
|
||||
scene.addLayer(pointLayer);
|
||||
|
||||
});
|
||||
|
||||
|
||||
fetch(
|
||||
'https://gw.alipayobjects.com/os/rmsportal/oVTMqfzuuRFKiDwhPSFL.json',
|
||||
)
|
||||
|
|
|
@ -15,7 +15,6 @@ export default class Amap2demo_textSelect extends React.Component {
|
|||
let fontPath =
|
||||
'//at.alicdn.com/t/font_2534097_99x8u6zpili.woff2?t=1621842922496';
|
||||
|
||||
|
||||
const scene = new Scene({
|
||||
id: 'map',
|
||||
map: new GaodeMap({
|
||||
|
@ -43,7 +42,7 @@ export default class Amap2demo_textSelect extends React.Component {
|
|||
)
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
console.log(data.list[0])
|
||||
console.log(data.list[0]);
|
||||
const pointLayer = new PointLayer({})
|
||||
.source(data.list, {
|
||||
parser: {
|
||||
|
@ -70,11 +69,10 @@ export default class Amap2demo_textSelect extends React.Component {
|
|||
});
|
||||
scene.addLayer(pointLayer);
|
||||
pointLayer.boxSelect([0, 0, 155, 278], (f) => {
|
||||
console.log('======')
|
||||
console.log(f)
|
||||
})
|
||||
console.log('======');
|
||||
console.log(f);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
fetch(
|
||||
'https://gw.alipayobjects.com/os/rmsportal/oVTMqfzuuRFKiDwhPSFL.json',
|
||||
|
|
Loading…
Reference in New Issue