@emuanalytics/flow-rdf-core 4.0.8 → 4.0.9

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.
@@ -105,7 +105,7 @@ const _MapExporter = class _MapExporter {
105
105
  preserveDrawingBuffer: true,
106
106
  transformRequest: this.transformMapRequest.bind(this)
107
107
  });
108
- mapCopy.on("styleimagemissing", this.handleMissingImage.bind(this));
108
+ mapCopy.on("styleimagemissing", (e) => this.handleMissingImage(e, mapCopy));
109
109
  return new Promise((resolve) => {
110
110
  mapCopy.once("load", () => {
111
111
  Object.keys(this.map.maplibreMap.style.sourceCaches).forEach((sourceId) => {
@@ -138,18 +138,18 @@ const _MapExporter = class _MapExporter {
138
138
  get: () => pixelRatio
139
139
  });
140
140
  }
141
- async handleMissingImage(e) {
141
+ async handleMissingImage(e, mapCopy) {
142
142
  const imageInfo = this.map.imageRegistry.getImage(e.id);
143
143
  if (imageInfo === this.map.imageRegistry.unknownImage) {
144
- console.error(`Map ${this.map.id}: Image '${e.id}' not registered`);
144
+ console.error(`Export copy of map ${this.map.id}: Image '${e.id}' not registered`);
145
145
  }
146
146
  if (!imageInfo.image.complete) {
147
147
  imageInfo.image.onload = () => {
148
- this.map.maplibreMap.updateImage(e.id, imageInfo.image);
149
- this.map.maplibreMap.redraw();
148
+ mapCopy.updateImage(e.id, imageInfo.image);
149
+ mapCopy.redraw();
150
150
  };
151
151
  }
152
- this.map.maplibreMap.addImage(e.id, imageInfo.image, {
152
+ mapCopy.addImage(e.id, imageInfo.image, {
153
153
  pixelRatio: imageInfo.pixelDensity,
154
154
  sdf: imageInfo.recolor
155
155
  });
@@ -1,3 +1,3 @@
1
- const version = "4.0.8";
1
+ const version = "4.0.9";
2
2
 
3
3
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emuanalytics/flow-rdf-core",
3
- "version": "4.0.8",
3
+ "version": "4.0.9",
4
4
  "description": "",
5
5
  "sideEffects": false,
6
6
  "type": "module",