fix: 使用L.svg渲染器避免preferCanvas冲突
Leaflet map使用preferCanvas:true时,所有polyline经canvas渲染, dashOffset动画可能不生效。为流量层显式指定L.svg()渲染器。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2598,7 +2598,8 @@ function toggleTrafficPanel() {
|
||||
function _ensureFlowLayer() {
|
||||
if (!SA.map) return null;
|
||||
if (!_trafficFlowLayer) {
|
||||
_trafficFlowLayer = L.layerGroup().addTo(SA.map);
|
||||
const svgRenderer = L.svg({padding: 0.5});
|
||||
_trafficFlowLayer = L.layerGroup([], {renderer: svgRenderer}).addTo(SA.map);
|
||||
}
|
||||
return _trafficFlowLayer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user