diff --git a/docs/api/map.en.md b/docs/api/map.en.md index 14c53e89bb..f749276df8 100644 --- a/docs/api/map.en.md +++ b/docs/api/map.en.md @@ -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: [], // 可以不设置 }); ``` diff --git a/docs/api/map.zh.md b/docs/api/map.zh.md index 14c53e89bb..f749276df8 100644 --- a/docs/api/map.zh.md +++ b/docs/api/map.zh.md @@ -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: [], // 可以不设置 }); ``` diff --git a/packages/core/src/services/config/__tests__/schema.spec.ts b/packages/core/src/services/config/__tests__/schema.spec.ts index 7e532b9a28..4e44415c10 100644 --- a/packages/core/src/services/config/__tests__/schema.spec.ts +++ b/packages/core/src/services/config/__tests__/schema.spec.ts @@ -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({ diff --git a/packages/layers/src/core/BaseModel.ts b/packages/layers/src/core/BaseModel.ts index 9fb5c099e2..f81c28e342 100644 --- a/packages/layers/src/core/BaseModel.ts +++ b/packages/layers/src/core/BaseModel.ts @@ -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