Skip to content

Commit

Permalink
update docs to reflect ES6 named imports. (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdon authored Feb 2, 2024
1 parent 2f81959 commit 53a1926
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit 53a1926

Please sign in to comment.