@deck.gl/carto 9.0.5 → 9.0.7
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/api/common.d.ts +1 -0
- package/dist/api/common.d.ts.map +1 -1
- package/dist/api/common.js +3 -1
- package/dist/cartoRasterTile-worker.js +15 -48
- package/dist/cartoSpatialTile-worker.js +15 -48
- package/dist/cartoVectorTile-worker.js +15 -48
- package/dist/dist.dev.js +24 -59
- package/dist/index.cjs +8 -6
- package/dist/index.cjs.map +3 -3
- package/dist/layers/schema/carto-raster-tile-loader.js +1 -1
- package/dist/layers/schema/carto-spatial-tile-loader.js +1 -1
- package/dist/layers/schema/carto-vector-tile-loader.js +1 -1
- package/dist/layers/vector-tile-layer.d.ts.map +1 -1
- package/dist/layers/vector-tile-layer.js +2 -0
- package/dist.min.js +6 -6
- package/package.json +8 -8
- package/src/api/common.ts +4 -1
- package/src/layers/vector-tile-layer.ts +2 -0
package/dist/api/common.d.ts
CHANGED
package/dist/api/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/api/common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/api/common.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,uCAAuC,CAAC;AACzE,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAC9C,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AACtC,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC,eAAO,MAAM,kBAAkB;;;CAG9B,CAAC;AAEF,eAAO,MAAM,eAAe;;;CAG3B,CAAC"}
|
package/dist/api/common.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { VERSION } from '@deck.gl/core';
|
|
1
2
|
export const DEFAULT_API_BASE_URL = 'https://gcp-us-east1.api.carto.com';
|
|
2
3
|
export const DEFAULT_CLIENT = 'deck-gl-carto';
|
|
3
4
|
export const V3_MINOR_VERSION = '3.4';
|
|
4
5
|
export const MAX_GET_LENGTH = 8192;
|
|
5
6
|
export const DEFAULT_PARAMETERS = {
|
|
6
|
-
v: V3_MINOR_VERSION
|
|
7
|
+
v: V3_MINOR_VERSION,
|
|
8
|
+
deckglVersion: VERSION
|
|
7
9
|
};
|
|
8
10
|
export const DEFAULT_HEADERS = {
|
|
9
11
|
Accept: 'application/json',
|
|
@@ -762,9 +762,7 @@
|
|
|
762
762
|
var parentPort = null;
|
|
763
763
|
|
|
764
764
|
// ../../node_modules/@loaders.gl/worker-utils/dist/lib/worker-utils/get-transfer-list.js
|
|
765
|
-
function getTransferList(object) {
|
|
766
|
-
let recursive = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
767
|
-
let transfers = arguments.length > 2 ? arguments[2] : void 0;
|
|
765
|
+
function getTransferList(object, recursive = true, transfers) {
|
|
768
766
|
const transfersSet = transfers || /* @__PURE__ */ new Set();
|
|
769
767
|
if (!object) {
|
|
770
768
|
} else if (isTransferable(object)) {
|
|
@@ -810,15 +808,14 @@
|
|
|
810
808
|
static set onmessage(onMessage) {
|
|
811
809
|
async function handleMessage(message) {
|
|
812
810
|
const parentPort2 = await getParentPort();
|
|
813
|
-
const {
|
|
814
|
-
type,
|
|
815
|
-
payload
|
|
816
|
-
} = parentPort2 ? message : message.data;
|
|
811
|
+
const { type, payload } = parentPort2 ? message : message.data;
|
|
817
812
|
onMessage(type, payload);
|
|
818
813
|
}
|
|
819
814
|
getParentPort().then((parentPort2) => {
|
|
820
815
|
if (parentPort2) {
|
|
821
|
-
parentPort2.on("message",
|
|
816
|
+
parentPort2.on("message", (message) => {
|
|
817
|
+
handleMessage(message);
|
|
818
|
+
});
|
|
822
819
|
parentPort2.on("exit", () => console.debug("Node worker closing"));
|
|
823
820
|
} else {
|
|
824
821
|
globalThis.onmessage = handleMessage;
|
|
@@ -833,10 +830,7 @@
|
|
|
833
830
|
return;
|
|
834
831
|
}
|
|
835
832
|
const parentPort3 = await getParentPort();
|
|
836
|
-
const {
|
|
837
|
-
type,
|
|
838
|
-
payload
|
|
839
|
-
} = parentPort3 ? message : message.data;
|
|
833
|
+
const { type, payload } = parentPort3 ? message : message.data;
|
|
840
834
|
onMessage(type, payload);
|
|
841
835
|
};
|
|
842
836
|
}
|
|
@@ -858,11 +852,7 @@
|
|
|
858
852
|
}
|
|
859
853
|
}
|
|
860
854
|
static async postMessage(type, payload) {
|
|
861
|
-
const data = {
|
|
862
|
-
source: "loaders.gl",
|
|
863
|
-
type,
|
|
864
|
-
payload
|
|
865
|
-
};
|
|
855
|
+
const data = { source: "loaders.gl", type, payload };
|
|
866
856
|
const transferList = getTransferList(payload);
|
|
867
857
|
const parentPort2 = await getParentPort();
|
|
868
858
|
if (parentPort2) {
|
|
@@ -873,10 +863,7 @@
|
|
|
873
863
|
}
|
|
874
864
|
};
|
|
875
865
|
function isKnownMessage(message) {
|
|
876
|
-
const {
|
|
877
|
-
type,
|
|
878
|
-
data
|
|
879
|
-
} = message;
|
|
866
|
+
const { type, data } = message;
|
|
880
867
|
return type === "message" && data && typeof data.source === "string" && data.source.startsWith("loaders.gl");
|
|
881
868
|
}
|
|
882
869
|
|
|
@@ -890,11 +877,7 @@
|
|
|
890
877
|
switch (type) {
|
|
891
878
|
case "process":
|
|
892
879
|
try {
|
|
893
|
-
const {
|
|
894
|
-
input,
|
|
895
|
-
options = {},
|
|
896
|
-
context = {}
|
|
897
|
-
} = payload;
|
|
880
|
+
const { input, options = {}, context = {} } = payload;
|
|
898
881
|
const result = await parseData({
|
|
899
882
|
loader,
|
|
900
883
|
arrayBuffer: input,
|
|
@@ -904,14 +887,10 @@
|
|
|
904
887
|
_parse: parseOnMainThread
|
|
905
888
|
}
|
|
906
889
|
});
|
|
907
|
-
WorkerBody.postMessage("done", {
|
|
908
|
-
result
|
|
909
|
-
});
|
|
890
|
+
WorkerBody.postMessage("done", { result });
|
|
910
891
|
} catch (error) {
|
|
911
892
|
const message = error instanceof Error ? error.message : "";
|
|
912
|
-
WorkerBody.postMessage("error", {
|
|
913
|
-
error: message
|
|
914
|
-
});
|
|
893
|
+
WorkerBody.postMessage("error", { error: message });
|
|
915
894
|
}
|
|
916
895
|
break;
|
|
917
896
|
default:
|
|
@@ -938,21 +917,11 @@
|
|
|
938
917
|
}
|
|
939
918
|
};
|
|
940
919
|
WorkerBody.addEventListener(onMessage);
|
|
941
|
-
const payload = {
|
|
942
|
-
id: id2,
|
|
943
|
-
input: arrayBuffer,
|
|
944
|
-
options
|
|
945
|
-
};
|
|
920
|
+
const payload = { id: id2, input: arrayBuffer, options };
|
|
946
921
|
WorkerBody.postMessage("process", payload);
|
|
947
922
|
});
|
|
948
923
|
}
|
|
949
|
-
async function parseData(
|
|
950
|
-
let {
|
|
951
|
-
loader,
|
|
952
|
-
arrayBuffer,
|
|
953
|
-
options,
|
|
954
|
-
context
|
|
955
|
-
} = _ref;
|
|
924
|
+
async function parseData({ loader, arrayBuffer, options, context }) {
|
|
956
925
|
let data;
|
|
957
926
|
let parser;
|
|
958
927
|
if (loader.parseSync || loader.parse) {
|
|
@@ -970,9 +939,7 @@
|
|
|
970
939
|
modules: loader && loader.options && loader.options.modules || {},
|
|
971
940
|
worker: false
|
|
972
941
|
};
|
|
973
|
-
return await parser(data, {
|
|
974
|
-
...options
|
|
975
|
-
}, context, loader);
|
|
942
|
+
return await parser(data, { ...options }, context, loader);
|
|
976
943
|
}
|
|
977
944
|
|
|
978
945
|
// src/layers/schema/fast-pbf.ts
|
|
@@ -1041,7 +1008,7 @@
|
|
|
1041
1008
|
}
|
|
1042
1009
|
|
|
1043
1010
|
// src/layers/schema/carto-raster-tile-loader.ts
|
|
1044
|
-
var VERSION = true ? "9.0.
|
|
1011
|
+
var VERSION = true ? "9.0.7" : "latest";
|
|
1045
1012
|
var id = "cartoRasterTile";
|
|
1046
1013
|
var DEFAULT_OPTIONS = {
|
|
1047
1014
|
cartoRasterTile: {
|
|
@@ -1088,9 +1088,7 @@
|
|
|
1088
1088
|
var parentPort = null;
|
|
1089
1089
|
|
|
1090
1090
|
// ../../node_modules/@loaders.gl/worker-utils/dist/lib/worker-utils/get-transfer-list.js
|
|
1091
|
-
function getTransferList(object) {
|
|
1092
|
-
let recursive = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
1093
|
-
let transfers = arguments.length > 2 ? arguments[2] : void 0;
|
|
1091
|
+
function getTransferList(object, recursive = true, transfers) {
|
|
1094
1092
|
const transfersSet = transfers || /* @__PURE__ */ new Set();
|
|
1095
1093
|
if (!object) {
|
|
1096
1094
|
} else if (isTransferable(object)) {
|
|
@@ -1136,15 +1134,14 @@
|
|
|
1136
1134
|
static set onmessage(onMessage) {
|
|
1137
1135
|
async function handleMessage(message) {
|
|
1138
1136
|
const parentPort2 = await getParentPort();
|
|
1139
|
-
const {
|
|
1140
|
-
type,
|
|
1141
|
-
payload
|
|
1142
|
-
} = parentPort2 ? message : message.data;
|
|
1137
|
+
const { type, payload } = parentPort2 ? message : message.data;
|
|
1143
1138
|
onMessage(type, payload);
|
|
1144
1139
|
}
|
|
1145
1140
|
getParentPort().then((parentPort2) => {
|
|
1146
1141
|
if (parentPort2) {
|
|
1147
|
-
parentPort2.on("message",
|
|
1142
|
+
parentPort2.on("message", (message) => {
|
|
1143
|
+
handleMessage(message);
|
|
1144
|
+
});
|
|
1148
1145
|
parentPort2.on("exit", () => console.debug("Node worker closing"));
|
|
1149
1146
|
} else {
|
|
1150
1147
|
globalThis.onmessage = handleMessage;
|
|
@@ -1159,10 +1156,7 @@
|
|
|
1159
1156
|
return;
|
|
1160
1157
|
}
|
|
1161
1158
|
const parentPort3 = await getParentPort();
|
|
1162
|
-
const {
|
|
1163
|
-
type,
|
|
1164
|
-
payload
|
|
1165
|
-
} = parentPort3 ? message : message.data;
|
|
1159
|
+
const { type, payload } = parentPort3 ? message : message.data;
|
|
1166
1160
|
onMessage(type, payload);
|
|
1167
1161
|
};
|
|
1168
1162
|
}
|
|
@@ -1184,11 +1178,7 @@
|
|
|
1184
1178
|
}
|
|
1185
1179
|
}
|
|
1186
1180
|
static async postMessage(type, payload) {
|
|
1187
|
-
const data = {
|
|
1188
|
-
source: "loaders.gl",
|
|
1189
|
-
type,
|
|
1190
|
-
payload
|
|
1191
|
-
};
|
|
1181
|
+
const data = { source: "loaders.gl", type, payload };
|
|
1192
1182
|
const transferList = getTransferList(payload);
|
|
1193
1183
|
const parentPort2 = await getParentPort();
|
|
1194
1184
|
if (parentPort2) {
|
|
@@ -1199,10 +1189,7 @@
|
|
|
1199
1189
|
}
|
|
1200
1190
|
};
|
|
1201
1191
|
function isKnownMessage(message) {
|
|
1202
|
-
const {
|
|
1203
|
-
type,
|
|
1204
|
-
data
|
|
1205
|
-
} = message;
|
|
1192
|
+
const { type, data } = message;
|
|
1206
1193
|
return type === "message" && data && typeof data.source === "string" && data.source.startsWith("loaders.gl");
|
|
1207
1194
|
}
|
|
1208
1195
|
|
|
@@ -1216,11 +1203,7 @@
|
|
|
1216
1203
|
switch (type) {
|
|
1217
1204
|
case "process":
|
|
1218
1205
|
try {
|
|
1219
|
-
const {
|
|
1220
|
-
input,
|
|
1221
|
-
options = {},
|
|
1222
|
-
context = {}
|
|
1223
|
-
} = payload;
|
|
1206
|
+
const { input, options = {}, context = {} } = payload;
|
|
1224
1207
|
const result = await parseData({
|
|
1225
1208
|
loader,
|
|
1226
1209
|
arrayBuffer: input,
|
|
@@ -1230,14 +1213,10 @@
|
|
|
1230
1213
|
_parse: parseOnMainThread
|
|
1231
1214
|
}
|
|
1232
1215
|
});
|
|
1233
|
-
WorkerBody.postMessage("done", {
|
|
1234
|
-
result
|
|
1235
|
-
});
|
|
1216
|
+
WorkerBody.postMessage("done", { result });
|
|
1236
1217
|
} catch (error) {
|
|
1237
1218
|
const message = error instanceof Error ? error.message : "";
|
|
1238
|
-
WorkerBody.postMessage("error", {
|
|
1239
|
-
error: message
|
|
1240
|
-
});
|
|
1219
|
+
WorkerBody.postMessage("error", { error: message });
|
|
1241
1220
|
}
|
|
1242
1221
|
break;
|
|
1243
1222
|
default:
|
|
@@ -1264,21 +1243,11 @@
|
|
|
1264
1243
|
}
|
|
1265
1244
|
};
|
|
1266
1245
|
WorkerBody.addEventListener(onMessage);
|
|
1267
|
-
const payload = {
|
|
1268
|
-
id: id2,
|
|
1269
|
-
input: arrayBuffer,
|
|
1270
|
-
options
|
|
1271
|
-
};
|
|
1246
|
+
const payload = { id: id2, input: arrayBuffer, options };
|
|
1272
1247
|
WorkerBody.postMessage("process", payload);
|
|
1273
1248
|
});
|
|
1274
1249
|
}
|
|
1275
|
-
async function parseData(
|
|
1276
|
-
let {
|
|
1277
|
-
loader,
|
|
1278
|
-
arrayBuffer,
|
|
1279
|
-
options,
|
|
1280
|
-
context
|
|
1281
|
-
} = _ref;
|
|
1250
|
+
async function parseData({ loader, arrayBuffer, options, context }) {
|
|
1282
1251
|
let data;
|
|
1283
1252
|
let parser;
|
|
1284
1253
|
if (loader.parseSync || loader.parse) {
|
|
@@ -1296,9 +1265,7 @@
|
|
|
1296
1265
|
modules: loader && loader.options && loader.options.modules || {},
|
|
1297
1266
|
worker: false
|
|
1298
1267
|
};
|
|
1299
|
-
return await parser(data, {
|
|
1300
|
-
...options
|
|
1301
|
-
}, context, loader);
|
|
1268
|
+
return await parser(data, { ...options }, context, loader);
|
|
1302
1269
|
}
|
|
1303
1270
|
|
|
1304
1271
|
// src/layers/schema/fast-pbf.ts
|
|
@@ -1430,7 +1397,7 @@
|
|
|
1430
1397
|
}
|
|
1431
1398
|
|
|
1432
1399
|
// src/layers/schema/carto-spatial-tile-loader.ts
|
|
1433
|
-
var VERSION = true ? "9.0.
|
|
1400
|
+
var VERSION = true ? "9.0.7" : "latest";
|
|
1434
1401
|
var id = "cartoSpatialTile";
|
|
1435
1402
|
var DEFAULT_OPTIONS = {
|
|
1436
1403
|
cartoSpatialTile: {
|
|
@@ -1225,9 +1225,7 @@
|
|
|
1225
1225
|
var parentPort = null;
|
|
1226
1226
|
|
|
1227
1227
|
// ../../node_modules/@loaders.gl/worker-utils/dist/lib/worker-utils/get-transfer-list.js
|
|
1228
|
-
function getTransferList(object) {
|
|
1229
|
-
let recursive = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
1230
|
-
let transfers = arguments.length > 2 ? arguments[2] : void 0;
|
|
1228
|
+
function getTransferList(object, recursive = true, transfers) {
|
|
1231
1229
|
const transfersSet = transfers || /* @__PURE__ */ new Set();
|
|
1232
1230
|
if (!object) {
|
|
1233
1231
|
} else if (isTransferable(object)) {
|
|
@@ -1273,15 +1271,14 @@
|
|
|
1273
1271
|
static set onmessage(onMessage) {
|
|
1274
1272
|
async function handleMessage(message) {
|
|
1275
1273
|
const parentPort2 = await getParentPort();
|
|
1276
|
-
const {
|
|
1277
|
-
type,
|
|
1278
|
-
payload
|
|
1279
|
-
} = parentPort2 ? message : message.data;
|
|
1274
|
+
const { type, payload } = parentPort2 ? message : message.data;
|
|
1280
1275
|
onMessage(type, payload);
|
|
1281
1276
|
}
|
|
1282
1277
|
getParentPort().then((parentPort2) => {
|
|
1283
1278
|
if (parentPort2) {
|
|
1284
|
-
parentPort2.on("message",
|
|
1279
|
+
parentPort2.on("message", (message) => {
|
|
1280
|
+
handleMessage(message);
|
|
1281
|
+
});
|
|
1285
1282
|
parentPort2.on("exit", () => console.debug("Node worker closing"));
|
|
1286
1283
|
} else {
|
|
1287
1284
|
globalThis.onmessage = handleMessage;
|
|
@@ -1296,10 +1293,7 @@
|
|
|
1296
1293
|
return;
|
|
1297
1294
|
}
|
|
1298
1295
|
const parentPort3 = await getParentPort();
|
|
1299
|
-
const {
|
|
1300
|
-
type,
|
|
1301
|
-
payload
|
|
1302
|
-
} = parentPort3 ? message : message.data;
|
|
1296
|
+
const { type, payload } = parentPort3 ? message : message.data;
|
|
1303
1297
|
onMessage(type, payload);
|
|
1304
1298
|
};
|
|
1305
1299
|
}
|
|
@@ -1321,11 +1315,7 @@
|
|
|
1321
1315
|
}
|
|
1322
1316
|
}
|
|
1323
1317
|
static async postMessage(type, payload) {
|
|
1324
|
-
const data = {
|
|
1325
|
-
source: "loaders.gl",
|
|
1326
|
-
type,
|
|
1327
|
-
payload
|
|
1328
|
-
};
|
|
1318
|
+
const data = { source: "loaders.gl", type, payload };
|
|
1329
1319
|
const transferList = getTransferList(payload);
|
|
1330
1320
|
const parentPort2 = await getParentPort();
|
|
1331
1321
|
if (parentPort2) {
|
|
@@ -1336,10 +1326,7 @@
|
|
|
1336
1326
|
}
|
|
1337
1327
|
};
|
|
1338
1328
|
function isKnownMessage(message) {
|
|
1339
|
-
const {
|
|
1340
|
-
type,
|
|
1341
|
-
data
|
|
1342
|
-
} = message;
|
|
1329
|
+
const { type, data } = message;
|
|
1343
1330
|
return type === "message" && data && typeof data.source === "string" && data.source.startsWith("loaders.gl");
|
|
1344
1331
|
}
|
|
1345
1332
|
|
|
@@ -1353,11 +1340,7 @@
|
|
|
1353
1340
|
switch (type) {
|
|
1354
1341
|
case "process":
|
|
1355
1342
|
try {
|
|
1356
|
-
const {
|
|
1357
|
-
input,
|
|
1358
|
-
options = {},
|
|
1359
|
-
context = {}
|
|
1360
|
-
} = payload;
|
|
1343
|
+
const { input, options = {}, context = {} } = payload;
|
|
1361
1344
|
const result = await parseData({
|
|
1362
1345
|
loader,
|
|
1363
1346
|
arrayBuffer: input,
|
|
@@ -1367,14 +1350,10 @@
|
|
|
1367
1350
|
_parse: parseOnMainThread
|
|
1368
1351
|
}
|
|
1369
1352
|
});
|
|
1370
|
-
WorkerBody.postMessage("done", {
|
|
1371
|
-
result
|
|
1372
|
-
});
|
|
1353
|
+
WorkerBody.postMessage("done", { result });
|
|
1373
1354
|
} catch (error) {
|
|
1374
1355
|
const message = error instanceof Error ? error.message : "";
|
|
1375
|
-
WorkerBody.postMessage("error", {
|
|
1376
|
-
error: message
|
|
1377
|
-
});
|
|
1356
|
+
WorkerBody.postMessage("error", { error: message });
|
|
1378
1357
|
}
|
|
1379
1358
|
break;
|
|
1380
1359
|
default:
|
|
@@ -1401,21 +1380,11 @@
|
|
|
1401
1380
|
}
|
|
1402
1381
|
};
|
|
1403
1382
|
WorkerBody.addEventListener(onMessage);
|
|
1404
|
-
const payload = {
|
|
1405
|
-
id: id2,
|
|
1406
|
-
input: arrayBuffer,
|
|
1407
|
-
options
|
|
1408
|
-
};
|
|
1383
|
+
const payload = { id: id2, input: arrayBuffer, options };
|
|
1409
1384
|
WorkerBody.postMessage("process", payload);
|
|
1410
1385
|
});
|
|
1411
1386
|
}
|
|
1412
|
-
async function parseData(
|
|
1413
|
-
let {
|
|
1414
|
-
loader,
|
|
1415
|
-
arrayBuffer,
|
|
1416
|
-
options,
|
|
1417
|
-
context
|
|
1418
|
-
} = _ref;
|
|
1387
|
+
async function parseData({ loader, arrayBuffer, options, context }) {
|
|
1419
1388
|
let data;
|
|
1420
1389
|
let parser;
|
|
1421
1390
|
if (loader.parseSync || loader.parse) {
|
|
@@ -1433,9 +1402,7 @@
|
|
|
1433
1402
|
modules: loader && loader.options && loader.options.modules || {},
|
|
1434
1403
|
worker: false
|
|
1435
1404
|
};
|
|
1436
|
-
return await parser(data, {
|
|
1437
|
-
...options
|
|
1438
|
-
}, context, loader);
|
|
1405
|
+
return await parser(data, { ...options }, context, loader);
|
|
1439
1406
|
}
|
|
1440
1407
|
|
|
1441
1408
|
// src/layers/schema/carto-vector-tile-loader.ts
|
|
@@ -1658,7 +1625,7 @@
|
|
|
1658
1625
|
}
|
|
1659
1626
|
|
|
1660
1627
|
// src/layers/schema/carto-vector-tile-loader.ts
|
|
1661
|
-
var VERSION = true ? "9.0.
|
|
1628
|
+
var VERSION = true ? "9.0.7" : "latest";
|
|
1662
1629
|
var id = "cartoVectorTile";
|
|
1663
1630
|
var DEFAULT_OPTIONS = {
|
|
1664
1631
|
cartoVectorTile: {
|
package/dist/dist.dev.js
CHANGED
|
@@ -7800,7 +7800,7 @@ var __exports__ = (() => {
|
|
|
7800
7800
|
if (moment2.version === void 0 && moment2.default) {
|
|
7801
7801
|
moment2 = moment2.default;
|
|
7802
7802
|
}
|
|
7803
|
-
var
|
|
7803
|
+
var VERSION5 = "0.5.45", zones = {}, links = {}, countries = {}, names = {}, guesses = {}, cachedGuess;
|
|
7804
7804
|
if (!moment2 || typeof moment2.version !== "string") {
|
|
7805
7805
|
logError("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");
|
|
7806
7806
|
}
|
|
@@ -8204,7 +8204,7 @@ var __exports__ = (() => {
|
|
|
8204
8204
|
out.tz(name);
|
|
8205
8205
|
return out;
|
|
8206
8206
|
}
|
|
8207
|
-
tz.version =
|
|
8207
|
+
tz.version = VERSION5;
|
|
8208
8208
|
tz.dataVersion = "";
|
|
8209
8209
|
tz._zones = zones;
|
|
8210
8210
|
tz._links = links;
|
|
@@ -10638,11 +10638,11 @@ void main(void) {
|
|
|
10638
10638
|
|
|
10639
10639
|
// ../../node_modules/@loaders.gl/gis/dist/lib/binary-features/binary-to-geojson.js
|
|
10640
10640
|
function binaryToGeojson(data, options) {
|
|
10641
|
-
const globalFeatureId = options
|
|
10641
|
+
const globalFeatureId = options?.globalFeatureId;
|
|
10642
10642
|
if (globalFeatureId !== void 0) {
|
|
10643
10643
|
return getSingleFeature(data, globalFeatureId);
|
|
10644
10644
|
}
|
|
10645
|
-
return parseFeatures(data, options
|
|
10645
|
+
return parseFeatures(data, options?.type);
|
|
10646
10646
|
}
|
|
10647
10647
|
function getSingleFeature(data, globalFeatureId) {
|
|
10648
10648
|
const dataArray = normalizeInput(data);
|
|
@@ -10680,7 +10680,7 @@ void main(void) {
|
|
|
10680
10680
|
return polygonToGeoJson(data, startIndex, endIndex);
|
|
10681
10681
|
default:
|
|
10682
10682
|
const unexpectedInput = data;
|
|
10683
|
-
throw new Error(`Unsupported geometry type: ${unexpectedInput
|
|
10683
|
+
throw new Error(`Unsupported geometry type: ${unexpectedInput?.type}`);
|
|
10684
10684
|
}
|
|
10685
10685
|
}
|
|
10686
10686
|
function normalizeInput(data, type) {
|
|
@@ -10724,33 +10724,20 @@ void main(void) {
|
|
|
10724
10724
|
const geometry = binaryToGeometry(data, startIndex, endIndex);
|
|
10725
10725
|
const properties = parseProperties(data, startIndex, endIndex);
|
|
10726
10726
|
const fields = parseFields(data, startIndex, endIndex);
|
|
10727
|
-
return {
|
|
10728
|
-
type: "Feature",
|
|
10729
|
-
geometry,
|
|
10730
|
-
properties,
|
|
10731
|
-
...fields
|
|
10732
|
-
};
|
|
10727
|
+
return { type: "Feature", geometry, properties, ...fields };
|
|
10733
10728
|
}
|
|
10734
|
-
function parseFields(data) {
|
|
10735
|
-
let startIndex = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
10736
|
-
let endIndex = arguments.length > 2 ? arguments[2] : void 0;
|
|
10729
|
+
function parseFields(data, startIndex = 0, endIndex) {
|
|
10737
10730
|
return data.fields && data.fields[data.featureIds.value[startIndex]];
|
|
10738
10731
|
}
|
|
10739
|
-
function parseProperties(data) {
|
|
10740
|
-
let startIndex = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
10741
|
-
let endIndex = arguments.length > 2 ? arguments[2] : void 0;
|
|
10732
|
+
function parseProperties(data, startIndex = 0, endIndex) {
|
|
10742
10733
|
const properties = Object.assign({}, data.properties[data.featureIds.value[startIndex]]);
|
|
10743
10734
|
for (const key in data.numericProps) {
|
|
10744
10735
|
properties[key] = data.numericProps[key].value[startIndex];
|
|
10745
10736
|
}
|
|
10746
10737
|
return properties;
|
|
10747
10738
|
}
|
|
10748
|
-
function polygonToGeoJson(data) {
|
|
10749
|
-
|
|
10750
|
-
let endIndex = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Infinity;
|
|
10751
|
-
const {
|
|
10752
|
-
positions
|
|
10753
|
-
} = data;
|
|
10739
|
+
function polygonToGeoJson(data, startIndex = -Infinity, endIndex = Infinity) {
|
|
10740
|
+
const { positions } = data;
|
|
10754
10741
|
const polygonIndices = data.polygonIndices.value.filter((x) => x >= startIndex && x <= endIndex);
|
|
10755
10742
|
const primitivePolygonIndices = data.primitivePolygonIndices.value.filter((x) => x >= startIndex && x <= endIndex);
|
|
10756
10743
|
const multi = polygonIndices.length > 2;
|
|
@@ -10762,10 +10749,7 @@ void main(void) {
|
|
|
10762
10749
|
const ringCoordinates = ringToGeoJson(positions, startRingIndex, endRingIndex);
|
|
10763
10750
|
coordinates2.push(ringCoordinates);
|
|
10764
10751
|
}
|
|
10765
|
-
return {
|
|
10766
|
-
type: "Polygon",
|
|
10767
|
-
coordinates: coordinates2
|
|
10768
|
-
};
|
|
10752
|
+
return { type: "Polygon", coordinates: coordinates2 };
|
|
10769
10753
|
}
|
|
10770
10754
|
const coordinates = [];
|
|
10771
10755
|
for (let i = 0; i < polygonIndices.length - 1; i++) {
|
|
@@ -10774,52 +10758,31 @@ void main(void) {
|
|
|
10774
10758
|
const polygonCoordinates = polygonToGeoJson(data, startPolygonIndex, endPolygonIndex).coordinates;
|
|
10775
10759
|
coordinates.push(polygonCoordinates);
|
|
10776
10760
|
}
|
|
10777
|
-
return {
|
|
10778
|
-
type: "MultiPolygon",
|
|
10779
|
-
coordinates
|
|
10780
|
-
};
|
|
10761
|
+
return { type: "MultiPolygon", coordinates };
|
|
10781
10762
|
}
|
|
10782
|
-
function lineStringToGeoJson(data) {
|
|
10783
|
-
|
|
10784
|
-
let endIndex = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Infinity;
|
|
10785
|
-
const {
|
|
10786
|
-
positions
|
|
10787
|
-
} = data;
|
|
10763
|
+
function lineStringToGeoJson(data, startIndex = -Infinity, endIndex = Infinity) {
|
|
10764
|
+
const { positions } = data;
|
|
10788
10765
|
const pathIndices = data.pathIndices.value.filter((x) => x >= startIndex && x <= endIndex);
|
|
10789
10766
|
const multi = pathIndices.length > 2;
|
|
10790
10767
|
if (!multi) {
|
|
10791
10768
|
const coordinates2 = ringToGeoJson(positions, pathIndices[0], pathIndices[1]);
|
|
10792
|
-
return {
|
|
10793
|
-
type: "LineString",
|
|
10794
|
-
coordinates: coordinates2
|
|
10795
|
-
};
|
|
10769
|
+
return { type: "LineString", coordinates: coordinates2 };
|
|
10796
10770
|
}
|
|
10797
10771
|
const coordinates = [];
|
|
10798
10772
|
for (let i = 0; i < pathIndices.length - 1; i++) {
|
|
10799
10773
|
const ringCoordinates = ringToGeoJson(positions, pathIndices[i], pathIndices[i + 1]);
|
|
10800
10774
|
coordinates.push(ringCoordinates);
|
|
10801
10775
|
}
|
|
10802
|
-
return {
|
|
10803
|
-
type: "MultiLineString",
|
|
10804
|
-
coordinates
|
|
10805
|
-
};
|
|
10776
|
+
return { type: "MultiLineString", coordinates };
|
|
10806
10777
|
}
|
|
10807
10778
|
function pointToGeoJson(data, startIndex, endIndex) {
|
|
10808
|
-
const {
|
|
10809
|
-
positions
|
|
10810
|
-
} = data;
|
|
10779
|
+
const { positions } = data;
|
|
10811
10780
|
const coordinates = ringToGeoJson(positions, startIndex, endIndex);
|
|
10812
10781
|
const multi = coordinates.length > 1;
|
|
10813
10782
|
if (multi) {
|
|
10814
|
-
return {
|
|
10815
|
-
type: "MultiPoint",
|
|
10816
|
-
coordinates
|
|
10817
|
-
};
|
|
10783
|
+
return { type: "MultiPoint", coordinates };
|
|
10818
10784
|
}
|
|
10819
|
-
return {
|
|
10820
|
-
type: "Point",
|
|
10821
|
-
coordinates: coordinates[0]
|
|
10822
|
-
};
|
|
10785
|
+
return { type: "Point", coordinates: coordinates[0] };
|
|
10823
10786
|
}
|
|
10824
10787
|
function ringToGeoJson(positions, startIndex, endIndex) {
|
|
10825
10788
|
startIndex = startIndex || 0;
|
|
@@ -12995,12 +12958,14 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
|
|
|
12995
12958
|
}
|
|
12996
12959
|
|
|
12997
12960
|
// src/api/common.ts
|
|
12961
|
+
var import_core11 = __toESM(require_core(), 1);
|
|
12998
12962
|
var DEFAULT_API_BASE_URL = "https://gcp-us-east1.api.carto.com";
|
|
12999
12963
|
var DEFAULT_CLIENT = "deck-gl-carto";
|
|
13000
12964
|
var V3_MINOR_VERSION = "3.4";
|
|
13001
12965
|
var MAX_GET_LENGTH = 8192;
|
|
13002
12966
|
var DEFAULT_PARAMETERS = {
|
|
13003
|
-
v: V3_MINOR_VERSION
|
|
12967
|
+
v: V3_MINOR_VERSION,
|
|
12968
|
+
deckglVersion: import_core11.VERSION
|
|
13004
12969
|
};
|
|
13005
12970
|
var DEFAULT_HEADERS = {
|
|
13006
12971
|
Accept: "application/json",
|
|
@@ -14012,7 +13977,7 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
|
|
|
14012
13977
|
})(GLEnum || (GLEnum = {}));
|
|
14013
13978
|
|
|
14014
13979
|
// src/api/parse-map.ts
|
|
14015
|
-
var
|
|
13980
|
+
var import_core12 = __toESM(require_core(), 1);
|
|
14016
13981
|
|
|
14017
13982
|
// src/api/layer-map.ts
|
|
14018
13983
|
var import_moment_timezone = __toESM(require_moment_timezone2(), 1);
|
|
@@ -14406,7 +14371,7 @@ ${formatErrorKey(key)}: ${errorContext[key]}`;
|
|
|
14406
14371
|
...createLoadOptions(token)
|
|
14407
14372
|
});
|
|
14408
14373
|
} catch (e) {
|
|
14409
|
-
|
|
14374
|
+
import_core12.log.error(e.message)();
|
|
14410
14375
|
return void 0;
|
|
14411
14376
|
}
|
|
14412
14377
|
})
|
package/dist/index.cjs
CHANGED
|
@@ -247,7 +247,7 @@ function scaleIdentity() {
|
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
// dist/layers/schema/carto-raster-tile-loader.js
|
|
250
|
-
var VERSION = true ? "9.0.
|
|
250
|
+
var VERSION = true ? "9.0.7" : "latest";
|
|
251
251
|
var id = "cartoRasterTile";
|
|
252
252
|
var DEFAULT_OPTIONS = {
|
|
253
253
|
cartoRasterTile: {
|
|
@@ -518,7 +518,7 @@ function binaryToSpatialjson(binary) {
|
|
|
518
518
|
}
|
|
519
519
|
|
|
520
520
|
// dist/layers/schema/carto-spatial-tile-loader.js
|
|
521
|
-
var VERSION2 = true ? "9.0.
|
|
521
|
+
var VERSION2 = true ? "9.0.7" : "latest";
|
|
522
522
|
var id2 = "cartoSpatialTile";
|
|
523
523
|
var DEFAULT_OPTIONS2 = {
|
|
524
524
|
cartoSpatialTile: {
|
|
@@ -1270,7 +1270,7 @@ var carto_properties_tile_loader_default = CartoPropertiesTileLoader;
|
|
|
1270
1270
|
|
|
1271
1271
|
// dist/layers/schema/carto-vector-tile-loader.js
|
|
1272
1272
|
var import_earcut = __toESM(require("earcut"), 1);
|
|
1273
|
-
var VERSION3 = true ? "9.0.
|
|
1273
|
+
var VERSION3 = true ? "9.0.7" : "latest";
|
|
1274
1274
|
var id3 = "cartoVectorTile";
|
|
1275
1275
|
var DEFAULT_OPTIONS3 = {
|
|
1276
1276
|
cartoVectorTile: {
|
|
@@ -1587,12 +1587,14 @@ function formatErrorKey(key) {
|
|
|
1587
1587
|
}
|
|
1588
1588
|
|
|
1589
1589
|
// dist/api/common.js
|
|
1590
|
+
var import_core11 = require("@deck.gl/core");
|
|
1590
1591
|
var DEFAULT_API_BASE_URL = "https://gcp-us-east1.api.carto.com";
|
|
1591
1592
|
var DEFAULT_CLIENT = "deck-gl-carto";
|
|
1592
1593
|
var V3_MINOR_VERSION = "3.4";
|
|
1593
1594
|
var MAX_GET_LENGTH = 8192;
|
|
1594
1595
|
var DEFAULT_PARAMETERS = {
|
|
1595
|
-
v: V3_MINOR_VERSION
|
|
1596
|
+
v: V3_MINOR_VERSION,
|
|
1597
|
+
deckglVersion: import_core11.VERSION
|
|
1596
1598
|
};
|
|
1597
1599
|
var DEFAULT_HEADERS = {
|
|
1598
1600
|
Accept: "application/json",
|
|
@@ -1889,7 +1891,7 @@ var vectorTilesetSource = async function(options) {
|
|
|
1889
1891
|
|
|
1890
1892
|
// dist/api/parse-map.js
|
|
1891
1893
|
var import_constants12 = require("@luma.gl/constants");
|
|
1892
|
-
var
|
|
1894
|
+
var import_core12 = require("@deck.gl/core");
|
|
1893
1895
|
|
|
1894
1896
|
// dist/api/layer-map.js
|
|
1895
1897
|
var import_d3_array = require("d3-array");
|
|
@@ -2280,7 +2282,7 @@ function parseMap(json) {
|
|
|
2280
2282
|
...createLoadOptions(token)
|
|
2281
2283
|
});
|
|
2282
2284
|
} catch (e) {
|
|
2283
|
-
|
|
2285
|
+
import_core12.log.error(e.message)();
|
|
2284
2286
|
return void 0;
|
|
2285
2287
|
}
|
|
2286
2288
|
})
|