From c875cba6eeefe9b32fc077e77ad08f8e85f1af48 Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Fri, 26 Feb 2021 11:05:04 +0800 Subject: [PATCH] fix: eslint --- packages/maps/src/mapbox/map.ts | 4 +++- stories/Layers/components/offsetTest.tsx | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/maps/src/mapbox/map.ts b/packages/maps/src/mapbox/map.ts index a81ea87a10..46a545c35c 100644 --- a/packages/maps/src/mapbox/map.ts +++ b/packages/maps/src/mapbox/map.ts @@ -393,8 +393,10 @@ export default class MapboxService cameraHeight: 0, }); + const { offsetZoom = LNGLAT_OFFSET_ZOOM_THRESHOLD } = this.config; + // set coordinate system - if (this.viewport.getZoom() > LNGLAT_OFFSET_ZOOM_THRESHOLD) { + if (this.viewport.getZoom() > offsetZoom) { this.coordinateSystemService.setCoordinateSystem( CoordinateSystem.LNGLAT_OFFSET, ); diff --git a/stories/Layers/components/offsetTest.tsx b/stories/Layers/components/offsetTest.tsx index e5b478477a..c31ec2b736 100644 --- a/stories/Layers/components/offsetTest.tsx +++ b/stories/Layers/components/offsetTest.tsx @@ -20,7 +20,6 @@ export default class World extends React.Component { } public async componentDidMount() { - const scene = new Scene({ id: 'map', logoVisible: false, @@ -45,16 +44,16 @@ export default class World extends React.Component { layer .source(data.geo_data) - .color( '#CF1D49') + .color('#CF1D49') .shape('line') .size(1) .select(true) .style({ opacity: 0.8, }); - layer2 + layer2 .source(data.geo_data) - .color( '#CF1') + .color('#CF1') .shape('fill') .select(true) .style({