add .js to OpenLayers imports [#451] (#452)

This commit is contained in:
Brandon Liu
2024-09-17 17:12:04 +08:00
committed by GitHub
parent 353a7611e8
commit 6ed85a28fb
5 changed files with 18 additions and 17 deletions

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8"/>
<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">
<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>
body, #map {
height:100vh;

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8"/>
<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">
<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>
body, #map {
height:100vh;

View File

@@ -1,12 +1,12 @@
{
"name": "ol-pmtiles",
"version": "1.0.0",
"version": "1.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ol-pmtiles",
"version": "1.0.0",
"version": "1.0.1",
"license": "BSD-3-Clause",
"dependencies": {
"pmtiles": "^3.0.7"

View File

@@ -1,6 +1,6 @@
{
"name": "ol-pmtiles",
"version": "1.0.0",
"version": "1.0.1",
"description": "PMTiles sources for OpenLayers",
"type": "module",
"main": "dist/cjs/index.cjs",

View File

@@ -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 {
type Options as DataTileSourceOptions,
default as DataTileSource,
} from "ol/source/DataTile";
import TileState from "ol/TileState";
import { MVT } from "ol/format";
import type TileSource from "ol/source/Tile";
import { type Extent } from "ol/extent";
import type Projection from "ol/proj/Projection";
import type Tile from "ol/Tile";
import type VectorTile from "ol/VectorTile";
} from "ol/source/DataTile.js";
import TileState from "ol/TileState.js";
import { MVT } from "ol/format.js";
import type TileSource from "ol/source/Tile.js";
import { type Extent } from "ol/extent.js";
import type Projection from "ol/proj/Projection.js";
import type Tile from "ol/Tile.js";
import type VectorTile from "ol/VectorTile.js";
import {
type Options as VectorTileSourceOptions,
default as VectorTileSource,
} from "ol/source/VectorTile";
import type RenderFeature from "ol/render/Feature";
import { createXYZ, extentFromProjection } from "ol/tilegrid";
} from "ol/source/VectorTile.js";
import type RenderFeature from "ol/render/Feature.js";
import { createXYZ, extentFromProjection } from "ol/tilegrid.js";
import { PMTiles, Header, Source } from "pmtiles";
export class PMTilesRasterSource extends DataTileSource {