@marfle/react-leaflet-nmscale

Nautical mile scale for react-leaflet

Usage no npm install needed!

<script type="module">
  import marfleReactLeafletNmscale from 'https://cdn.skypack.dev/@marfle/react-leaflet-nmscale';
</script>

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 { Map, TileLayer } from 'react-leaflet';
import { NmScale } from '@marfle/react-leaflet-nmscale';

Use:

<Map 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 />
</Map>

License

MIT See LICENSE file.

About us

Marfle makes software for workboat fleets