@deck.gl/carto 9.3.1 → 9.3.3
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/cartoPropertiesTile-worker.js +1 -1
- package/dist/cartoRasterTile-worker.js +1 -1
- package/dist/cartoSpatialTile-worker.js +1 -1
- package/dist/cartoVectorTile-worker.js +1 -1
- package/dist/dist.dev.js +89 -40
- package/dist/index.cjs +81 -35
- package/dist/index.cjs.map +2 -2
- package/dist/layers/label-utils.d.ts +3 -1
- package/dist/layers/label-utils.d.ts.map +1 -1
- package/dist/layers/label-utils.js +85 -35
- package/dist/layers/label-utils.js.map +1 -1
- package/dist/layers/schema/carto-properties-tile-loader.js +1 -1
- 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 +1 -1
- package/dist/layers/vector-tile-layer.js.map +1 -1
- package/dist.min.js +10 -10
- package/package.json +5 -5
- package/src/layers/label-utils.ts +107 -46
- package/src/layers/vector-tile-layer.ts +2 -1
|
@@ -5562,7 +5562,7 @@
|
|
|
5562
5562
|
};
|
|
5563
5563
|
|
|
5564
5564
|
// src/layers/schema/carto-properties-tile-loader.ts
|
|
5565
|
-
var VERSION = true ? "9.3.
|
|
5565
|
+
var VERSION = true ? "9.3.3" : "latest";
|
|
5566
5566
|
var id = "cartoPropertiesTile";
|
|
5567
5567
|
var DEFAULT_OPTIONS = {
|
|
5568
5568
|
cartoPropertiesTile: {
|
|
@@ -5548,7 +5548,7 @@
|
|
|
5548
5548
|
};
|
|
5549
5549
|
|
|
5550
5550
|
// src/layers/schema/carto-raster-tile-loader.ts
|
|
5551
|
-
var VERSION = true ? "9.3.
|
|
5551
|
+
var VERSION = true ? "9.3.3" : "latest";
|
|
5552
5552
|
var id = "cartoRasterTile";
|
|
5553
5553
|
var DEFAULT_OPTIONS = {
|
|
5554
5554
|
cartoRasterTile: {
|
|
@@ -5620,7 +5620,7 @@
|
|
|
5620
5620
|
}
|
|
5621
5621
|
|
|
5622
5622
|
// src/layers/schema/carto-spatial-tile-loader.ts
|
|
5623
|
-
var VERSION = true ? "9.3.
|
|
5623
|
+
var VERSION = true ? "9.3.3" : "latest";
|
|
5624
5624
|
var id = "cartoSpatialTile";
|
|
5625
5625
|
var DEFAULT_OPTIONS = {
|
|
5626
5626
|
cartoSpatialTile: {
|
|
@@ -6167,7 +6167,7 @@
|
|
|
6167
6167
|
};
|
|
6168
6168
|
|
|
6169
6169
|
// src/layers/schema/carto-vector-tile-loader.ts
|
|
6170
|
-
var VERSION = true ? "9.3.
|
|
6170
|
+
var VERSION = true ? "9.3.3" : "latest";
|
|
6171
6171
|
var id = "cartoVectorTile";
|
|
6172
6172
|
var DEFAULT_OPTIONS = {
|
|
6173
6173
|
cartoVectorTile: {
|
package/dist/dist.dev.js
CHANGED
|
@@ -8725,6 +8725,28 @@ void main(void) {
|
|
|
8725
8725
|
var import_layers5 = __toESM(require_layers(), 1);
|
|
8726
8726
|
|
|
8727
8727
|
// src/layers/label-utils.ts
|
|
8728
|
+
var FEATURE_BBOX_PROP = "_carto_bbox";
|
|
8729
|
+
function parseFeatureBbox(value) {
|
|
8730
|
+
if (typeof value !== "string")
|
|
8731
|
+
return null;
|
|
8732
|
+
const parts = value.split(",");
|
|
8733
|
+
if (parts.length !== 4)
|
|
8734
|
+
return null;
|
|
8735
|
+
return parts.map(Number);
|
|
8736
|
+
}
|
|
8737
|
+
function latToMercatorY(lat) {
|
|
8738
|
+
return Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360));
|
|
8739
|
+
}
|
|
8740
|
+
function worldToTile(point3, geoBbox, tileBbox) {
|
|
8741
|
+
const xFrac = (point3[0] - geoBbox.west) / (geoBbox.east - geoBbox.west);
|
|
8742
|
+
const x = tileBbox.west + xFrac * (tileBbox.east - tileBbox.west);
|
|
8743
|
+
const mercY = latToMercatorY(point3[1]);
|
|
8744
|
+
const mercNorth = latToMercatorY(geoBbox.north);
|
|
8745
|
+
const mercSouth = latToMercatorY(geoBbox.south);
|
|
8746
|
+
const yFrac = (mercNorth - mercY) / (mercNorth - mercSouth);
|
|
8747
|
+
const y = tileBbox.south + yFrac * (tileBbox.north - tileBbox.south);
|
|
8748
|
+
return [x, y];
|
|
8749
|
+
}
|
|
8728
8750
|
function createPointsFromLines(lines, uniqueIdProperty) {
|
|
8729
8751
|
const hasNumericUniqueId = uniqueIdProperty ? uniqueIdProperty in lines.numericProps : false;
|
|
8730
8752
|
const idToLineInfo = /* @__PURE__ */ new Map();
|
|
@@ -8771,8 +8793,12 @@ void main(void) {
|
|
|
8771
8793
|
properties
|
|
8772
8794
|
);
|
|
8773
8795
|
}
|
|
8774
|
-
function createPointsFromPolygons(polygons, tileBbox, props) {
|
|
8775
|
-
const
|
|
8796
|
+
function createPointsFromPolygons(polygons, tileBbox, props, geoBbox) {
|
|
8797
|
+
const useBbox = Boolean(
|
|
8798
|
+
geoBbox && polygons.properties.length > 0 && FEATURE_BBOX_PROP in polygons.properties[0]
|
|
8799
|
+
);
|
|
8800
|
+
const boundsBbox = useBbox ? geoBbox : tileBbox;
|
|
8801
|
+
const { west, south, east, north } = boundsBbox;
|
|
8776
8802
|
const tileArea = (east - west) * (north - south);
|
|
8777
8803
|
const minPolygonArea = tileArea * 1e-4;
|
|
8778
8804
|
const positions = [];
|
|
@@ -8783,55 +8809,77 @@ void main(void) {
|
|
|
8783
8809
|
polygons.polygonIndices.value.length - 1,
|
|
8784
8810
|
polygons.numericProps
|
|
8785
8811
|
);
|
|
8812
|
+
const isMVT = useBbox && geoBbox !== tileBbox;
|
|
8786
8813
|
let pointIndex = 0;
|
|
8787
8814
|
let triangleIndex = 0;
|
|
8788
8815
|
const { extruded } = props;
|
|
8789
8816
|
for (let i = 0; i < polygons.polygonIndices.value.length - 1; i++) {
|
|
8790
8817
|
const startIndex = polygons.polygonIndices.value[i];
|
|
8791
8818
|
const endIndex = polygons.polygonIndices.value[i + 1];
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
|
|
8819
|
+
let labelPoint = null;
|
|
8820
|
+
let preferredPoint = null;
|
|
8821
|
+
if (useBbox) {
|
|
8822
|
+
const featureId2 = polygons.featureIds.value[startIndex];
|
|
8823
|
+
const bbox2 = parseFeatureBbox(polygons.properties[featureId2][FEATURE_BBOX_PROP]);
|
|
8824
|
+
if (bbox2) {
|
|
8825
|
+
const [bboxWest, bboxSouth, bboxEast, bboxNorth] = bbox2;
|
|
8826
|
+
const bboxArea = (bboxEast - bboxWest) * (bboxNorth - bboxSouth);
|
|
8827
|
+
if (bboxArea >= minPolygonArea) {
|
|
8828
|
+
const center = [(bboxWest + bboxEast) / 2, (bboxSouth + bboxNorth) / 2];
|
|
8829
|
+
if (isPointInBounds(center, geoBbox)) {
|
|
8830
|
+
preferredPoint = isMVT ? worldToTile(center, geoBbox, tileBbox) : center;
|
|
8831
|
+
}
|
|
8832
|
+
}
|
|
8803
8833
|
}
|
|
8804
|
-
|
|
8805
|
-
|
|
8834
|
+
} else {
|
|
8835
|
+
if (getPolygonArea(polygons, i) < minPolygonArea) {
|
|
8806
8836
|
continue;
|
|
8807
8837
|
}
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
|
|
8827
|
-
|
|
8828
|
-
|
|
8838
|
+
preferredPoint = getPolygonCentroid(polygons, i);
|
|
8839
|
+
}
|
|
8840
|
+
if (preferredPoint) {
|
|
8841
|
+
let maxArea = -1;
|
|
8842
|
+
let largestTriangleCenter = [0, 0];
|
|
8843
|
+
let isInside = false;
|
|
8844
|
+
while (triangleIndex < polygons.triangles.value.length) {
|
|
8845
|
+
const i1 = polygons.triangles.value[triangleIndex];
|
|
8846
|
+
if (i1 >= endIndex)
|
|
8847
|
+
break;
|
|
8848
|
+
if (isInside) {
|
|
8849
|
+
triangleIndex += 3;
|
|
8850
|
+
continue;
|
|
8851
|
+
}
|
|
8852
|
+
const i2 = polygons.triangles.value[triangleIndex + 1];
|
|
8853
|
+
const i3 = polygons.triangles.value[triangleIndex + 2];
|
|
8854
|
+
const v1 = polygons.positions.value.subarray(
|
|
8855
|
+
i1 * polygons.positions.size,
|
|
8856
|
+
i1 * polygons.positions.size + polygons.positions.size
|
|
8857
|
+
);
|
|
8858
|
+
const v2 = polygons.positions.value.subarray(
|
|
8859
|
+
i2 * polygons.positions.size,
|
|
8860
|
+
i2 * polygons.positions.size + polygons.positions.size
|
|
8861
|
+
);
|
|
8862
|
+
const v3 = polygons.positions.value.subarray(
|
|
8863
|
+
i3 * polygons.positions.size,
|
|
8864
|
+
i3 * polygons.positions.size + polygons.positions.size
|
|
8865
|
+
);
|
|
8866
|
+
if (isPointInTriangle(preferredPoint, v1, v2, v3)) {
|
|
8867
|
+
isInside = true;
|
|
8868
|
+
} else {
|
|
8869
|
+
const area = getTriangleArea(v1, v2, v3);
|
|
8870
|
+
if (area > maxArea) {
|
|
8871
|
+
maxArea = area;
|
|
8872
|
+
largestTriangleCenter = [(v1[0] + v2[0] + v3[0]) / 3, (v1[1] + v2[1] + v3[1]) / 3];
|
|
8873
|
+
}
|
|
8829
8874
|
}
|
|
8875
|
+
triangleIndex += 3;
|
|
8876
|
+
}
|
|
8877
|
+
const candidate = isInside ? preferredPoint : largestTriangleCenter;
|
|
8878
|
+
if (isPointInBounds(candidate, tileBbox)) {
|
|
8879
|
+
labelPoint = candidate;
|
|
8830
8880
|
}
|
|
8831
|
-
triangleIndex += 3;
|
|
8832
8881
|
}
|
|
8833
|
-
|
|
8834
|
-
if (isPointInBounds(labelPoint, tileBbox)) {
|
|
8882
|
+
if (labelPoint) {
|
|
8835
8883
|
positions.push(...labelPoint);
|
|
8836
8884
|
const featureId2 = polygons.featureIds.value[startIndex];
|
|
8837
8885
|
if (extruded) {
|
|
@@ -9093,7 +9141,8 @@ void main(void) {
|
|
|
9093
9141
|
labelData.points = createPointsFromPolygons(
|
|
9094
9142
|
props.data.polygons,
|
|
9095
9143
|
this.state.mvt ? MVT_BBOX : tileBbox,
|
|
9096
|
-
props
|
|
9144
|
+
props,
|
|
9145
|
+
tileBbox
|
|
9097
9146
|
);
|
|
9098
9147
|
}
|
|
9099
9148
|
subLayers.push(
|
package/dist/index.cjs
CHANGED
|
@@ -689,7 +689,7 @@ function binaryToSpatialjson(binary) {
|
|
|
689
689
|
}
|
|
690
690
|
|
|
691
691
|
// dist/layers/schema/carto-spatial-tile-loader.js
|
|
692
|
-
var VERSION = true ? "9.3.
|
|
692
|
+
var VERSION = true ? "9.3.3" : "latest";
|
|
693
693
|
var id = "cartoSpatialTile";
|
|
694
694
|
var DEFAULT_OPTIONS = {
|
|
695
695
|
cartoSpatialTile: {
|
|
@@ -2052,7 +2052,7 @@ var TileReader3 = class {
|
|
|
2052
2052
|
};
|
|
2053
2053
|
|
|
2054
2054
|
// dist/layers/schema/carto-raster-tile-loader.js
|
|
2055
|
-
var VERSION2 = true ? "9.3.
|
|
2055
|
+
var VERSION2 = true ? "9.3.3" : "latest";
|
|
2056
2056
|
var id2 = "cartoRasterTile";
|
|
2057
2057
|
var DEFAULT_OPTIONS2 = {
|
|
2058
2058
|
cartoRasterTile: {
|
|
@@ -2165,7 +2165,7 @@ var TileReader4 = class {
|
|
|
2165
2165
|
};
|
|
2166
2166
|
|
|
2167
2167
|
// dist/layers/schema/carto-properties-tile-loader.js
|
|
2168
|
-
var VERSION3 = true ? "9.3.
|
|
2168
|
+
var VERSION3 = true ? "9.3.3" : "latest";
|
|
2169
2169
|
var id3 = "cartoPropertiesTile";
|
|
2170
2170
|
var DEFAULT_OPTIONS3 = {
|
|
2171
2171
|
cartoPropertiesTile: {
|
|
@@ -2194,7 +2194,7 @@ var carto_properties_tile_loader_default = CartoPropertiesTileLoader;
|
|
|
2194
2194
|
|
|
2195
2195
|
// dist/layers/schema/carto-vector-tile-loader.js
|
|
2196
2196
|
var import_earcut = __toESM(require("earcut"), 1);
|
|
2197
|
-
var VERSION4 = true ? "9.3.
|
|
2197
|
+
var VERSION4 = true ? "9.3.3" : "latest";
|
|
2198
2198
|
var id4 = "cartoVectorTile";
|
|
2199
2199
|
var DEFAULT_OPTIONS4 = {
|
|
2200
2200
|
cartoVectorTile: {
|
|
@@ -2256,6 +2256,28 @@ var import_geo_layers8 = require("@deck.gl/geo-layers");
|
|
|
2256
2256
|
var import_layers5 = require("@deck.gl/layers");
|
|
2257
2257
|
|
|
2258
2258
|
// dist/layers/label-utils.js
|
|
2259
|
+
var FEATURE_BBOX_PROP = "_carto_bbox";
|
|
2260
|
+
function parseFeatureBbox(value) {
|
|
2261
|
+
if (typeof value !== "string")
|
|
2262
|
+
return null;
|
|
2263
|
+
const parts = value.split(",");
|
|
2264
|
+
if (parts.length !== 4)
|
|
2265
|
+
return null;
|
|
2266
|
+
return parts.map(Number);
|
|
2267
|
+
}
|
|
2268
|
+
function latToMercatorY(lat) {
|
|
2269
|
+
return Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360));
|
|
2270
|
+
}
|
|
2271
|
+
function worldToTile(point, geoBbox, tileBbox) {
|
|
2272
|
+
const xFrac = (point[0] - geoBbox.west) / (geoBbox.east - geoBbox.west);
|
|
2273
|
+
const x = tileBbox.west + xFrac * (tileBbox.east - tileBbox.west);
|
|
2274
|
+
const mercY = latToMercatorY(point[1]);
|
|
2275
|
+
const mercNorth = latToMercatorY(geoBbox.north);
|
|
2276
|
+
const mercSouth = latToMercatorY(geoBbox.south);
|
|
2277
|
+
const yFrac = (mercNorth - mercY) / (mercNorth - mercSouth);
|
|
2278
|
+
const y = tileBbox.south + yFrac * (tileBbox.north - tileBbox.south);
|
|
2279
|
+
return [x, y];
|
|
2280
|
+
}
|
|
2259
2281
|
function createPointsFromLines(lines, uniqueIdProperty) {
|
|
2260
2282
|
const hasNumericUniqueId = uniqueIdProperty ? uniqueIdProperty in lines.numericProps : false;
|
|
2261
2283
|
const idToLineInfo = /* @__PURE__ */ new Map();
|
|
@@ -2296,8 +2318,10 @@ function createPointsFromLines(lines, uniqueIdProperty) {
|
|
|
2296
2318
|
}
|
|
2297
2319
|
return createBinaryPointFeature(positions, featureIds, globalFeatureIds, numericProps, properties);
|
|
2298
2320
|
}
|
|
2299
|
-
function createPointsFromPolygons(polygons, tileBbox, props) {
|
|
2300
|
-
const
|
|
2321
|
+
function createPointsFromPolygons(polygons, tileBbox, props, geoBbox) {
|
|
2322
|
+
const useBbox = Boolean(geoBbox && polygons.properties.length > 0 && FEATURE_BBOX_PROP in polygons.properties[0]);
|
|
2323
|
+
const boundsBbox = useBbox ? geoBbox : tileBbox;
|
|
2324
|
+
const { west, south, east, north } = boundsBbox;
|
|
2301
2325
|
const tileArea = (east - west) * (north - south);
|
|
2302
2326
|
const minPolygonArea = tileArea * 1e-4;
|
|
2303
2327
|
const positions = [];
|
|
@@ -2305,46 +2329,68 @@ function createPointsFromPolygons(polygons, tileBbox, props) {
|
|
|
2305
2329
|
const featureIds = [];
|
|
2306
2330
|
const globalFeatureIds = [];
|
|
2307
2331
|
const numericProps = initializeNumericProps(polygons.polygonIndices.value.length - 1, polygons.numericProps);
|
|
2332
|
+
const isMVT = useBbox && geoBbox !== tileBbox;
|
|
2308
2333
|
let pointIndex = 0;
|
|
2309
2334
|
let triangleIndex = 0;
|
|
2310
2335
|
const { extruded } = props;
|
|
2311
2336
|
for (let i = 0; i < polygons.polygonIndices.value.length - 1; i++) {
|
|
2312
2337
|
const startIndex = polygons.polygonIndices.value[i];
|
|
2313
2338
|
const endIndex = polygons.polygonIndices.value[i + 1];
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2339
|
+
let labelPoint = null;
|
|
2340
|
+
let preferredPoint = null;
|
|
2341
|
+
if (useBbox) {
|
|
2342
|
+
const featureId = polygons.featureIds.value[startIndex];
|
|
2343
|
+
const bbox = parseFeatureBbox(polygons.properties[featureId][FEATURE_BBOX_PROP]);
|
|
2344
|
+
if (bbox) {
|
|
2345
|
+
const [bboxWest, bboxSouth, bboxEast, bboxNorth] = bbox;
|
|
2346
|
+
const bboxArea = (bboxEast - bboxWest) * (bboxNorth - bboxSouth);
|
|
2347
|
+
if (bboxArea >= minPolygonArea) {
|
|
2348
|
+
const center = [(bboxWest + bboxEast) / 2, (bboxSouth + bboxNorth) / 2];
|
|
2349
|
+
if (isPointInBounds(center, geoBbox)) {
|
|
2350
|
+
preferredPoint = isMVT ? worldToTile(center, geoBbox, tileBbox) : center;
|
|
2351
|
+
}
|
|
2352
|
+
}
|
|
2325
2353
|
}
|
|
2326
|
-
|
|
2327
|
-
|
|
2354
|
+
} else {
|
|
2355
|
+
if (getPolygonArea(polygons, i) < minPolygonArea) {
|
|
2328
2356
|
continue;
|
|
2329
2357
|
}
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2358
|
+
preferredPoint = getPolygonCentroid(polygons, i);
|
|
2359
|
+
}
|
|
2360
|
+
if (preferredPoint) {
|
|
2361
|
+
let maxArea = -1;
|
|
2362
|
+
let largestTriangleCenter = [0, 0];
|
|
2363
|
+
let isInside = false;
|
|
2364
|
+
while (triangleIndex < polygons.triangles.value.length) {
|
|
2365
|
+
const i1 = polygons.triangles.value[triangleIndex];
|
|
2366
|
+
if (i1 >= endIndex)
|
|
2367
|
+
break;
|
|
2368
|
+
if (isInside) {
|
|
2369
|
+
triangleIndex += 3;
|
|
2370
|
+
continue;
|
|
2342
2371
|
}
|
|
2372
|
+
const i2 = polygons.triangles.value[triangleIndex + 1];
|
|
2373
|
+
const i3 = polygons.triangles.value[triangleIndex + 2];
|
|
2374
|
+
const v1 = polygons.positions.value.subarray(i1 * polygons.positions.size, i1 * polygons.positions.size + polygons.positions.size);
|
|
2375
|
+
const v2 = polygons.positions.value.subarray(i2 * polygons.positions.size, i2 * polygons.positions.size + polygons.positions.size);
|
|
2376
|
+
const v3 = polygons.positions.value.subarray(i3 * polygons.positions.size, i3 * polygons.positions.size + polygons.positions.size);
|
|
2377
|
+
if (isPointInTriangle(preferredPoint, v1, v2, v3)) {
|
|
2378
|
+
isInside = true;
|
|
2379
|
+
} else {
|
|
2380
|
+
const area = getTriangleArea(v1, v2, v3);
|
|
2381
|
+
if (area > maxArea) {
|
|
2382
|
+
maxArea = area;
|
|
2383
|
+
largestTriangleCenter = [(v1[0] + v2[0] + v3[0]) / 3, (v1[1] + v2[1] + v3[1]) / 3];
|
|
2384
|
+
}
|
|
2385
|
+
}
|
|
2386
|
+
triangleIndex += 3;
|
|
2387
|
+
}
|
|
2388
|
+
const candidate = isInside ? preferredPoint : largestTriangleCenter;
|
|
2389
|
+
if (isPointInBounds(candidate, tileBbox)) {
|
|
2390
|
+
labelPoint = candidate;
|
|
2343
2391
|
}
|
|
2344
|
-
triangleIndex += 3;
|
|
2345
2392
|
}
|
|
2346
|
-
|
|
2347
|
-
if (isPointInBounds(labelPoint, tileBbox)) {
|
|
2393
|
+
if (labelPoint) {
|
|
2348
2394
|
positions.push(...labelPoint);
|
|
2349
2395
|
const featureId = polygons.featureIds.value[startIndex];
|
|
2350
2396
|
if (extruded) {
|
|
@@ -2582,7 +2628,7 @@ var VectorTileLayer = class extends import_geo_layers8.MVTLayer {
|
|
|
2582
2628
|
labelData.points = createPointsFromLines(props.data.lines, typeof props.autoLabels === "object" ? props.autoLabels.uniqueIdProperty : void 0);
|
|
2583
2629
|
}
|
|
2584
2630
|
if (props.data.polygons && props.data.polygons.positions.value.length > 0) {
|
|
2585
|
-
labelData.points = createPointsFromPolygons(props.data.polygons, this.state.mvt ? MVT_BBOX : tileBbox, props);
|
|
2631
|
+
labelData.points = createPointsFromPolygons(props.data.polygons, this.state.mvt ? MVT_BBOX : tileBbox, props, tileBbox);
|
|
2586
2632
|
}
|
|
2587
2633
|
subLayers.push(subLayers[0].clone({
|
|
2588
2634
|
id: `${props.id}-labels`,
|