🚀 Socket Launch Week 🚀 Day 5: Introducing Socket Fix.Learn More

leaflet-rotate-map

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-rotate-map

Enable to rotate Leaflet map

0.3.1
latest
Version published
Weekly downloads
133
-30%
Maintainers
1
Weekly downloads
 
Created

Rotate Leaflet Map

Enable to rotate Leaflet maps. The code is based on a merger between lastest official leaflet version and leaflet rotate branch. In addition, there are some improvements like:

  • Fix popup
  • Add getCircumscribedBounds
  • Fix Draggable
  • Fix map.setView
  • Fix _onDragStart when map has maxBounds and map is rotated

Demo

Look at index.html file in examples folder

Usage

Setup

  • Add script to html. You can use leaflet-src.js in ./dist folder.
<script src="leaflet-src.js"></script>
  • You can also use npm install leaflet-rotate-map or yarn add leaflet-rotate-map.

L.map(id, options)

To instantiate a L.Map with rotation, add rotate option

const map = L.map('map', { rotate: true });

FAQs

Package last updated on 23 Oct 2023

Did you know?

Socket

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.

Install

Related posts