我现在可以看到如下所示的折线:
geojson = L.vectorGrid.slicer(lines, {
vectorTileLayerStyles: {
sliced: style},
maxZoom: 24, // max zoom to preserve detail on
interactive: true,
getFeatureId: function(f) {
return f.properties.id;
}
}).on('mouseover', mouseover_function).addTo(map);
searchCtrl.indexFeatures(lines.features, ['id']);
info.addTo(map);
这些行是所有多边形线的geoJSON文件。现在我将我的线分为3部分geoJSON并且
lines_1
lines_2
lines_3
所以我创建了三层以上三层
geojson1 = L.vectorGrid.slicer(lines1, {
vectorTileLayerStyles: {
sliced: style},
maxZoom: 24, // max zoom to preserve detail on
interactive: true,
getFeatureId: function(f) {
return f.properties.id;
}
}).on('mouseover', mouseover_function).addTo(map);
geojson2 = L.vectorGrid.slicer(lines2, {
vectorTileLayerStyles: {
sliced: style},
maxZoom: 24, // max zoom to preserve detail on
interactive: true,
getFeatureId: function(f) {
return f.properties.id;
}
})
geojson3 = L.vectorGrid.slicer(lines3, {
vectorTileLayerStyles: {
sliced: style},
maxZoom: 24, // max zoom to preserve detail on
interactive: true,
getFeatureId: function(f) {
return f.properties.id;
}
})
所以这是三层,我想在缩放等级20和缩放等级22的geojson3的所有放大级别和geojson3上显示geojson1。
如何在不同的缩放级别上显示这些图层。
感谢任何帮助。