Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@marfle/react-leaflet-nmscale

Marfle1.1kMIT3.0.1TypeScript support: included

Nautical mile scale for react-leaflet

react-leaflet, react-leaflet-v3, react-leaflet-v4, react, leaflet, nautical, scale

readme

React-Leaflet-NmScale

npm (scoped)

React nautical mile scale component for React-Leaflet

screenshot_nmscale

Install

npm install @marfle/react-leaflet-nmscale

Usage

Import:

import { MapContainer, TileLayer } from 'react-leaflet';
import { NmScale } from '@marfle/react-leaflet-nmscale';

Use:

<MapContainer center={[0, 0]} zoom={10}>
  <TileLayer url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" />
  <TileLayer url="https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png" />
  <NmScale />
</MapContainer>

License

MIT See LICENSE file.

About us

Marfle makes software for workboat fleets