react-leaflet-control
A React-Leaflet component that renders React elements in leaflet's control pane.
installation
npm install react-leaflet-control
Options
position
: Which pane to mount to. Options are topleft
, topright
, bottomleft
, bottomright
Usage
;;; { thisstate = center: 513 07 } { <Map center=thisstatecenter zoom=10 > <ZoomControl position="topright" /> <TileLayer url='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' attribution='© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>' maxZoom=18 /> <Control position="topleft" > <button onClick= this > Reset View </button> </Control> </Map> }