水军大提督 发表于 2024-5-18 02:38:22

OpenLayers9.1.0版本正式发布,OpenLayers9.1.0值得升级吗?9.1.0版相比9.0

Vue+OpenLayers中文教程推荐,不同于OpenLayers官方文档使用html+js原生原生教程,博主专栏包含大量vue整合案例和实际开辟案例,非常适合地图开辟小白快速入门。
OpenLayers6教程

[*]vue整合OpenLayers6入门教程: 《Vue+OpenLayers6入门教程》
[*]vue整合OpenLayers6实战中文教程,包含大量OpenLayers官方文档没有涉及到的实际开辟案例: 《Vue+OpenLayers6实战进阶专栏目录》
OpenLayers7教程
3. Vue+OpenLayers7入门到实战教程
https://img-blog.csdnimg.cn/5e642603aecd43d7b594bb8ae685bf79.png#pic_center
媒介

OpenLayers9.1.0版本正式发布,最近两年OpenLayers更新频率很高 ,最近OpenLayers大版本迭代很快,但是险些没有什么重大的功能更新。
比如这次的OpenLayers9.1.0险些都是修修补补,没有功能更改和升级。
OpenLayers9相较于OpenLayers8更新了哪些内容

OpenLayers9.0.0版本相比OpenLayers8也就新增了一个Google
地图源和一些WebGL样式扩展,并删除原有的flushDeclutterItems()方法,其他也没有什么实质性的重大更新。
总而言之,没有须要升级,除非有特别需要,可以继续使用之前OpenLayers版本。
OpenLayers9两个版本更新内容

下面是OpenLayers9.1.0版本和OpenLayers9.0.0版本的发布的更新内容
OpenLayers9.1.0版本更新内容

The 9.1 release fixes a few rendering regressions introduced in v9.0.
It introduces bulk feature removal in Vector sources, addresses
attribution consistency, includes new style operators, and adds the
Alidade Satellite style to the Stamen source. Moreover, it ensures
compliance with Google's terms of use for attribution handling of the
Google source.
翻译:
9.1 版本修复了 v9.0 中引入的一些渲染回归。它在矢量源中引入了批量特性删除,解决了归因同等性问题,包罗新的样式运算符,并将 Alidade Satellite 样式添加到 Stamen 源中。此外,它还确保遵守 Google 关于 Google 泉源归因处理惩罚的使用条款。
OpenLayers9.0.0版本更新内容

The 9.0 release adds several new features, including a Google Maps
source (finally!), improved WebGL line rendering, and a new symbol and
text decluttering implementation. We also improved and broadened flat
styles support for both WebGL and Canvas 2D renderers. For better
developer experience, we made more types generic and fixed some issues
with types.
Backwards incompatible changes

[*]Improved render order of decluttered
items Decluttered items in Vector and VectorTile layers now maintain
the render order of the layers and within a layer. They do not get
lifted to a higher place in the stack any more.
For most use cases, this is the desired behavior. If, however, you've
been relying on the previous behavior, you now have to create separate
layers above the layer stack, with just the styles for the declutter
items.

[*]Removal of Map#flushDeclutterItems()
It is no longer necessary to call this function to put layers above decluttered symbols and text,
because decluttering no longer lifts elements above the layer stack.
To upgrade, simply remove the code where you use the
flushDeclutterItems() method.

[*]Changes in ol/style
[*]
[*]Removed the ol/style/RegularShape's radius1
property. Use radius for regular polygons or radius and radius2 for
stars.

[*]
[*]Removed the shape-radius1 property from
ol/style/flat~FlatShape. Use shape-radius instead.

[*]GeometryCollection constructor
ol/geom/GeometryCollection can no longer be created
without providing a Geometry array. Empty arrays are still valid.
[*]ol/interaction/Draw
The finishDrawing() method now returns the drawn
feature or null if no drawing could be finished. Previously it
returned undefined.
翻译
9.0 版本增加了一些新功能,包罗 Google 地图源(终于!)、改进的 WebGL 线渲染以及新的符号和文本整理实现。我们还改进并扩展了对 WebGL 和 Canvas 2D 渲染器的平面样式支持。为了获得更好的开辟职员体验,我们使更多类型通用,并修复了类型的一些问题。
向后不兼容的更改

[*]改进了整理项的渲染顺序
Vector 和 VectorTile 图层中的整理项目现在保持图层和图层内的渲染顺序。它们不再被提拔到堆栈中的更高位置。
对于大多数用例,这是所需的行为。但是,如果您不停依赖从前的行为,则现在必须在图层堆栈上方创建单独的图层,并且仅使用整理项的样式。
[*]删除 Map#flushDeclutterItems()
不再需要调用此函数来将图层放在整理的符号和文本上方,因为整理不再将元素提拔到图层堆栈上方。
如果要升级到新版本,只需删除使用 flushDeclutterItems() 方法的代码。
[*]ol/style的厘革
[*]
[*]删除了 ol/style/RegularShape 的 radius1 属性。对正多边形使用半径,对星星使用半径和半径2。

[*]
[*]从 ol/style/flat~FlatShape 中删除了 shape-radius1 属性。请改用 shape-radius。

[*]GeometryCollection 构造函数
如果不提供 GeometryCollection,则无法再创建 ol/geom/GeometryCollection。空数组仍然有用。
[*]ol/interaction/Draw
finishDrawing()方法现在返回绘制的特性,如果无法完成绘制,则返回null。从前,它返回 undefined。
end
Vue+OpenLayers中文教程推荐,不同于OpenLayers官方文档使用html+js原生原生教程,博主专栏包含大量vue整合案例和实际开辟案例,非常适合地图开辟小白快速入门。
OpenLayers6教程

[*]vue整合OpenLayers6入门教程: 《Vue+OpenLayers6入门教程》
[*]vue整合OpenLayers6实战中文教程,包含大量OpenLayers官方文档没有涉及到的实际开辟案例: 《Vue+OpenLayers6实战进阶专栏目录》
OpenLayers7教程
3. Vue+OpenLayers7入门到实战教程
https://img-blog.csdnimg.cn/5e642603aecd43d7b594bb8ae685bf79.png#pic_center

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: OpenLayers9.1.0版本正式发布,OpenLayers9.1.0值得升级吗?9.1.0版相比9.0