Conversation
- 修复 layer_ctr: setMaxZoom 示例代码错误,补充 getMinZoom/getMaxZoom/destroy 方法 - 修复 mask_method: enableMask 示例代码错误 - 修复 mouse_event: 补充 mouseenter 事件,去除重复 dblclick - 补充 layer_encode: 新增 rotate() 和 label() 方法文档 - 补充 common/map.zh: 新增 bearing/pitch/interactive 等 13 个地图配置项 - 补充 source.en: 新增 map/filter transforms、getClusters、updateClusterData 等方法 - 补充 marker.zh/en: 完善所有方法文档,添加参数签名和示例 - 完善 pointlayer.zh: 修复 new 关键字缺失,嵌入所有子文档 - 完善 linelayer.zh: 嵌入所有子文档(含 texture) - 完善 polygonlayer.zh: 嵌入所有子文档 - 完善 heatmap.zh: 补充 shape 类型表格,嵌入所有子文档 - 完善 heatmap/shape.zh: 补充各聚合形状详细说明 - 完善 imagelayer.zh: 嵌入所有子文档 - 完善 raster.zh: 重写简介,嵌入三种栅格模式子文档 - site/.dumirc.ts: 新增 /api -> /api/scene 路由重定向
|
There was a problem hiding this comment.
Code Review
This pull request significantly improves the L7 library documentation by adding a comprehensive API reference file and updating existing module documentation for Scene, Source, Map, Layers, and Components. The changes include fixing typos, adding missing method and event descriptions, and improving consistency between Chinese and English versions. Review feedback correctly identifies minor issues in the new reference document, such as duplicate property entries, typos, and missing mode options for the RasterLayer.
| | `getLayers` | `(): ILayer[]` | 获取所有图层 | | ||
| | `getLayer` | `(id: string): ILayer \| undefined` | 根据 id 获取图层 | | ||
| | `getLayerByName` | `(name: string): ILayer \| undefined` | 根据名称获取图层 | | ||
| | `getPickedLayer` | `(): any` | 获取拾取的图层 | |
| | **Raster** | `'raster'` | `number[] \| IRasterFileData \| IRasterFileData[]` | `{ type: 'raster', extent?: [number,number,number,number], coordinates?: [...], width: number, height: number, min?: number, max?: number, format?: IRasterFormat, operation?: IBandsOperation }` | | ||
| | **RasterTile** | `'rasterTile'` | `string \| string[] \| ITileBand[]` | `{ type: 'rasterTile', dataType?: RasterTileType, extent?: [...], zoomOffset?: number, minZoom?: number, maxZoom?: number, tileSize?: number, format?: IRasterFormat, operation?: IBandsOperation }` | | ||
| | **MVT** | `'mvt'` | Vector Tile URL | `{ type: 'mvt', extent?: [...], zoomOffset?: number, minZoom?: number, maxZoom?: number, tileSize?: number, sourceLayer?: string }` | | ||
| | **GeoJSONVT** | `'geojsonvt'` | GeoJSON FeatureCollection | `{ type: 'geojsonvt', extent?: [...], zoomOffset?: number, minZoom?: number, maxZoom?: number, tileSize?: number, maxZoom?: number, indexMaxZoom?: number, indexMaxPoints?: number, tolerance?: number, buffer?: number }` | |
|
|
||
| **type**: `'PointLayer'` | ||
| **默认数据解析**: `{ type: 'json', x: 'lng', y: 'lat' }` | ||
| **shape**: `'circle'` | `'square'` | `'triangle'` | `'pentagon'` | `'hexagon'` | `'octagon'` | `'diamond'` | `'hexagon'` | `'image'` | `'text'` | `'cylinder'` | ... |
| | `borderWidth` | `number` | 线边框宽度 | | ||
| | `borderColor` | `string` | 线边框颜色 | | ||
| | `strokeWidth` | `number` | 描边宽度 | | ||
| | `storke` | `string` | 描边颜色 | |
|
|
||
| **type**: `'RasterLayer'` | ||
|
|
||
| 根据 parser 类型自动选择模型: `'raster'` / `'rasterRgb'` / `'rasterTerrainRgb'` |
[English Template / 英文模板]
🤔 这个变动的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
📝 更新日志
☑️ 请求合并前的自查清单