V0.31.0 Released
不兼容修改
- PointLayer/LineStringLayer/PolygonLayer/ExtrudePolygonLayer,调用identify返回的结果由原有的 [Geometry] 改为 [{ geometry: Geometry, coordinate, data, point}],这同样也会影响map.identify方法的回调参数(来源于layer.identify)
新功能
Geo3DTilesLayer
- 3dtiles图层增加了对glb或gltf格式瓦片的支持, maptalks/issues#425
- Geo3DTilesLayer的service上pointSize和pointOpacity增加对function-type支持,支持根据zoom设置不同的点云大小和透明度,maptalks/issues#546
GLTFLayer
- GLTFMarker增加对gltf中每个node单独设置是否动画,maptalks/issues#512, symbol上增加了属性:
animationNodes: [0, 1, 2],用来指定启用动画的节点(node),值是数组,数组中每个值是节点的序号 - GLTFMarker增加绕指定坐标旋转的api,
gltfMarker.rotateAround(coord, degree), maptalks/issues#495 - GLTFMarker增加读取GLTF json的方法,可用于获取gltf中的node和相应属性值,
gltfMarker.getGLTFJSON(),maptalks/issues#491 - GLTFMarker增加highlight指定GLTF nodes的方法,
gltfMarker.highlightNodes([{ nodeIndex: 0, color, opacity }]),maptalks/issues#491 - GLTFMarker的cancelHighlight支持传入nodes 序号数组,取消指定node的highlight,maptalks/issues#491
- GLTFMarker增加outline指定GLTF nodes的方法,
gltfMarker.outlineNodes([0, 1, 2]),maptalks/issues#491 - GLTFMarker的cancelOuline支持传入nodes 序号数组,取消指定node的outline,maptalks/issues#491
VectorTileLayer和点线面图层
- vt图层的fill插件和PolygonLayer的symbol增加了新的属性:
polygonPatternFileOrigin(经纬度),polygonPatternFileWidth和polygonPatternFileHeight(单位米),用于指定填充图片左上角起始坐标和图片的长度和宽度 - vt图层的fill渲染插件和Polygon的symbol中增加了新的属性,
uvOffsetInMeter,用于指定symbol.uvOffset的单位是否是米 - vt图层的lit插件和ExtrudePolygonLayer的material中增加了新的属性,
textureOrigin和textureWidth,用于指定纹理图片左上角的坐标(经纬度)和纹理图片的宽度(单位为米) - 点线面图层的identify结果中增加coordinate, maptalks/issues#540
- PolygonLayer的symbol增加polygonPatternUV属性,用于手动为每个端点设置uv坐标,uv坐标为多边形端点(包括空洞)展平后的对应数组,其形式为
polygonPatternUV: [u0, v0, u1, v1, ...., uN, vN](实验性特性)
其他
- weather中增加了 snowIntesity,用于控制雪量,默认为0.5, maptalks/issues#531
- 地形增加了对水淹分析的支持,maptalks/issues#477
Bug修改
- 通过可视范围剔除,优化了Mask的性能
- 解决transformControl事件中,target对象不正确的问题, maptalks/issues#533
- 解决因为采样精度不够,ColorMask边缘锯齿严重的问题, maptalks/issues#504
- 解决点云数据转换精度不够时,数据会出现偏移的问题,maptalks/issues#547
- 解决vt,3dtiles,gltf图层的http请求header中referrer不正确的问题,maptalks/issues#554
- 解决地形瓦片级别大于maxAvailableZoom时,没有正常resample得到正确高程值的问题, maptalks/issues#525
- 解决地形临时资源没有正确清理,导致图层发生变化时的报错, maptalks/issues#555
- 升级tinyqueue的版本,解决某些版本webpack的打包问题
- 解决后处理打开后,因为polygonOffset不正确造成polygon描边的模糊问题, maptalks/issues#536
- 解决marker只设置了文字,无法正常碰撞检测的问题, maptalks/issues#532
- 解决数据量较大时,点线面图层无法正常identify的问题, maptalks/issues#541
- 解决没有正确设置PolygonOffset,导致ExtrudePolygonLayer顶面和PointLayer高度没有对齐的问题, maptalks/issues#544
- 文字和图标渲染中增加alphaTest,解决highlight和bloom时,文字和图标发光区域是矩形的问题, maptalks/issues#550
Breaking Changes
- PointLayer/LineStringLayer/PolygonLayer/ExtrudePolygonLayer, the call to identify returns [Geometry] instead of [geometry]. point}], which also affects the callback parameters of the map.identify method (from layer.identify)
What's New
Geo3DTilesLayer
- 3dtiles layer adds support for tiles in glb or gltf format, maptalks/issues#425
- Geo3DTilesLayer's pointSize and pointOpacity on service add support for function-type, support for setting different point cloud size and transparency based on zoom, maptalks/issues#546
GLTFLayer
- GLTFMarker adds support for setting whether or not to animate each node in the gltf individually, maptalks/issues#512, added attribute to symbol:
animationNodes: [0, 1, 2]to specify nodes with animation enabled, the values are arrays and each value in the array is the node's serial number - GLTFMarker add api to rotate around specified coordinates,
gltfMarker.rotateAround(coord, degree), maptalks/issues#495 - GLTFMarker add method to read GLTF json,
gltfMarker.getGLTFJSON(), maptalks/issues#491 - GLTFMarker adds method to highlight specified GLTF nodes,
gltfMarker.highlightNodes([{ nodeIndex: 0, color, opacity }]),maptalks/issues#491 - GLTFMarker's cancelHighlight supports passing an array of nodes' serial numbers to cancel the highlight of a given node, maptalks/issues#491.
- GLTFMarker add method to outline specified GLTF nodes,
gltfMarker.outlineNodes([0, 1, 2]),maptalks/issues#491 - GLTFMarker's cancelOuline supports passing in an array of nodes, canceling the outline of the specified node,maptalks/issues#491
VectorTileLayer and PointLineLayer
polygonPatternFileHeight``` (in meters), which specify the coordinates of the top-left corner start of the fill image and the length and width of the image
- New properties,
uvOffsetInMeter, have been added to the fill rendering plugin for vt layers and to Polygon's symbol to specify whether symbol.uvOffset is in meters or not. - New properties,
textureOriginand ``textureWidth```, have been added to the lit plugin of the vt layer and the material of the ExtrudePolygonLayer to specify the coordinates of the upper left corner of the texture image (latitude and longitude) and the width of the texture image in meters - Add coordinate to the identify result of the PointLineSurface layer, maptalks/issues#540
- PolygonLayer's symbol adds polygonPatternUV attribute for manually setting uv coordinates for each endpoint, which is the corresponding array of polygon endpoints (including voids) after spreading, in the form of
polygonPatternUV: [u0, v0, u1, v1, .... , uN, vN](experimental characterization)
Other
- snowIntesity added to weather for controlling snow amount, defaults to 0.5, maptalks/issues#531
- terrain added support for flooding analysis, maptalks/issues#477
Bug fixes
- Optimized performance of Mask by visual range culling
- Resolve issue with incorrect target object in transformControl event, maptalks/issues#533
- Solve the problem of ColorMask edge jaggedness due to insufficient sampling precision, maptalks/issues#504
- Solve the problem that point cloud data will be offset when the conversion accuracy is not enough, maptalks/issues#547
- Solve the problem that the referrer in the header of http request for vt, 3dtiles, and gltf layers is not correct, maptalks/issues#554
- Resolve issue where terrain tile level is greater than maxAvailableZoom and does not resample properly to get the correct elevation value, maptalks/issues#525
- Fix an error when terrain temporary resources are not cleaned up correctly, resulting in layer changes, maptalks/issues#555
- Upgrade the version of tinyqueue to fix a packaging problem with some versions of webpack.
- Solve the problem of blurring polygon stroke when post-processing is opened due to incorrect polygonOffset. maptalks/issues#536
- Solve the problem of collision detection when marker is only set to text, maptalks/issues#532
- Solve the problem that the point, line, and surface layers can not be identified properly when there is a large amount of data. maptalks/issues#541
- Solve the problem that ExtrudePolygonLayer top surface and PointLayer height are not aligned when PolygonOffset is not set correctly, maptalks/issues#544
- Add alphaTest to text and icon rendering to solve the problem that text and icon glow area is rectangle when highlight and bloom, maptalks/issues#550