fix: amap plugins

This commit is contained in:
thinkinggis 2020-02-03 20:34:30 +08:00
parent 2106a3390c
commit a6db65b857
5 changed files with 14 additions and 12 deletions

View File

@ -67,10 +67,10 @@ layer: 图层对象
overlayers 示例 overlayers 示例
```javascript ```javascript
const layer = { const layer = {
图层一: layer1, 图层一: layer1,
图层二: layer2, 图层二: layer2,
} };
``` ```
```javascript ```javascript

View File

@ -40,9 +40,9 @@ const popup = new L7.Popup(option);
```javascript ```javascript
const lnglat = { const lnglat = {
lng: 112.323, lng: 112.323,
lat: 30.456, lat: 30.456,
} };
``` ```
```javascript ```javascript

View File

@ -40,9 +40,9 @@ const popup = new L7.Popup(option);
```javascript ```javascript
const lnglat = { const lnglat = {
lng: 112.323, lng: 112.323,
lat: 30.456, lat: 30.456,
} };
``` ```
```javascript ```javascript

View File

@ -6,6 +6,7 @@ new Scene({
style: 'light', style: 'light',
pitch: 0, pitch: 0,
center: [ 107.054293, 35.246265 ], center: [ 107.054293, 35.246265 ],
zoom: 4.056 zoom: 4.056,
plugin: [ 'AMap.ToolBar' ]
}) })
}); });

View File

@ -269,8 +269,9 @@ export default class AMapService
this.logger.warn(this.configService.getSceneWarninfo('MapToken')); this.logger.warn(this.configService.getSceneWarninfo('MapToken'));
} }
amapLoaded = true; amapLoaded = true;
plugin.push('Map3D');
this.loadAMapScript( this.loadAMapScript(
`https://webapi.amap.com/maps?v=${AMAP_VERSION}&key=${token}&plugin=Map3D,${plugin.join( `https://webapi.amap.com/maps?v=${AMAP_VERSION}&key=${token}&plugin=${plugin.join(
',', ',',
)}`, )}`,
).then(() => { ).then(() => {