mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 19:01:08 +00:00
* ol-pmtiles 0.1.1; fix shape of reading tile data from getZxy [#225] * update ol raster example [#225]
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/ol@v7.3.0/dist/ol.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/ol@v7.3.0/dist/ol.js"></script>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v7.3.0/ol.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v7.3.0/ol.css">
|
||||||
<script src="https://unpkg.com/ol-pmtiles@0.1.0/dist/olpmtiles.js"></script>
|
<script src="https://unpkg.com/ol-pmtiles@0.1.1/dist/olpmtiles.js"></script>
|
||||||
<style>
|
<style>
|
||||||
body, #map {
|
body, #map {
|
||||||
height:100vh;
|
height:100vh;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/ol@v7.3.0/dist/ol.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/ol@v7.3.0/dist/ol.js"></script>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v7.3.0/ol.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v7.3.0/ol.css">
|
||||||
<script src="https://unpkg.com/ol-pmtiles@0.1.0/dist/olpmtiles.js"></script>
|
<script src="https://unpkg.com/ol-pmtiles@0.1.1/dist/olpmtiles.js"></script>
|
||||||
<style>
|
<style>
|
||||||
body, #map {
|
body, #map {
|
||||||
height:100vh;
|
height:100vh;
|
||||||
|
|||||||
20
openlayers/package-lock.json
generated
20
openlayers/package-lock.json
generated
@@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "ol-pmtiles",
|
"name": "ol-pmtiles",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ol-pmtiles",
|
"name": "ol-pmtiles",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pmtiles": "^2.7.0"
|
"pmtiles": "^2.10.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"esbuild": "^0.15.11"
|
"esbuild": "^0.15.11"
|
||||||
@@ -469,9 +469,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/fflate": {
|
"node_modules/fflate": {
|
||||||
"version": "0.7.4",
|
"version": "0.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.7.4.tgz",
|
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.0.tgz",
|
||||||
"integrity": "sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw=="
|
"integrity": "sha512-FAdS4qMuFjsJj6XHbBaZeXOgaypXp8iw/Tpyuq/w3XA41jjLHT8NPA+n7czH/DDhdncq0nAyDZmPeWXh2qmdIg=="
|
||||||
},
|
},
|
||||||
"node_modules/geotiff": {
|
"node_modules/geotiff": {
|
||||||
"version": "2.0.7",
|
"version": "2.0.7",
|
||||||
@@ -591,11 +591,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/pmtiles": {
|
"node_modules/pmtiles": {
|
||||||
"version": "2.7.2",
|
"version": "2.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/pmtiles/-/pmtiles-2.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/pmtiles/-/pmtiles-2.10.0.tgz",
|
||||||
"integrity": "sha512-YRdfLlvN5z94F5/e3cnEFE0TymKx6egi0vDx6NJF83rYGNLV6Lr2PsdpWkSo3oVl4e6LVj8RvaWLfpT874QH+Q==",
|
"integrity": "sha512-X+s6JyperpcAkKwv55MKx72ckOUB0ZjcfK4929iM0SS0MkLydEi2FSW1E8YTE1E2XaZ2TVk/MIUrbsZuXV7K2g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fflate": "^0.7.3"
|
"fflate": "^0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/protocol-buffers-schema": {
|
"node_modules/protocol-buffers-schema": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ol-pmtiles",
|
"name": "ol-pmtiles",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"description": "PMTiles sources for OpenLayers",
|
"description": "PMTiles sources for OpenLayers",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
"prettier-check": "prettier --check *.js"
|
"prettier-check": "prettier --check *.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pmtiles": "^2.7.0"
|
"pmtiles": "^2.10.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"esbuild": "^0.15.11"
|
"esbuild": "^0.15.11"
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export class PMTilesVectorSource extends VectorTile {
|
|||||||
if (tile_result) {
|
if (tile_result) {
|
||||||
const format = tile.getFormat();
|
const format = tile.getFormat();
|
||||||
tile.setFeatures(
|
tile.setFeatures(
|
||||||
format.readFeatures(tile_result.data.buffer, {
|
format.readFeatures(tile_result.data, {
|
||||||
extent: extent,
|
extent: extent,
|
||||||
featureProjection: projection,
|
featureProjection: projection,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export class PMTilesVectorSource extends ol.source.VectorTile {
|
|||||||
if (tile_result) {
|
if (tile_result) {
|
||||||
const format = tile.getFormat();
|
const format = tile.getFormat();
|
||||||
tile.setFeatures(
|
tile.setFeatures(
|
||||||
format.readFeatures(tile_result.data.buffer, {
|
format.readFeatures(tile_result.data, {
|
||||||
extent: extent,
|
extent: extent,
|
||||||
featureProjection: projection,
|
featureProjection: projection,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user