@maptiler/sdk 3.1.0-rc2 → 3.1.0-rc3
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/maptiler-sdk.mjs +12 -9
- package/dist/maptiler-sdk.mjs.map +1 -1
- package/package.json +1 -1
package/dist/maptiler-sdk.mjs
CHANGED
|
@@ -7934,7 +7934,7 @@ class rl {
|
|
|
7934
7934
|
this.projectionButton.classList.remove("maplibregl-ctrl-projection-globe"), this.projectionButton.classList.remove("maplibregl-ctrl-projection-mercator"), this.map.isGlobeProjection() ? (this.projectionButton.classList.add("maplibregl-ctrl-projection-mercator"), this.projectionButton.title = "Enable Mercator projection") : (this.projectionButton.classList.add("maplibregl-ctrl-projection-globe"), this.projectionButton.title = "Enable Globe projection");
|
|
7935
7935
|
}
|
|
7936
7936
|
}
|
|
7937
|
-
const nl = "@maptiler/sdk", al = "3.1.
|
|
7937
|
+
const nl = "@maptiler/sdk", al = "3.1.0rc3", ol = "The Javascript & TypeScript map SDK tailored for MapTiler Cloud", il = "MapTiler", sl = "dist/maptiler-sdk.mjs", ll = "dist/maptiler-sdk.d.ts", ul = "dist/maptiler-sdk.css", cl = "module", pl = { ".": { import: "./dist/maptiler-sdk.mjs", types: "./dist/maptiler-sdk.d.ts" }, "./dist/maptiler-sdk.css": { import: "./dist/maptiler-sdk.css" }, "./style.css": { import: "./dist/maptiler-sdk.css" } }, fl = ["maptiler", "map", "sdk", "webmap", "cloud", "webGL", "maplibre"], dl = "https://docs.maptiler.com/sdk-js/", hl = "BSD-3-Clause", yl = { type: "git", url: "https://github.com/maptiler/maptiler-sdk-js.git" }, ml = { prepare: "husky", doc: "rm -rf docs/* && typedoc --out docs && cp -r images docs/", ncu: "npx npm-check-updates", lint: "eslint src", "lint:fix": "eslint src --fix", "test:watch": "vitest watch -c vite.config-test.ts --dom", test: "vitest run -c vite.config-test.ts --dom", "install:clean": "rm -rf build/ dist/ node_modules/ && npm ci", dev: 'concurrently "vite -c vite.config-dev.ts" "npm run dev-umd"', "dev-umd": "npm run build-css && tsc && NODE_ENV=development vite build -w -c vite.config-umd.ts", "build-css": "mkdir -p dist build && node scripts/replace-path-with-content.js src/style/style_template.css dist/tmp_maptiler-sdk.css && cat node_modules/maplibre-gl/dist/maplibre-gl.css dist/tmp_maptiler-sdk.css > dist/maptiler-sdk.css && rm dist/tmp_maptiler-sdk.css && cp dist/maptiler-sdk.css build/maptiler-sdk.css", "build-umd": "tsc && NODE_ENV=production vite build -c vite.config-umd.ts", "build-es": "tsc && NODE_ENV=production vite build -c vite.config-es.ts", build: "npm run build-es; npm run build-umd; npm run build-css", make: "npm run install:clean && npm run build" }, gl = { "@canvas/image-data": "^1.0.0", "@eslint/js": "^9.21.0", "@types/color-convert": "^2.0.4", "@types/color-name": "^2.0.0", "@types/uuid": "^10.0.0", "@types/xmldom": "^0.1.31", "@vitest/web-worker": "^3.0.9", "@xmldom/xmldom": "^0.8.10", concurrently: "^9.1.2", eslint: "^9.21.0", "eslint-config-prettier": "^10.0.2", "eslint-plugin-prettier": "^5.2.3", "happy-dom": "^17.4.4", husky: "^8.0.0", "lint-staged": "^15.4.3", prettier: "3.5.2", typedoc: "^0.27.6", typescript: "^5.7.3", "typescript-eslint": "^8.25.0", vite: "^6.0.7", "vite-plugin-dts": "^4.5.0", vitest: "^3.0.9" }, vl = { "@maplibre/maplibre-gl-style-spec": "^23.0.0", "@maptiler/client": "^2.2.0", events: "^3.3.0", "gl-matrix": "^3.4.3", "js-base64": "^3.7.7", "maplibre-gl": "^5.0.1", uuid: "^11.0.5" }, bl = {
|
|
7938
7938
|
name: nl,
|
|
7939
7939
|
version: al,
|
|
7940
7940
|
description: ol,
|
|
@@ -9336,7 +9336,7 @@ class qr extends k.Map {
|
|
|
9336
9336
|
console.warn("[webglcontextlost]", "Unexpected loss of WebGL context!"), this.fire("webglContextLost", y);
|
|
9337
9337
|
});
|
|
9338
9338
|
const h = this.getLayersOrder()[0];
|
|
9339
|
-
this.initSpace(t, h), this.initHalo(t, h);
|
|
9339
|
+
this.initSpace({ options: t, before: h }), this.initHalo({ options: t, before: h });
|
|
9340
9340
|
}), this.telemetry = new wl(this);
|
|
9341
9341
|
}
|
|
9342
9342
|
getSpace() {
|
|
@@ -9344,7 +9344,7 @@ class qr extends k.Map {
|
|
|
9344
9344
|
}
|
|
9345
9345
|
setSpace(t) {
|
|
9346
9346
|
if (this.space) {
|
|
9347
|
-
|
|
9347
|
+
this.space.setCubemap(t);
|
|
9348
9348
|
return;
|
|
9349
9349
|
}
|
|
9350
9350
|
this.space = new ir(t), this.once("load", () => {
|
|
@@ -9366,8 +9366,8 @@ class qr extends k.Map {
|
|
|
9366
9366
|
this.halo && this.addLayer(this.halo, this.space ? i : a);
|
|
9367
9367
|
});
|
|
9368
9368
|
}
|
|
9369
|
-
initSpace(t, n) {
|
|
9370
|
-
if (t.space === !1) return;
|
|
9369
|
+
initSpace({ options: t = this.options, before: n }) {
|
|
9370
|
+
if (this.space && this.removeLayer(this.space.id), t.space === !1) return;
|
|
9371
9371
|
const a = Un({ map: this, property: "space" });
|
|
9372
9372
|
if (t.space) {
|
|
9373
9373
|
this.space = new ir(t.space), this.addLayer(this.space, n);
|
|
@@ -9375,8 +9375,8 @@ class qr extends k.Map {
|
|
|
9375
9375
|
}
|
|
9376
9376
|
a && (this.space = new ir(a), this.addLayer(this.space, n));
|
|
9377
9377
|
}
|
|
9378
|
-
initHalo(t, n) {
|
|
9379
|
-
if (t.halo === !1) return;
|
|
9378
|
+
initHalo({ options: t = this.options, before: n }) {
|
|
9379
|
+
if (this.halo && this.removeLayer(this.halo.id), t.halo === !1) return;
|
|
9380
9380
|
const a = Un({ map: this, property: "halo" });
|
|
9381
9381
|
if (t.halo) {
|
|
9382
9382
|
this.halo = new sr(t.halo), this.addLayer(this.halo, n);
|
|
@@ -9487,7 +9487,10 @@ class qr extends k.Map {
|
|
|
9487
9487
|
"Invalid style. A style must be a valid URL to a style.json, a JSON string representing a valid StyleSpecification or a valid StyleSpecification object. Fallback to default MapTiler style."
|
|
9488
9488
|
);
|
|
9489
9489
|
}
|
|
9490
|
-
return this.styleInProcess = !0,
|
|
9490
|
+
return this.styleInProcess = !0, this.once("style.load", () => {
|
|
9491
|
+
const i = this.getLayersOrder()[0];
|
|
9492
|
+
this.space && (console.log(this.space), this.initSpace({ before: i })), this.halo && this.initHalo({ before: i });
|
|
9493
|
+
}), super.setStyle(a.style, n), this;
|
|
9491
9494
|
}
|
|
9492
9495
|
/**
|
|
9493
9496
|
* Adds a [MapLibre style layer](https://maplibre.org/maplibre-style-spec/layers)
|
|
@@ -11751,7 +11754,7 @@ const Eu = {
|
|
|
11751
11754
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
11752
11755
|
Co();
|
|
11753
11756
|
function rc() {
|
|
11754
|
-
return "3.1.
|
|
11757
|
+
return "3.1.0rc3";
|
|
11755
11758
|
}
|
|
11756
11759
|
const nc = k.Map, ac = k.Marker, oc = k.Popup, ic = k.Style, sc = k.CanvasSource, lc = k.GeoJSONSource, uc = k.ImageSource, cc = k.RasterTileSource, pc = k.RasterDEMTileSource, fc = k.VectorTileSource, dc = k.VideoSource, hc = k.NavigationControl, yc = k.GeolocateControl, mc = k.AttributionControl, gc = k.LogoControl, vc = k.ScaleControl, bc = k.FullscreenControl, wc = k.TerrainControl, xc = k.BoxZoomHandler, Sc = k.ScrollZoomHandler, kc = k.CooperativeGesturesHandler, Cc = k.KeyboardHandler, Lc = k.TwoFingersTouchPitchHandler, Ec = k.MapWheelEvent, Tc = k.MapTouchEvent, Ac = k.MapMouseEvent, _c = k.config, Mc = k.getVersion, {
|
|
11757
11760
|
setRTLTextPlugin: Ic,
|