From 67dfdb80841a9d9e8f67f477490f5ec73a426a25 Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Mon, 31 May 2021 20:59:19 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/layer/layer.zh.md | 1 + stories/Map/components/amap2demo_text.tsx | 2 -- stories/Map/components/amap2demo_textSelect.tsx | 10 ++++------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/docs/api/layer/layer.zh.md b/docs/api/layer/layer.zh.md index 489937443e..ca6ef950b1 100644 --- a/docs/api/layer/layer.zh.md +++ b/docs/api/layer/layer.zh.md @@ -596,6 +596,7 @@ layer.on('inited', (option) => {}); ### boxSelect 参数 option + - box [x1: number, y1: number, x2: number, y2: number] 相较于 - cb (...args: any[]) => void 传入的回调方法,返回框选内部的 feature diff --git a/stories/Map/components/amap2demo_text.tsx b/stories/Map/components/amap2demo_text.tsx index 7896a1122b..55ff5a2f3b 100644 --- a/stories/Map/components/amap2demo_text.tsx +++ b/stories/Map/components/amap2demo_text.tsx @@ -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', ) diff --git a/stories/Map/components/amap2demo_textSelect.tsx b/stories/Map/components/amap2demo_textSelect.tsx index 0211f38edc..b2fd8d6ff2 100644 --- a/stories/Map/components/amap2demo_textSelect.tsx +++ b/stories/Map/components/amap2demo_textSelect.tsx @@ -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',