使用GeoJSONVectorTileLayer绘制道路面,使用threeLayer.toLine绘制线段,在完全俯视的情况下,线段和道路面重合的部分会看不见。
`const geo = new GeoJSONVectorTileLayer("geo", {
data: toWgs84(data)
});
geo.setStyle({
style: [
{
renderPlugin: {
dataConfig: {
type: "fill",
},
sceneConfig: null,
type: "fill",
},
symbol: {
polygonBloom: false,
polygonFill: "#999999",
polygonOpacity: 1,
polygonPatternFile: null,
},
}
]
});
const groupLayer = new GroupGLLayer("group", [geo]);
groupLayer.addTo(map);
const mesh = threeLayer.toLine(line, { interactive: false, altitude: 3, minZoom: 10, maxZoom: 20 }, material.clone());
threeLayer.addMesh(mesh);`