docs: 更新文档

This commit is contained in:
thinkinggis 2021-05-31 20:59:19 +08:00
parent 37b6f0dc7a
commit 67dfdb8084
3 changed files with 5 additions and 8 deletions

View File

@ -596,6 +596,7 @@ layer.on('inited', (option) => {});
### boxSelect
参数 option
- box [x1: number, y1: number, x2: number, y2: number] 相较于
- cb (...args: any[]) => void 传入的回调方法,返回框选内部的 feature

View File

@ -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',
)

View File

@ -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,12 +69,11 @@ 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',
)