I use React-Leaflet and want to show only country one country .
I got geoJSON of country and gave style to it but other countries keep showing.
How may I hide or delete other countries ?
function style(feature) {
return {
fillColor: "grey",
weight: 2,
opacity: 1,
color: "black", //Outline color
fillOpacity: 1
}; }
//
<MapContainer
center={position}
style={{ height: 650 }}
zoom={window.innerWidth <= 720 ? 5 : 6}
doubleClickZoom={false}
dragging={window.innerWidth <= 720 ? true : false}
tap={false}
scrollWheelZoom={false}
zoomControl={false}
>
<TileLayer
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
<GeoJSON data={geo} style={style} />