mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 02:41:09 +00:00
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/ol@v9.0.0/dist/ol.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/ol@v9.0.0/dist/ol.js"></script>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v9.0.0/ol.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v9.0.0/ol.css">
|
||||||
<script src="https://unpkg.com/ol-pmtiles@1.0.0/dist/olpmtiles.js"></script>
|
<script src="https://unpkg.com/ol-pmtiles@1.0.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@v9.0.0/dist/ol.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/ol@v9.0.0/dist/ol.js"></script>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v9.0.0/ol.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@v9.0.0/ol.css">
|
||||||
<script src="https://unpkg.com/ol-pmtiles@1.0.0/dist/olpmtiles.js"></script>
|
<script src="https://unpkg.com/ol-pmtiles@1.0.1/dist/olpmtiles.js"></script>
|
||||||
<style>
|
<style>
|
||||||
body, #map {
|
body, #map {
|
||||||
height:100vh;
|
height:100vh;
|
||||||
|
|||||||
4
openlayers/package-lock.json
generated
4
openlayers/package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ol-pmtiles",
|
"name": "ol-pmtiles",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ol-pmtiles",
|
"name": "ol-pmtiles",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pmtiles": "^3.0.7"
|
"pmtiles": "^3.0.7"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ol-pmtiles",
|
"name": "ol-pmtiles",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "PMTiles sources for OpenLayers",
|
"description": "PMTiles sources for OpenLayers",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/cjs/index.cjs",
|
"main": "dist/cjs/index.cjs",
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
import { type Data } from "ol/DataTile";
|
// see import style (.js) at https://openlayers.org/en/latest/examples/data-tiles.html
|
||||||
|
import { type Data } from "ol/DataTile.js";
|
||||||
import {
|
import {
|
||||||
type Options as DataTileSourceOptions,
|
type Options as DataTileSourceOptions,
|
||||||
default as DataTileSource,
|
default as DataTileSource,
|
||||||
} from "ol/source/DataTile";
|
} from "ol/source/DataTile.js";
|
||||||
import TileState from "ol/TileState";
|
import TileState from "ol/TileState.js";
|
||||||
import { MVT } from "ol/format";
|
import { MVT } from "ol/format.js";
|
||||||
import type TileSource from "ol/source/Tile";
|
import type TileSource from "ol/source/Tile.js";
|
||||||
import { type Extent } from "ol/extent";
|
import { type Extent } from "ol/extent.js";
|
||||||
import type Projection from "ol/proj/Projection";
|
import type Projection from "ol/proj/Projection.js";
|
||||||
import type Tile from "ol/Tile";
|
import type Tile from "ol/Tile.js";
|
||||||
import type VectorTile from "ol/VectorTile";
|
import type VectorTile from "ol/VectorTile.js";
|
||||||
import {
|
import {
|
||||||
type Options as VectorTileSourceOptions,
|
type Options as VectorTileSourceOptions,
|
||||||
default as VectorTileSource,
|
default as VectorTileSource,
|
||||||
} from "ol/source/VectorTile";
|
} from "ol/source/VectorTile.js";
|
||||||
import type RenderFeature from "ol/render/Feature";
|
import type RenderFeature from "ol/render/Feature.js";
|
||||||
import { createXYZ, extentFromProjection } from "ol/tilegrid";
|
import { createXYZ, extentFromProjection } from "ol/tilegrid.js";
|
||||||
import { PMTiles, Header, Source } from "pmtiles";
|
import { PMTiles, Header, Source } from "pmtiles";
|
||||||
|
|
||||||
export class PMTilesRasterSource extends DataTileSource {
|
export class PMTilesRasterSource extends DataTileSource {
|
||||||
|
|||||||
Reference in New Issue
Block a user