@opengis/gis 0.2.166 → 0.2.167
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/dist/{CardIcon-B-HKyoDs.js → CardIcon-golqfa-Y.js} +1 -1
- package/dist/{EntityTablePage-BnAJuEwI.js → EntityTablePage-BhmxePgR.js} +1 -1
- package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-L9BfGfUU.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-BFa27smR.js} +1 -1
- package/dist/{HeaderActions.vue_vue_type_script_setup_true_lang-D3oMTMO0.js → HeaderActions.vue_vue_type_script_setup_true_lang-Dp0MjgnU.js} +1 -1
- package/dist/{MapSettings-B1lSk4KX.js → MapSettings-F_DT3xKl.js} +1 -1
- package/dist/{RastersTablePage-aEh696Or.js → RastersTablePage-3rXQ0baG.js} +1 -1
- package/dist/cartocss-CN-UrS7V.js +1586 -0
- package/dist/{import-utils-HEL359RU.js → import-utils-F5ErbNz1.js} +1 -1
- package/dist/{index-ClqqnPEd.js → index-CdB0VXro.js} +4461 -4426
- package/dist/index.css +1 -1
- package/dist/index.js +12 -12
- package/dist/index.umd.cjs +41 -54
- package/dist/{raster-DFD-dtui.js → raster-DWmiWlf7.js} +3 -3
- package/dist/{register-DMJ_OnzW.js → register-D1jLD0hK.js} +3 -3
- package/dist/service-JGNtth-y.js +2593 -0
- package/dist/{vs-datatable-C27Dlfo3.js → vs-datatable-BWItxbtK.js} +1 -1
- package/package.json +1 -2
- package/server/routes/mapnik/controllers/mapnikLogger.js +10 -21
- package/server/routes/mapnik/controllers/rtile.js +12 -28
- package/dist/cartocss-BoYdEjtS.js +0 -1065
- package/dist/service-FcW2Gvt4.js +0 -3471
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as F, mergeModels as O, defineAsyncComponent as I, useModel as R, ref as y, watch as K, openBlock as o, createElementBlock as s, createElementVNode as e, createVNode as $, unref as x, withCtx as S, createStaticVNode as V, useSlots as P, computed as H, Fragment as b, createTextVNode as U, createCommentVNode as N, renderList as A, normalizeStyle as Q, toDisplayString as M, normalizeClass as z, withModifiers as X, createBlock as Y, resolveDynamicComponent as ee, withDirectives as te, renderSlot as ne } from "vue";
|
|
2
2
|
import { notify as E } from "@opengis/core";
|
|
3
3
|
import { Edit as le, Trash as oe } from "lucide-vue-next";
|
|
4
|
-
import { _ as u } from "./index-
|
|
4
|
+
import { _ as u } from "./index-CdB0VXro.js";
|
|
5
5
|
const se = { class: "flex items-center justify-center col-span-3 gap-2" }, re = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, ie = /* @__PURE__ */ F({
|
|
6
6
|
__name: "vs-datatable-controls",
|
|
7
7
|
props: /* @__PURE__ */ O({
|
package/package.json
CHANGED
|
@@ -2,15 +2,7 @@ import { config } from '@opengis/fastify-table/utils.js';
|
|
|
2
2
|
|
|
3
3
|
import mapnik from '../../../plugins/mapnik/funcs/mapnik.js';
|
|
4
4
|
|
|
5
|
-
const { GetLogs } = mapnik();
|
|
6
|
-
|
|
7
|
-
function sendTextOrJson(reply, contentType, payload) {
|
|
8
|
-
if (typeof payload === 'string' || Buffer.isBuffer(payload)) {
|
|
9
|
-
return reply.type(contentType).send(payload);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return reply.type('application/json').send(payload);
|
|
13
|
-
}
|
|
5
|
+
const { GetLogs } = mapnik();
|
|
14
6
|
|
|
15
7
|
export default async function mapnikLogger({
|
|
16
8
|
params,
|
|
@@ -20,21 +12,18 @@ export default async function mapnikLogger({
|
|
|
20
12
|
}
|
|
21
13
|
|
|
22
14
|
const { data, links, err } = await GetLogs({ path: params['*'] });
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return reply.headers({
|
|
15
|
+
console.log(links);
|
|
16
|
+
if (err) {
|
|
17
|
+
return reply.status(400).send(err);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (links) {
|
|
21
|
+
return reply.headers({
|
|
33
22
|
"Content-Type": "text/html; charset=UTF-8",
|
|
34
23
|
"Content-Security-Policy": "default-src 'none'",
|
|
35
24
|
"X-Content-Type-Options": "nosniff",
|
|
36
25
|
}).send(links.replace(/\/api\/gis-logger/g, '/logger-gis'));
|
|
37
26
|
}
|
|
38
27
|
|
|
39
|
-
return
|
|
40
|
-
}
|
|
28
|
+
return reply.headers({ "Content-type": "text/plain; charset=UTF-8" }).send(data);
|
|
29
|
+
}
|
|
@@ -9,13 +9,9 @@ import {
|
|
|
9
9
|
|
|
10
10
|
import mapnik from '../../../plugins/mapnik/funcs/mapnik.js';
|
|
11
11
|
|
|
12
|
-
const { RenderTile } = mapnik();
|
|
13
|
-
|
|
14
|
-
const mercator = new SphericalMercator({ size: 256 });
|
|
15
|
-
|
|
16
|
-
function isTrue(value) {
|
|
17
|
-
return value === true || value === 'true' || value === '1';
|
|
18
|
-
}
|
|
12
|
+
const { RenderTile } = mapnik();
|
|
13
|
+
|
|
14
|
+
const mercator = new SphericalMercator({ size: 256 });
|
|
19
15
|
|
|
20
16
|
/**
|
|
21
17
|
* Формування растрового tile cartoCss
|
|
@@ -32,16 +28,14 @@ function isTrue(value) {
|
|
|
32
28
|
* @param {String} y - координата x
|
|
33
29
|
*/
|
|
34
30
|
|
|
35
|
-
export default async function gisRtile({
|
|
36
|
-
pg = pgClients.client, params, query, user,
|
|
37
|
-
}, reply) {
|
|
31
|
+
export default async function gisRtile({
|
|
32
|
+
pg = pgClients.client, params, query, user,
|
|
33
|
+
}, reply) {
|
|
38
34
|
if (!RenderTile) {
|
|
39
35
|
return reply.status(400).send({ error: 'mapnik server address needed', code: 400 });
|
|
40
36
|
}
|
|
41
37
|
|
|
42
|
-
const { id, z, y } = params;
|
|
43
|
-
const nocache = isTrue(query.nocache);
|
|
44
|
-
const nottl = isTrue(query.nottl);
|
|
38
|
+
const { id, z, y } = params;
|
|
45
39
|
|
|
46
40
|
const x = params.x.split('.')[0] - 0;
|
|
47
41
|
|
|
@@ -91,10 +85,8 @@ export default async function gisRtile({
|
|
|
91
85
|
const meta = config?.mapnik?.meta ? true : false;
|
|
92
86
|
|
|
93
87
|
try {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
? '0'
|
|
97
|
-
: (data.type === 'css' && !data.is_static ? '1w' : null);
|
|
88
|
+
const ttl = (query.nocache ? '0' : null)
|
|
89
|
+
|| (data.type === 'css' && !data.is_static ? '1w' : null);
|
|
98
90
|
|
|
99
91
|
const md5 = data.source_path
|
|
100
92
|
? createHash('md5').update(data.source_path).digest('hex')
|
|
@@ -140,18 +132,10 @@ export default async function gisRtile({
|
|
|
140
132
|
const accelPath = result.tile_path?.startsWith('/') ? result.tile_path : `/${result.tile_path}`;
|
|
141
133
|
const metaHeaders = {
|
|
142
134
|
'Content-Type': 'image/webp',
|
|
143
|
-
'Cache-Control': nocache || nottl ? 'no-store, no-cache, must-revalidate' : 'public, max-age=2592000',
|
|
135
|
+
'Cache-Control': query.nocache || query.nottl ? 'no-store, no-cache, must-revalidate' : 'public, max-age=2592000',
|
|
144
136
|
'X-Accel-Redirect': accelPath,
|
|
145
137
|
};
|
|
146
|
-
if (query.debug) {
|
|
147
|
-
return reply.type('application/json').send({
|
|
148
|
-
...metaHeaders,
|
|
149
|
-
base64: result.base64,
|
|
150
|
-
z,
|
|
151
|
-
x,
|
|
152
|
-
y,
|
|
153
|
-
});
|
|
154
|
-
}
|
|
138
|
+
if (query.debug) return reply.send({ ...metaHeaders, base64: result.base64, z, x, y });
|
|
155
139
|
reply.headers(metaHeaders);
|
|
156
140
|
return reply.code(204).send();
|
|
157
141
|
}
|
|
@@ -172,7 +156,7 @@ export default async function gisRtile({
|
|
|
172
156
|
|
|
173
157
|
const buffer = result.data || Buffer.from(result.base64, 'base64');
|
|
174
158
|
|
|
175
|
-
return reply.headers({ 'Content-Type': 'image/webp', 'Cache-Control': nocache || nottl ? 'no-store, no-cache, must-revalidate' : 'public, max-age=2592000' }).send(buffer);
|
|
159
|
+
return reply.headers({ 'Content-Type': 'image/webp', 'Cache-Control': query.nocache || query.nottl ? 'no-store, no-cache, must-revalidate' : 'public, max-age=2592000' }).send(buffer);
|
|
176
160
|
}
|
|
177
161
|
catch (err) {
|
|
178
162
|
logger.file('rtile/error', {
|