I just started using the react-leaflet library and got a map to load with a geoJSON layer, however I would like to use a TopoJSON layer instead.
I know that it is possible with pure Leaflet like this: https://gist.github.com/rclark/5779673/.
But how would I go about doing this with React-Leaflet?
Edit
class MapViz extends React.Component {
getStyle() {...};
render() {
const position = [x,y];
var geoData = topojson.feature(test_topo,test_topo.objects).geometries;
return (
<Map id="my-map" center={position} zoom={10.2}>
<TileLayer ... />
<GeoJSON data={geoData} style={this.getStyle} />
</Map>
)
}
}