2.1.1 • Published 3 years ago

leaflet-webatlastile v2.1.1

Weekly downloads
174
License
BSD-2-Clause
Repository
github
Last release
3 years ago

L.TileLayer.Webatlas

Leaflet plugin to use Webatlas tilecache with correct attribution and API keys. Requires only vanilla Leaflet.

Usage

  1. Install the package

    npm i leaflet-webatlastile

  2. Import what you need:

    import {webatlasTileLayer} from 'leaflet-webatlastile';

  3. Instantiate a new layer the same way a L.TileLayer from Leaflet is instantiated, just remember the API token:

    webatlasTileLayer({apiKey: 'my-api-key'}).addTo(map);

To specify another layer:

webatlasTileLayer({apiKey: 'my-api-key', mapType: WebatlasTileLayerTypes.GREY}).addTo(map);

See demo/index.ts for example use.

Obtaining an API Token

See <developer.norkart.no> for obtaining a trial token.

Options

  • mapType: one of WebatlasTileLayerTypes (Default: WebatlasTileLayerTypes.VECTOR)
  • apiKey: a Webatlas API Token
  • attributionPosition: Position of the attribution text. Possible values are 'topleft', 'topright', 'bottomleft' or 'bottomright'. Default: 'bottomright'.

Development

  1. Install dependencies: npm install
  2. Run npm run start to start a dev server, and edit files in the /demo folder
  3. Run tests with npm test
2.1.1

3 years ago

2.1.0

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.0

4 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.1.0

8 years ago

0.0.8

8 years ago