L7
L7 copied to clipboard
Mapbox底图绘制”线路围墙“高度设置无效
-
L7 Version: 2.13.9
-
Platform: windows 11
-
Mini Showcase(like screenshots):
-
CodePen Link: 无
Mapbox底图绘制”线路围墙“出错,围墙的高度无法设置,永远是无限大。
将官网示例换成Mapbox底图即可复现:
import { Scene, LineLayer } from '@antv/l7';
import { Mapbox } from '@antv/l7-maps';
const scene = new Scene({
id: 'map',
map: new Mapbox({
center: [ 121.461531, 31.096775 ],
zoom: 8.64,
rotation: 358.78,
pitch: 45.42056074766357,
style: 'https://thope.tianhengyun.com/api/styles/v1/admin/ZPUdKizRzR'
})
});
scene.addImage(
'02',
'https://gw.alipayobjects.com/zos/bmw-prod/ce83fc30-701f-415b-9750-4b146f4b3dd6.svg'
);
scene.on('loaded', () => {
fetch(
'https://gw.alipayobjects.com/os/bmw-prod/0290a972-eedd-42f6-b69e-50a35e8a0824.json'
)
.then(res => res.json())
.then(data => {
const layer = new LineLayer({})
.source(data.slice(0, 50), {
parser: {
type: 'json',
coordinates: 'coordinates'
}
})
.animate({
interval: 1, // 间隔
duration: 1, // 持续时间,延时
trailLength: 2 // 流线长度
})
.size(20)
.shape('wall')
.texture('02')
.style({
opacity: 'testOpacity',
lineTexture: true, // 开启线的贴图功能
iconStep: 40, // 设置贴图纹理的间距
iconStepCount: 4,
sourceColor: '#00BCD2',
targetColor: '#0074d0'
});
scene.addLayer(layer);
});
});
值调整一下就好了,或者设置一下 heightfixed
这是一个明显的bug,size设置成0.01的实际意义是什么呢,一个一个试吗?而且也只能在当前级别有效,缩放后还是会出现问题。
发生了同样的问题,求解决
发生了同样的问题,求解决
size 是宽度,你具体需要的是什么效果,可以附个 在线demo
发生了同样的问题,求解决
size 是宽度,你具体需要的是什么效果,可以附个 在线demo
面图层的这个也有问题,并不只是线路围墙有。我觉得出现这个问题的图数量还挺多的,建议统一一下
mapbox效果:
高德地图:(这个透明度的问题可以忽略,我看你们已经在修复中了)
Hello @wanyanyan. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!
你好 @wanyanyan,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到 master 分支,务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。
应该是高度单位没有统计,这边跟进一下,有兴趣的同学可以 PR
在使用mapbox地图,添加LineLayer图层时,在部分层级下坐标会发生偏移。可以看到在缩放时,黄色的LineLayer和红色的mapbox line图层有个很明显的偏移
https://github.com/antvis/L7/assets/59105862/d85afdd6-29d5-4819-ae01-ecc58cdb7835
在使用mapbox地图,添加LineLayer图层时,在部分层级下坐标会发生偏移。可以看到在缩放时,黄色的LineLayer和红色的mapbox line图层有个很明显的偏移
L7bug.mp4
应该是缩放等级 到了12 等级切换是出现的