
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
react-leaflet-custom-control
Advanced tools
A React wrapper to create a custom control for react-leaflet using ReactDOM's Portal capabilities
The current version of this package supports React Leaflet v3
npm install --save react-leaflet-custom-control
import { MapContainer, TileLayer } from 'react-leaflet'
import Control from 'react-leaflet-custom-control'
import { Button } from '@mui/material'
import { Search as SearchIcon } from '@mui/icons-material'
import 'leaflet.css'
<MapContainer center={[35.77, -93.34]} zoom={5}>
<TileLayer
attribution="Esri, DigitalGlobe, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community"
className="basemap"
maxNativeZoom={19}
maxZoom={19}
subdomains={["clarity"]}
url="https://{s}.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"
/>
<Control position='topright'>
<Button color='inherit'>
<SearchIcon />
</Button>
</Control>
</MapContainer>
Name | Type | Default | Description |
---|---|---|---|
position | ControlOptions | required | The position of the control |
children? | any | undefined | Child element to the control |
FAQs
Creates a control wrapper around a React element
The npm package react-leaflet-custom-control receives a total of 6,340 weekly downloads. As such, react-leaflet-custom-control popularity was classified as popular.
We found that react-leaflet-custom-control demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.