my-openlayer 2.5.3 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/MyOl.js +2 -0
- package/docs/MyOl.md +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.5.4] - 2026-05-18
|
|
4
|
+
|
|
5
|
+
### 🐛 Bug Fixes
|
|
6
|
+
|
|
7
|
+
- 修复生产环境下直接调用 `MyOl.createView()` 时,`EPSG:4326 -> EPSG:4490` 转换缺失的问题。
|
|
8
|
+
|
|
9
|
+
### 📝 Documentation
|
|
10
|
+
|
|
11
|
+
- 同步更新 `MyOl` 文档与 skill 说明,明确 `createView()` 会自动完成投影初始化。
|
|
12
|
+
|
|
3
13
|
## [2.4.12] - 2026-04-21
|
|
4
14
|
|
|
5
15
|
### Features
|
package/MyOl.js
CHANGED
|
@@ -183,6 +183,8 @@ class MyOl {
|
|
|
183
183
|
*/
|
|
184
184
|
static createView(options = MyOl.DefaultOptions) {
|
|
185
185
|
try {
|
|
186
|
+
/** *********************静态视图投影初始化*********************/
|
|
187
|
+
MyOl.initializeProjections(options);
|
|
186
188
|
const code = options.projection?.code ?? MyOl.PROJECTIONS.CGCS2000;
|
|
187
189
|
const projection = MyOl.resolveViewProjection(options, code);
|
|
188
190
|
const viewOptions = {
|
package/docs/MyOl.md
CHANGED
|
@@ -68,6 +68,8 @@ constructor(id: string | HTMLElement, options?: Partial<MapInitType>)
|
|
|
68
68
|
static createView(options: MapInitType): View
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
+
`createView()` 可以单独作为静态方法调用,内部会先完成 `EPSG:4326`、`EPSG:4490`、`EPSG:4549` 以及自定义 `projection.def` 的投影注册,避免生产构建下直接调用静态方法时缺少坐标转换。
|
|
72
|
+
|
|
71
73
|
| 参数名 | 类型 | 描述 |
|
|
72
74
|
| :--- | :--- | :--- |
|
|
73
75
|
| `options` | `MapInitType` | 地图配置选项,主要使用其中的 `center`, `zoom`, `projection` 等属性。 |
|