@opengis/gis 0.2.125 → 0.2.126

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/gis",
3
- "version": "0.2.125",
3
+ "version": "0.2.126",
4
4
  "type": "module",
5
5
  "author": "Softpro",
6
6
  "main": "./dist/index.js",
@@ -53,7 +53,7 @@ export default async function createXml({
53
53
  // create at xml/:id with name only, always - by path
54
54
  const resp = await CreateXML({
55
55
  path: relpath,
56
- name: id, // create additional xml named as primary key at xml directory
56
+ name: [config.mapnik?.folder, id].filter(Boolean).join('/'), // create additional xml named as primary key at xml directory
57
57
  previewZoom: data.raster_zoom, // preview<=>detailed, default = 16 if file size > 1GB
58
58
  // srid: data.srid, // auto detected if not supplied
59
59
  proj4,
@@ -1,5 +1,6 @@
1
1
  import carto from 'carto';
2
2
 
3
+ import { config } from '@opengis/fastify-table/utils.js';
3
4
  import mapnik from '../../../plugins/mapnik/funcs/mapnik.js';
4
5
 
5
6
  const { UploadXML } = mapnik();
@@ -98,8 +99,8 @@ export default async function uploadXML({
98
99
  throw new Error('xml generation error');
99
100
  }
100
101
  const { status, error } = await UploadXML({
101
- path: relpath ? `vector/${relpath}` : null,
102
- name: relpath ? null : id,
102
+ path: relpath ? ['vector', config.mapnik?.folder || '', relpath].filter(Boolean).join('/') : null,
103
+ name: relpath ? null : [config.mapnik?.folder, id].filter(Boolean).join('/'),
103
104
  xml: xmlFileText,
104
105
  }).catch((err) => ({ error: err.toString() }));
105
106