I am trying to represent LineString GeoJSON as vector tile layer using Leaflet.VectorGrid.
But i need to do some interactive by clicking on vector tile layer. but this vector tile layer has came with only properties, and did't came with geometry. So that i need to access coordinates to show elevation profile on chart.
var tileLayer = L.vectorGrid.slicer(geojson, {
rendererFactory: L.canvas.tile,
vectorTileLayerStyles: {
sliced: {
color: "red",
weight: 3,
opacity: 0
}
},
maxZoom: 22,
indexMaxZoom: 5, // max zoom in the initial tile index
interactive: true,
getFeatureId: function(feature) {
return feature.properties["id"]
}
}).addTo(map);