
Product
Introducing Data Exports
Export Socket alert data to your own cloud storage in JSON, CSV, or Parquet, with flexible snapshot or incremental delivery.
leaflet-draw-rotate
Advanced tools
ALPHA leaflet plugin - adds rotate functionality to the Leaflet.Draw plugin by binding it with a custom version of the Leaflet.Path.Transform plugin.

// import peer dependencies
import 'leaflet';
import 'leaflet-draw';
// import bindings for the geomtries you want to rotate
import '/path/to/dist/Edit.Rectangle.Rotate.js';
// optional - configure transform options
L.Edit.Rectangle.prototype.setOptions({ uniformScaling: false });
// init leaflet-draw.. (see demo for detailed example)
Options should be applied via the edit handler's prototype setOptions function (see above example).
options.handlerOptions - <Path_options> - edge markers optionsoptions.boundsOptions - <Polyline_options> - bounding rectangle optionsoptions.rotateHandleOptions - <Polyline_options> - rotation handle line stylesoptions.handleLength - Number - Length of the rotation handle in pixels. Defaults to 20.options.rotation - Boolean - Enable/disable rotation. Default trueoptions.scaling - Boolean - Enable/disable scaling. Default trueoptions.uniformScaling - Boolean - Use uniform scaling (maintain aspect ratio). Default trueFollowing events are fired on the transformed layer
rotatestart, rotate, rotateend - { rotation: <Radians> }scalestart, scale, scaleend - { scale: <L.Point> }transformstart, transform, transformed - { rotation: ..., scale: ..., matrix: <L.Matrix> }npm install
npm run build
This plugin builds upon earlier work of @w8r (e.g. Leaflet.Path.Transform, Leaflet.Path.Drag), and also @kevinsamyn's work on non-skewing rectangle scaling/re-sizing.
CSIRO Open Source Software Licence Agreement (variation of the BSD / MIT License)
FAQs
Add rotate functionality to the Leaflet.Draw plugin
We found that leaflet-draw-rotate 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
Export Socket alert data to your own cloud storage in JSON, CSV, or Parquet, with flexible snapshot or incremental delivery.

Research
/Security News
Bitwarden CLI 2026.4.0 was compromised in the Checkmarx supply chain campaign after attackers abused a GitHub Action in Bitwarden’s CI/CD pipeline.

Research
/Security News
Docker and Socket have uncovered malicious Checkmarx KICS images and suspicious code extension releases in a broader supply chain compromise.