Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs to reflect ES6 named imports. #23

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pmtiles/leaflet.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ The base distribution of Leaflet only supports raster images for tiled data sour
Add a raster PMTiles archive using the `pmtiles` library:

```js
import * as pmtiles from 'pmtiles';
const p = new pmtiles.PMTiles('https://example.com/data.pmtiles');
pmtiles.leafletRasterLayer(p).addTo(map)
import { PMTiles, leafletRasterLayer } from 'pmtiles';
const p = new PMTiles('https://example.com/data.pmtiles');
leafletRasterLayer(p).addTo(map)
````

## Vector: protomaps-leaflet
Expand Down
4 changes: 2 additions & 2 deletions pmtiles/maplibre.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ npm install pmtiles
```

```js
import * as pmtiles from "pmtiles";
import { Protocol } from "pmtiles";
```

```js
let protocol = new pmtiles.Protocol();
let protocol = new Protocol();
maplibregl.addProtocol("pmtiles",protocol.tile);
```

Expand Down
Loading