Skip to content

Commit

Permalink
added more toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
Majid committed Mar 17, 2024
1 parent 040bcf0 commit 21d81f0
Show file tree
Hide file tree
Showing 23 changed files with 404 additions and 144 deletions.
Binary file modified .DS_Store
Binary file not shown.
223 changes: 175 additions & 48 deletions docs-src/docs/api/classes/PmTilesSource.md

Large diffs are not rendered by default.

50 changes: 49 additions & 1 deletion docs-src/docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,61 @@ map.on("load", () => {

## JSDeliver

Here you can use it in the webpages

```html

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mapbox-pmtiles@1/dist/mapbox-pmtiles.umd.min.js"></script>

<script>
const map = new mapboxgl.Map({
container: 'map', // container ID
center: [-74.5, 40], // starting position [lng, lat]
zoom: 9 ,// starting zoom,
accessToken:"pk.eyJ1IjoibWFqaWRob2phdGlyZWFkeSIsImEiOiJjbHJxbXZvZDEwMDJhMmtuMmx6NHEwYTV2In0.eLlTQdMMrimVg9NxacXFmg"
});
mapboxgl.Style.setSourceType(mapboxPmTiles.SOURCE_TYPE, mapboxPmTiles.PmTilesSource);
map.on("load", () => {
const PMTILES_URL =
"https://r2-public.protomaps.com/protomaps-sample-datasets/protomaps-basemap-opensource-20230408.pmtiles";
map.addSource("pmTileSourceName", {
type: mapboxPmTiles.SOURCE_TYPE, //Add this line
url: PMTILES_URL,
maxzoom: 10,
});
map.showTileBoundaries = true;
map.addLayer({
id: "places",
source: "pmTileSourceName",
"source-layer": "places",
type: "circle",
paint: {
"circle-color": "steelblue",
},
maxzoom: 14,
});
});
</script>

```

Or you can use the following

```html

<script type="module">
import mapboxPmtiles from 'https://cdn.jsdelivr.net/npm/mapbox-pmtiles/+esm'
import mapboxPmtiles from 'https://cdn.jsdelivr.net/npm/mapbox-pmtiles@1.0.29/+esm'
</script>

```

## Add a Vector TileSet

## Add a raster TileSet

## What is PmTiles
See the [PmTiles](https://docs.protomaps.com/pmtiles/) repository for more information
2 changes: 1 addition & 1 deletion docs-src/docs/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Renames and re-exports [PmTilesSource](classes/PmTilesSource.md)

#### Defined in

[index.ts:8](https://github.com/am2222/mapbox-pmtiles/blob/9bad176e/src/index.ts#L8)
[index.ts:8](https://github.com/am2222/mapbox-pmtiles/blob/bf8a5c84/src/index.ts#L8)
2 changes: 1 addition & 1 deletion docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.1.1">
<title data-rh="true">Page Not Found | Mapbox-PmTiles</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://am2222.github.io/mapbox-pmtiles/img/docusaurus-social-card.jpg"><meta data-rh="true" name="twitter:image" content="https://am2222.github.io/mapbox-pmtiles/img/docusaurus-social-card.jpg"><meta data-rh="true" property="og:url" content="https://am2222.github.io/mapbox-pmtiles/404.html"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="Page Not Found | Mapbox-PmTiles"><link data-rh="true" rel="icon" href="/mapbox-pmtiles/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://am2222.github.io/mapbox-pmtiles/404.html"><link data-rh="true" rel="alternate" href="https://am2222.github.io/mapbox-pmtiles/404.html" hreflang="en"><link data-rh="true" rel="alternate" href="https://am2222.github.io/mapbox-pmtiles/404.html" hreflang="x-default"><link rel="stylesheet" href="/mapbox-pmtiles/assets/css/styles.61df0958.css">
<script src="/mapbox-pmtiles/assets/js/runtime~main.3b4f9701.js" defer="defer"></script>
<script src="/mapbox-pmtiles/assets/js/runtime~main.1da4cc21.js" defer="defer"></script>
<script src="/mapbox-pmtiles/assets/js/main.4b2de2fb.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
1 change: 0 additions & 1 deletion docs/assets/js/3949462b.69aabe23.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/assets/js/3949462b.a510e3fa.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/assets/js/5e8c322a.77ef6e9e.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/assets/js/5e8c322a.9a210f04.js

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 21d81f0

Please sign in to comment.