NOTICE
该版本会是最后一个支持canvas 2d架构maptalks核心库的maptalks-gl版本,从下一个版本开始,会升级为纯webgl渲染方式。
Breaking Changes
- 因为analysis的开发会较多的依赖第三方库,很难控制发布js大小,所以从maptalks-gl移除,改为单独引用
- msd-json-loader从maptalks-gl中移除
- css文件名由
maptalks.css改为maptalks-gl.css
新特性
- webgl沙盒库fusion.gl的源代码加入工程
- Geo3DTilesLayer的service上增加cullFace设置,设为false可以关闭背面剔除,默认为true
- VectorTileLayer options中增加altitudePropertyName支持,用以在geoserver等第三方服务中,实现对矢量瓦片三维坐标的支持, maptalks/issues#804
- VectorTileLayerRenderer增加loadTileArrayBuffer方法的支持,用于实现自定义加载矢量瓦片,by @deyihu, fuzhenn/gl-layers#30
const vtLayer = new maptalks.VectorTileLayer("vt", {
// debug: true,
urlTemplate: "https://tile.maptalks.com/test/planet-single/{z}/{x}/{y}.mvt",
});
vtLayer.on('renderercreate', function (e) {
//load tile image
// img(Image): an Image object
// url(String): the url of the tile
e.renderer.loadTileArrayBuffer = function (url, tile, callback, options) {
console.log(options.command);
fetch(url).
then(res => {
if (res.ok) {
return res.arrayBuffer();
} else {
callback(new Error(res.statusText))
}
})
.then(arrayBuffer => {
callback(null,arrayBuffer);
}).catch(error => {
callback(error);
})
};
});
Bug Fixes
- 解决3dtiles在某个视角会变模糊的问题, maptalks/issues#789
- 增加对gltf khr_technique_webgl 扩展的支持,解决某些3dtiles无法正常渲染纹理的问题,maptalks/issues#802
- 解决GLTFMarker的zoomTo方法的bug, maptalks/issues#788, maptalks/issues#794, maptalks/issues#799, by @liubgithub
- 解决若干maptalks-gl的打包问题
- vector-packer改为往worker inject,以减少maptalks-gl的打包大小
- 解决transform-control中maptalks版本错误,解决maptalks-gl中对maptalks的重复打包
- gltf-loader改为全局注入方式,解决maptalks-gl中对gltf-loader的重复打包
NOTICE
This will be the last version of maptalks-gl to support the maptalks core library for the canvas 2d architecture, and will be upgraded to pure webgl rendering from the next release.
Breaking Changes
- Because analysis development relies more on third-party libraries, it is difficult to control the size of the released js, so it is removed from maptalks-gl and referenced separately.
- msd-json-loader removed from maptalks-gl.
- css file name changed from maptalks.css to maptalks-gl.css.
New features
- Source code for webgl sandbox library fusion.gl added to project.
- Add altitudePropertyName support to VectorTileLayer options to enable support for vector tile 3D coordinates in third-party services like geoserver, maptalks/issues#804.
- Add loadTileArrayBuffer method support to VectorTileLayerRenderer for custom loading of vector tiles, by @deyihu, fuzhenn/gl-layers#30
const vtLayer = new maptalks.VectorTileLayer("vt", {
// debug: true,
urlTemplate: "https://tile.maptalks.com/test/planet-single/{z}/{x}/{y}.mvt",
});
vtLayer.on('renderercreate', function (e) {
//load tile image
// img(Image): an Image object
// url(String): the url of the tile
e.renderer.loadTileArrayBuffer = function (url, tile, callback, options) {
console.log(options.command);
fetch(url).
then(res => {
if (res.ok) {
return res.arrayBuffer();
} else {
callback(new Error(res.statusText))
}
})
.then(arrayBuffer => {
callback(null,arrayBuffer);
}).catch(error => {
callback(error);
})
};
});
Bug Fixes
- Solve the problem that 3dtiles will be blurred in certain viewpoints, maptalks/issues#789
- Add support for the gltf khr_technique_webgl extension to solve the problem that some 3dtiles can't render textures properly, maptalks/issues#802
- Resolve a bug in the zoomTo method of GLTFMarker, maptalks/issues#788, maptalks/issues#794, maptalks/issues#799, by @liubgithub
- Fixed several maptalks-gl packaging issues.
- vector-packer changed to inject into worker to reduce maptalks-gl packing size
- Solve the maptalks version error in transform-control, and solve the duplicate packing of maptalks in maptalks-gl.
- gltf-loader changed to global injector to solve the duplicate packaging of gltf-loader in maptalks-gl.