ebta-workflow-prod 4.0.9 → 4.0.10
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/package.json
CHANGED
|
@@ -242,10 +242,10 @@ export default class PDFMapGeneratorActivity implements IActivityHandler {
|
|
|
242
242
|
const image3url = 'https://cdn.jsdelivr.net/npm/ebta-resources/resources/prints/dbyd.png'
|
|
243
243
|
const imageBarurl = 'https://cdn.jsdelivr.net/npm/ebta-resources/resources/prints/Scalebar.png'
|
|
244
244
|
const imageNorthUrl = 'https://cdn-icons-png.flaticon.com/512/3236/3236586.png'
|
|
245
|
+
const image10kmurl = 'https://ebta.maps.arcgis.com/sharing/rest/content/items/c15211b9826549f69a13c3f3d32a841b/resources/resources/prints/speedlimit10PNG.png'
|
|
245
246
|
let image10Buffer, image1Buffer, image2Buffer, image3Buffer
|
|
246
247
|
|
|
247
248
|
if (inputs.template == 'VMP') {
|
|
248
|
-
const image10kmurl = 'https://ebta.maps.arcgis.com/sharing/rest/content/items/c15211b9826549f69a13c3f3d32a841b/resources/vmp_symbols/speedlimit10.svg'
|
|
249
249
|
image10Buffer = await this.fetchData(image10kmurl);
|
|
250
250
|
console.log('Image10 fetched successfully');
|
|
251
251
|
}
|
|
@@ -272,13 +272,13 @@ export default class PDFMapGeneratorActivity implements IActivityHandler {
|
|
|
272
272
|
let newPage = doc.getPage(0)
|
|
273
273
|
let imgBase64 = imgBase64Array[i]
|
|
274
274
|
let imageBuffer = this.base64ToArrayBuffer(imgBase64);
|
|
275
|
-
console.log(`Image ${i} data processed successfully`);
|
|
276
275
|
let image;
|
|
277
276
|
if (imgBase64.startsWith('data:image/png;base64,')) {
|
|
278
277
|
image = await doc.embedPng(imageBuffer);
|
|
279
278
|
} else if (imgBase64.startsWith('data:image/jpeg;base64,') || imgBase64.startsWith('data:image/jpg;base64,')) {
|
|
280
279
|
image = await doc.embedJpg(imageBuffer);
|
|
281
280
|
}
|
|
281
|
+
console.log(`Main Image ${i} data processed successfully`);
|
|
282
282
|
let image1, image2, image3, image10
|
|
283
283
|
if (inputs.template == 'VMP') {
|
|
284
284
|
image10 = await doc.embedPng(image10Buffer);
|
|
@@ -616,14 +616,14 @@ export default class PDFMapGeneratorActivity implements IActivityHandler {
|
|
|
616
616
|
|
|
617
617
|
if (inputs.template == 'VMP') {
|
|
618
618
|
newPage.drawText('Maximum Speed 10KM/h within Work Area', {
|
|
619
|
-
x: 28,
|
|
619
|
+
x: 28+150,
|
|
620
620
|
y: 145,
|
|
621
621
|
size: 10.5,
|
|
622
622
|
color: rgb(255, 255, 255), // White color
|
|
623
623
|
font: boldFont,
|
|
624
624
|
});
|
|
625
625
|
newPage.drawText('Maximum Speed 10KM/h within Work Area', {
|
|
626
|
-
x: 28,
|
|
626
|
+
x: 28+151,
|
|
627
627
|
y: 145,
|
|
628
628
|
size: 10,
|
|
629
629
|
color: rgb(255, 0, 0), // red color
|