1.0.35 • Published 6 months ago

leaflet-vector-offline v1.0.35

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Leaflet Vector Offline

Vector tile rendering for Leaflet with support for offline use.

npm

About

Based on propmaps-leaflet and leaflet.offline, this packge gives the ability to render vector tiles on a Leaflet.js map from online and offline sources.

Features

  • Render vector tile maps with Leaflet integration.
  • Supports reading Z/X/Y tile URLs or PMTiles format.
  • Ability to download all tiles within view port at selected zoom levels and store them in the cache.
  • Ability to choose to use on online, cache, or both tile sources.

Dependencies

How to use

To install Leaflet Vector Offline with npm, use the following command:

npm install leaflet-vector-offline

or with yarn:

yarn add leaflet-vector-offline

To use Leaflet Vector Offline, use the following code:

const map: Map = L.map("map");
const url: string = "https://<YourUrlGoesHere>/{z}/{x}/{y}.mvt";
const attribution: string: "";
const vectorLayer: VectorOfflineLayer = vectorOfflineLayer(url, {
  attribution,
  subdomains: "abc",
  minZoom: minZoom,
  maxZoom: maxZoom,
  theme: "light",
});
vectorLayer.addTo(map);

See

1.0.35

6 months ago

1.0.34

6 months ago

1.2.0

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

1.0.33

1 year ago

1.0.32

1 year ago

1.0.31

1 year ago

1.0.30

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago