📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

leaflet-rotate-map

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

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
Source
npm
Version published
Maintainers
1
Created
Source

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 });

Keywords

leaflet

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