@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
|
|
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(`
|
|
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
|
-
|
|
149
|
-
|
|
148
|
+
mapCopy.updateImage(e.id, imageInfo.image);
|
|
149
|
+
mapCopy.redraw();
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
mapCopy.addImage(e.id, imageInfo.image, {
|
|
153
153
|
pixelRatio: imageInfo.pixelDensity,
|
|
154
154
|
sdf: imageInfo.recolor
|
|
155
155
|
});
|
package/dist/package.json.mjs
CHANGED