@trailstash/ultra 4.2.7 → 4.3.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/.gitlab-ci.yml CHANGED
@@ -19,8 +19,7 @@ pages:
19
19
  paths:
20
20
  - public
21
21
  only:
22
- - main
23
- - tags
22
+ - develop
24
23
  npm:
25
24
  image: node:20
26
25
  script:
package/docs/style.md CHANGED
@@ -89,11 +89,11 @@ In order to place your layers below existing style layers, you can use the `befo
89
89
 
90
90
  [Example](./Examples/bike-infra.md)
91
91
 
92
- ## PNG sprites via HTTPS
92
+ ## sprites via HTTPS
93
93
 
94
94
  In order to facilitate adding icons to the map that don't exist in the basemap's
95
95
  [sprites](),
96
- if `icon-image` is set to an HTTPS URL to a PNG image, Ultra will automatically download
96
+ if `icon-image` is set to an HTTPS URL to an image, Ultra will automatically download
97
97
  it and add it to the Map's images.
98
98
 
99
99
  [Example](./MapLibre-Examples/add-image.md)
package/lib/sprites.js CHANGED
@@ -4,8 +4,11 @@ export const handleStyleImageMissing = async (ev) => {
4
4
  if (ev.id.startsWith("https://") || ev.id.startsWith("data:")) {
5
5
  if (!fetchedImages[ev.id]) {
6
6
  fetchedImages[ev.id] = true;
7
- const image = await ev.target.loadImage(ev.id);
8
- ev.target.addImage(ev.id, image.data);
7
+ const image = new Image();
8
+ image.crossOrigin = "anonymous";
9
+ image.src = ev.id;
10
+ await image.decode();
11
+ ev.target.addImage(ev.id, image);
9
12
  }
10
13
  }
11
14
  if (builtin) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "4.2.7",
6
+ "version": "4.3.0",
7
7
  "description": "A web based tool for making MapLibre GL maps with data from sources such as Overpass, GeoJSON, GPX, KML, TCX, etc",
8
8
  "main": "index.js",
9
9
  "scripts": {
@@ -70,7 +70,7 @@
70
70
  "liquidjs": "^10.17.0",
71
71
  "lodash.pick": "^4.4.0",
72
72
  "lz-string": "^1.5.0",
73
- "maplibre-gl": "^5.1.0",
73
+ "maplibre-gl": "^5.5.0",
74
74
  "marked": "^14.1.2",
75
75
  "node-events": "^0.0.2",
76
76
  "normalize.css": "^8.0.1",