@geolonia/embed 3.1.5 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/embed +1 -1
- package/dist/embed.js +1 -1
- package/package.json +2 -1
- package/src/embed.js +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geolonia/embed",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Geolonia embed JS API",
|
|
5
5
|
"main": "dist/embed.js",
|
|
6
6
|
"types": "src/embed.d.ts",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"@turf/center": "^6.0.1",
|
|
55
55
|
"core-js": "^3.26.1",
|
|
56
56
|
"maplibre-gl": "2.4.0",
|
|
57
|
+
"pmtiles": "^2.7.2",
|
|
57
58
|
"promise-polyfill": "^8.2.3",
|
|
58
59
|
"sanitize-html": "^2.8.0",
|
|
59
60
|
"tinycolor2": "^1.4.1",
|
package/src/embed.js
CHANGED
|
@@ -13,6 +13,10 @@ import parseAtts from './lib/parse-atts';
|
|
|
13
13
|
import { parseApiKey } from './lib/parse-api-key';
|
|
14
14
|
import pkg from '../package.json';
|
|
15
15
|
import SimpleStyle from './lib/simplestyle';
|
|
16
|
+
import * as pmtiles from 'pmtiles';
|
|
17
|
+
|
|
18
|
+
const protocol = new pmtiles.Protocol();
|
|
19
|
+
maplibregl.addProtocol('pmtiles', protocol.tile);
|
|
16
20
|
|
|
17
21
|
if ( util.checkPermission() ) {
|
|
18
22
|
let isDOMContentLoaded = false;
|