mirror of https://gitee.com/antv-l7/antv-l7
test: fix map schema
This commit is contained in:
parent
2b28380151
commit
4a7447a2fa
|
@ -24,15 +24,15 @@ L7 在内部解决了不同底图地图直接的差异,同时 L7 层面统一
|
|||
⚠️ 使用地图申请地图 token,L7 内部设置了默认 token,仅供测试使用
|
||||
|
||||
#### 高德地图实例化
|
||||
高德地图API配置参数
|
||||
|
||||
高德地图 API 配置参数
|
||||
|
||||
- token
|
||||
注册高德 [API token](https://lbs.amap.com/api/javascript-api/guide/abc/prepare)
|
||||
注册高德 [API token](https://lbs.amap.com/api/javascript-api/guide/abc/prepare)
|
||||
|
||||
- plugin {array} ```['AMap.ElasticMarker','AMap.CircleEditor'] ```
|
||||
- plugin {array} `['AMap.ElasticMarker','AMap.CircleEditor']`
|
||||
|
||||
加载[高德地图插件](https://lbs.amap.com/api/javascript-api/guide/abc/plugins)
|
||||
|
||||
加载[高德地图插件](https://lbs.amap.com/api/javascript-api/guide/abc/plugins)
|
||||
|
||||
```javascript
|
||||
const L7AMap = new GaodeMap({
|
||||
|
@ -41,7 +41,7 @@ const L7AMap = new GaodeMap({
|
|||
center: [104.288144, 31.239692],
|
||||
zoom: 4.4,
|
||||
token: 'xxxx - token',
|
||||
plugin:[] // 可以不设置
|
||||
plugin: [], // 可以不设置
|
||||
});
|
||||
```
|
||||
|
||||
|
|
|
@ -24,15 +24,15 @@ L7 在内部解决了不同底图地图直接的差异,同时 L7 层面统一
|
|||
⚠️ 使用地图申请地图 token,L7 内部设置了默认 token,仅供测试使用
|
||||
|
||||
#### 高德地图实例化
|
||||
高德地图API配置参数
|
||||
|
||||
高德地图 API 配置参数
|
||||
|
||||
- token
|
||||
注册高德 [API token](https://lbs.amap.com/api/javascript-api/guide/abc/prepare)
|
||||
注册高德 [API token](https://lbs.amap.com/api/javascript-api/guide/abc/prepare)
|
||||
|
||||
- plugin {array} ```['AMap.ElasticMarker','AMap.CircleEditor'] ```
|
||||
- plugin {array} `['AMap.ElasticMarker','AMap.CircleEditor']`
|
||||
|
||||
加载[高德地图插件](https://lbs.amap.com/api/javascript-api/guide/abc/plugins)
|
||||
|
||||
加载[高德地图插件](https://lbs.amap.com/api/javascript-api/guide/abc/plugins)
|
||||
|
||||
```javascript
|
||||
const L7AMap = new GaodeMap({
|
||||
|
@ -41,7 +41,7 @@ const L7AMap = new GaodeMap({
|
|||
center: [104.288144, 31.239692],
|
||||
zoom: 4.4,
|
||||
token: 'xxxx - token',
|
||||
plugin:[] // 可以不设置
|
||||
plugin: [], // 可以不设置
|
||||
});
|
||||
```
|
||||
|
||||
|
|
|
@ -40,12 +40,12 @@ describe('ConfigService', () => {
|
|||
const { valid, errorText } = configService.validateMapConfig({
|
||||
zoom: 100,
|
||||
minZoom: 100,
|
||||
maxZoom: -1,
|
||||
maxZoom: -2,
|
||||
});
|
||||
expect(valid).toBeFalsy();
|
||||
expect(errorText).toMatch('zoom should be <= 20');
|
||||
expect(errorText).toMatch('minZoom should be <= 20');
|
||||
expect(errorText).toMatch('maxZoom should be >= 0');
|
||||
expect(errorText).toMatch('zoom should be <= 24');
|
||||
expect(errorText).toMatch('minZoom should be <= 24');
|
||||
expect(errorText).toMatch('maxZoom should be >= -1');
|
||||
|
||||
expect(
|
||||
configService.validateMapConfig({
|
||||
|
|
|
@ -11,6 +11,7 @@ import {
|
|||
ILayer,
|
||||
ILayerConfig,
|
||||
ILayerModel,
|
||||
ILayerService,
|
||||
IMapService,
|
||||
IModel,
|
||||
IModelUniform,
|
||||
|
@ -20,7 +21,6 @@ import {
|
|||
lazyInject,
|
||||
Triangulation,
|
||||
TYPES,
|
||||
ILayerService,
|
||||
} from '@antv/l7-core';
|
||||
import { BlendTypes } from '../utils/blend';
|
||||
export default class BaseModel<ChildLayerStyleOptions = {}>
|
||||
|
|
Loading…
Reference in New Issue