npm install leaflet react-leaflet @types/leaflet import ‘leaflet/dist/leaflet.css’; import { MapContainer, TileLayer, GeoJSON } from ‘react-leaflet’;
<MapContainer center={[39.8283, -98.5795]} zoom={4} style={{ height: ‘400px’, width: ‘100%’ }} >
<GeoJSON data={stateGeoJSON} style={stateStyle} onEachFeature={onEachFeature} /> </MapContainer>
討論
由 SomeoneElse 於 2025年02月12日 01時50分 發表的評論
Perhaps this web page might help?