Skip to content

Commit

Permalink
add .js to OpenLayers imports [#451] (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdon authored Sep 17, 2024
1 parent 353a761 commit 6ed85a2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion openlayers/examples/raster.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8"/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/ol.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/ol.css">
<script src="https://unpkg.com/[email protected].0/dist/olpmtiles.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/olpmtiles.js"></script>
<style>
body, #map {
height:100vh;
Expand Down
2 changes: 1 addition & 1 deletion openlayers/examples/vector.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8"/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/ol.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/ol.css">
<script src="https://unpkg.com/[email protected].0/dist/olpmtiles.js"></script>
<script src="https://unpkg.com/[email protected].1/dist/olpmtiles.js"></script>
<style>
body, #map {
height:100vh;
Expand Down
4 changes: 2 additions & 2 deletions openlayers/package-lock.json

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

2 changes: 1 addition & 1 deletion openlayers/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
25 changes: 13 additions & 12 deletions openlayers/src/index.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 6ed85a2

Please sign in to comment.