@opengis/gis 0.2.67 → 0.2.68

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.67",
3
+ "version": "0.2.68",
4
4
  "type": "module",
5
5
  "author": "Softpro",
6
6
  "main": "./dist/index.js",
@@ -18,7 +18,7 @@ export default async function layerList({
18
18
  }
19
19
 
20
20
  const q = `
21
- select service_id as id, name, category, style, bbox::box2d as extent, st_asgeojson(bbox)::json as geom, null as url, coalesce(service_type, 'vtile') as service, group_id,
21
+ select service_id as id, name, category, style, bbox::box2d as extent, st_asgeojson(bbox)::json as geom, coalesce('/api/vtile/'||service_id||'/ua/{z}/{x}/{y}.vmt',null) as url, coalesce(service_type, 'vtile') as service, group_id,
22
22
  popup, card, filters, source_path
23
23
  from gis.services where is_active and ${!user.uid ? 'is_public' : '1=1'}
24
24
  union all
@@ -59,9 +59,6 @@ export default async function layerList({
59
59
 
60
60
  // parse service style
61
61
  rows.forEach(row => Object.assign(row, { style: row.style ? yml2json(row.style) : null }));
62
- // assign service url
63
- rows.filter(row => row.service && ['raster', 'cartocss'].includes(row.service)).forEach(row => Object.assign(row, { url: `${config.prefix || '/api'}/gis-rtile/${row.id}/{z}/{x}/{y}.png` }));
64
- rows.filter(row => !row.url && row.service !== 'ogc').forEach(row => Object.assign(row, { url: `${config.prefix || '/api'}/vtile/${row.id}/ua/{z}/{x}/{y}.vmt` }));
65
62
  // parse extent string to number[]
66
63
  rows.filter(row => row.extent).forEach(row => Object.assign(row, {
67
64
  extent: row.extent.match(/BOX\(([^)]+)\)/)?.[1]