style: code style change

This commit is contained in:
2912401452 2021-06-01 11:02:15 +08:00
parent e17977b8e0
commit 75a0a90ced
5 changed files with 10 additions and 12 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

@ -17,7 +17,8 @@ export default class Amap2demo extends React.Component {
center: [121.107846, 30.267069],
pitch: 0,
style: 'normal',
zoom: 13,
zoom: 20
,
animateEnable: false,
}),
});
@ -27,7 +28,7 @@ export default class Amap2demo extends React.Component {
lat: 30.267069,
},
{
lng: 121.1,
lng: 121.107,
lat: 30.267069,
},
{

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

View File

@ -18,7 +18,7 @@ export default class GaodeMapComponent extends React.Component {
center: [121.107846, 30.267069],
pitch: 0,
style: 'normal',
zoom: 13,
zoom: 20,
animateEnable: false,
}),
});
@ -31,7 +31,7 @@ export default class GaodeMapComponent extends React.Component {
lat: 30.267069,
},
{
lng: 121.1,
lng: 121.107,
lat: 30.267069,
},
{