We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
先创建一个实线的LineLayer 并添加到地图上,然后动态修改为虚线 import { Scene, LineLayer } from '@antv/l7'; import { GaodeMap } from '@antv/l7-maps';
const scene = new Scene({ id: 'map', map: new GaodeMap({ center: [ 116.3956, 39.9392 ], pitch: 20, zoom: 10, style: 'dark' }) }); scene.on('loaded', () => { fetch( 'https://gw.alipayobjects.com/os/basement_prod/0d2f0113-f48b-4db9-8adc-a3937243d5a3.json' ) .then(res => res.json()) .then(data => { const layer = new LineLayer({}) .source(data) .size(2) .shape('line') .color('标准名称', [ '#5B8FF9', '#5CCEA1', '#F6BD16' ]) .style({ borderWidth: 0.4, borderColor: '#fff' }); scene.addLayer(layer);
// 延时3秒改为虚线 setTimeout(() => { layer.style({ lineType: 'dash', dashArray: [5, 5] }) scene.render() }, 3000) });
}); 并不能生效
The text was updated successfully, but these errors were encountered:
今天会修复
Sorry, something went wrong.
No branches or pull requests
先创建一个实线的LineLayer 并添加到地图上,然后动态修改为虚线
import { Scene, LineLayer } from '@antv/l7';
import { GaodeMap } from '@antv/l7-maps';
const scene = new Scene({
id: 'map',
map: new GaodeMap({
center: [ 116.3956, 39.9392 ],
pitch: 20,
zoom: 10,
style: 'dark'
})
});
scene.on('loaded', () => {
fetch(
'https://gw.alipayobjects.com/os/basement_prod/0d2f0113-f48b-4db9-8adc-a3937243d5a3.json'
)
.then(res => res.json())
.then(data => {
const layer = new LineLayer({})
.source(data)
.size(2)
.shape('line')
.color('标准名称', [ '#5B8FF9', '#5CCEA1', '#F6BD16' ])
.style({
borderWidth: 0.4,
borderColor: '#fff'
});
scene.addLayer(layer);
});
并不能生效
The text was updated successfully, but these errors were encountered: