From 27eb839128b227795b70cbd9b027938327742ca1 Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Tue, 13 Jul 2021 20:36:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=AB=98=E5=BE=B7=E5=9C=B0=E5=9B=BEv2?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/maps/src/amap2/map.ts | 3 ++- stories/Map/components/amap2demo_arcLineLinear.tsx | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/maps/src/amap2/map.ts b/packages/maps/src/amap2/map.ts index 6d170c1e52..c760f32f43 100644 --- a/packages/maps/src/amap2/map.ts +++ b/packages/maps/src/amap2/map.ts @@ -403,6 +403,7 @@ export default class AMapService token = AMAP_API_KEY, mapInstance, plugin = [], + version = AMAP_VERSION, ...rest } = this.config; // 高德地图创建独立的container; @@ -464,7 +465,7 @@ export default class AMapService plugin.push('Map3D'); AMapLoader.load({ key: token, // 申请好的Web端开发者Key,首次调用 load 时必填 - version: AMAP_VERSION, // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 + version, // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 plugins: plugin, // 需要使用的的插件列表,如比例尺'AMap.Scale'等 }) .then((AMap) => { diff --git a/stories/Map/components/amap2demo_arcLineLinear.tsx b/stories/Map/components/amap2demo_arcLineLinear.tsx index fef2b90fd7..15e68bc38f 100644 --- a/stories/Map/components/amap2demo_arcLineLinear.tsx +++ b/stories/Map/components/amap2demo_arcLineLinear.tsx @@ -1,5 +1,5 @@ import { LineLayer, Scene } from '@antv/l7'; -import { GaodeMap } from '@antv/l7-maps'; +import { GaodeMapV2 } from '@antv/l7-maps'; import * as React from 'react'; export default class Amap2demo_arcLineLinear extends React.Component { @@ -13,12 +13,13 @@ export default class Amap2demo_arcLineLinear extends React.Component { public async componentDidMount() { const scene = new Scene({ id: 'map', - map: new GaodeMap({ + map: new GaodeMapV2({ pitch: 40, center: [107.77791556935472, 35.443286920228644], zoom: 2.9142882493605033, viewMode: '3D', style: 'dark', + version: '2.0.4', }), }); this.scene = scene;