
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
react-leaflet-magnifying-glass
Advanced tools
React wrapper of Leaflet.MagnifyingGlass. Add a 'magnifying glass' effect to a Leaflet map, able to display a portion of the map in a different zoom (and actually display different content).
React wrapper of Leaflet.MagnifyingGlass for react-leaflet.
This plugin allows you to add a "magnifying glass" effect to a Leaflet map, able to display a portion of the map in a different zoom (and actually display different content).
Tested with Leaflet 1.3.1 and React-Leaflet 1.8.0
npm install --save react-leaflet-magnifying-glass
import { Map, TileLayer } from 'react-leaflet';
import MagnifyingGlassControl from 'react-leaflet-magnifying-glass';
const options = {
position: 'topleft',
radius: 100,
zoomOffset: 3
};
<Map center={[2.935403, 101.448205]} zoom={10}>
<TileLayer
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
attribution='© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
/>
<MagnifyingGlassControl {...options} />
</Map>
Option | Type | Default | Description |
---|---|---|---|
position | string | topleft | Magnifier control position. One of (topleft ,topright ,bottomleft ,bottomright ). |
radius | Integer | 100 | The radius of the magnifying glass, in pixels. |
zoomOffset | Integer | 3 | The zoom level offset between the main map zoom and the magnifying glass. |
fixedZoom | Integer | -1 | If different than -1 , defines a fixed zoom level to always use in the magnifying glass, ignoring the main map zoom and the zoomOffet value. |
Leaflet.markercluster
layerCredits goes to bbecquet and all the contributors for the original work.
MIT License
FAQs
React wrapper of Leaflet.MagnifyingGlass. Add a 'magnifying glass' effect to a Leaflet map, able to display a portion of the map in a different zoom (and actually display different content).
The npm package react-leaflet-magnifying-glass receives a total of 2 weekly downloads. As such, react-leaflet-magnifying-glass popularity was classified as not popular.
We found that react-leaflet-magnifying-glass demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.